Manual Transcode settings for DTS MKVs?

For help and support with PS3 Media Server in general
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply.

Manual Transcode settings for DTS MKVs?

Postby rodhull » Wed May 06, 2009 11:05 am

Hello - I hope someone can help me with this.

PS3MS works great for the most part, the on-the-fly transcoding working for all my 720p MKVs. However, I've noticed that whenever the bitrate peaks too high in a certain movie/TV show I get a stutter/skip whilst streaming.

To combat this, I've been manually transcoding those MKVs that contain AC3 by simply using tsMuxeR to .m2ts before streaming - this gives me stable files that purely stream without any on-the-fly transcoding taking place (which I presume is giving me the hiccups, since I don't get any skipping/hiccuping when streaming ready-transcoded .m2ts files) (it also gives me the bonus of being able to transfer these files directly to the PS3's HD to play should I want to).

Using tsMuxeR on its own simply works for the files that have AC3 audio.

Now, I've been trying to duplicate this for MKVs which contain DTS, and I'm struggling to duplicate how the on-the-fly transcoder is doing things.

From what I can tell I think I ultimately have to produce a .m2ts file that has PCM audio which the PS3 passes as DTS to the amp - since the PS3 won't play DTS embedded in an .m2ts unless it's reading from a Blu-Ray disc?

I'm using Linux and from looking at the debug.log have copied the mencoder command that seems to run whenever PS3MS does the on-the-fly encoding:
Code: Select all
 mencoder -ss 0 input_file.mkv -quiet -quiet -really-quiet -msglevel statusline=-1:mencoder=-1 -channels 2 -ovc copy -of rawaudio -mc 0 -noskip -oac copy -af volume=0 -quiet -quiet -srate 48000 -o outputfile
It looks like it takes this file and after demuxing the video from the mkv, remuxes it using tsMuxeR back into a .m2ts file - is this correct?

Now, when I do this manually all seems to go well, and the file is created (mediainfo says that it is a 720p H264 video file with PCM sound). However, when I try and use PS3 MS to stream it, I just get a blank screen and lots of messages such as this in debug.log:

Code: Select all
 Sending stream with premature end : 1245184 bytes of get/0$2$2$1$1$0/output.m2ts. Reason: Broken pipe


I've also tried using the program Pcm2Tsmu.exe on the audio file which mencoder spits out, which is supposed to create a tsMuxeR-compliant PCM stream, but I just get the same results.

Can anyone help to give me some pointers on where I'm going wrong, and what I need to do to manually transcode these files to .m2ts. I don't want to further losslessly transcode the DTS to AC3, or transcode the video at all...

Help!
rodhull
 
Posts: 7
Joined: Thu Apr 16, 2009 9:45 am

Re: Manual Transcode settings for DTS MKVs?

Postby shagrath » Wed May 06, 2009 5:46 pm

mencoder does not produce "out of the box" H264 "ready for muxing" streams... the server does some magic manipulations in Java to modify the video stream... (something to do with ffmpeg and H264 annexb output)
it's the same about the DTS remuxing... data is modified on the fly
shagrath
Project Lead
 
Posts: 2667
Joined: Wed Jan 14, 2009 1:39 pm

Re: Manual Transcode settings for DTS MKVs?

Postby rodhull » Wed May 06, 2009 10:40 pm

I see - well the video streams seem to be just fine when you run them through tsMuxeR with AC3 tracks...the m2ts files produced work fine.

It was really only the settings for transcoding the audio I was interested in - I think the video should be OK?

I know that I could convert the DTS to AC3 and then remux with tsMuxeR which apparently works when played on the PS3 standalone, but I wanted to keep the DTS audio as untouched as possible, but just remux it together as PCM.

Does anyone else have an idea on how to do it correctly so the PS3 passes it through correctly as DTS?
rodhull
 
Posts: 7
Joined: Thu Apr 16, 2009 9:45 am

Re: Manual Transcode settings for DTS MKVs?

Postby shagrath » Wed May 06, 2009 11:15 pm

ok, I thought you wanted to demux the video with mencoder, as well as the audio part... if you only want the audio part, it should be possible to slightly adapt the code in order to offer a command line tool for converting a dts file to a pcm one, playable on ps3
shagrath
Project Lead
 
Posts: 2667
Joined: Wed Jan 14, 2009 1:39 pm

Re: Manual Transcode settings for DTS MKVs?

Postby rodhull » Thu May 07, 2009 2:16 pm

No, I only really was interested in what was needed to get the audio in the correct format so that tsMuxeR can mux it properly into a .m2ts and so that the PS3 still plays it as DTS.

I assumed that the mencoder line I pasted in the first post was enough to achieve this at first glance, but it appears that it's not :(

What is it that's wrong with the PCM format that mencoder spits out initially? Is there another tool that can produce a compliant PCM stream in a single step? I'm hoping ideally to script this - like I have already done with my script that creates .meta files for tsMuxeR from AC3 MKVs, then creates PS3-compliant .mt2s files:

Code: Select all
#mkvremux.sh
#!/bin/bash
level="level=4.1, "
if [ -z "$1" ]; then echo "Syntax: mkvremux.sh <filename_of_MKV> <videotrack ID> <audiotrack ID> <any_char=fix level to 4.1> ";exit 1; fi
if [ -z "$2" ]; then tsMuxeR "$1"; exit 1; fi
if [ -z "$4" ]; then echo "!!! Level unchanged !!!"; level=""; fi

moviename=`basename "$1" .mkv`

echo -e "MUXOPT --no-pcr-on-video-pid --new-audio-pes --vbr --vbv-len=500\nV_MPEG4/ISO/AVC, \""$1"\", "$level"insertSEI, contSPS, track="$2", lang=und" > "$moviename".meta
echo -e "A_AC3, \""$1"\", track="$3, lang=eng >> "$moviename".meta

tsMuxeR "$moviename".meta "$moviename".m2ts
rm "$moviename".meta

rodhull
 
Posts: 7
Joined: Thu Apr 16, 2009 9:45 am

Re: Manual Transcode settings for DTS MKVs?

Postby Uridium » Thu May 07, 2009 3:42 pm

Try using MKV2VOB. This will Remux your MKV's for you to a PS3 native container and will also apply a PCM/DTS patch the same as PS3MS does enabling your to stream the file without transcoding including the DTS audio.

I Remux all my MKV's to a PS3 native format using this application and then stream with PS3MS; I appreciate that PS3MS will stream these files without running them through MKV2VOB but this method enables me to stream using a lower spec machine and still retain DTS audio.
Uridium
 
Posts: 132
Joined: Thu Jan 22, 2009 11:22 pm


Return to General Help and Support

Who is online

Users browsing this forum: Yahoo [Bot] and 14 guests