ChuckleWorthy
16th June 2008, 14:49
The point of this post is to discuss converting HD content in MKV files to M2TS files for streaming to a PS3, via Mediatomb, on an Ubuntu Linux server.
The PS3 can be quite fussy on what video and audio formats are acceptable when it comes to streamed HD content. The main problem I have remaining is when the Video stream resolution isn’t 1920x1080 or 1280x720 - my PS3 won’t show any video on playback.
I’ve read a lot on various forums and most solutions involve using Windows GUI applications (E.g. avisynth, MeGUI). As I’m using a Linux server to store my files for streaming - I would really like to create a script to do the job in one hit if possible and just leave my server to chug away. (And thus Windows apps aren’t an option for me.)
Before I go too far I would say I’m novice in the field, (Novice = Noob + '3weeks reading forums like mad' + 'tinkering at home'), so I’m drawing together items from various threads to help other people starting out. Therefore I am happy to accept constructive criticism here to improve the content of this thread as that will only serve to help others down the line.
Here’s what I found so far - PS3 Valid Video Criteria:
Profile level: 4.1
Resolution: 1920x1080 or 1280x720
Codec: H.264
I’m sure there are other things I’ve missed off...
PS3 Valid Audio Criteria:
Codec: AC3, MP3. (However not DTS)
again I’m sure there are other things I’ve missed off...
I must credit sticky123 (http://sticky123.blogspot.com/2008_03_01_archive.html) for a great blog post which is the foundation to this posting. I am hoping to take his/her work a step or two further.
http://www.ndu.edu/nwc/nwcCLIPART/CLIP_ART(General)/Separator_bars/bargold1.gif
There are three scenarios I would like to discuss and really need help with number 3:
Scenario 1) the MKV file contains video and audio streams which are both PS3 valid.
http://img223.imageshack.us/img223/4179/remuxop1ya6.th.png (http://img223.imageshack.us/my.php?image=remuxop1ya6.png)
As you can see the (fantastic) application tsMuxer does the repackaging job without the need to re-encode any data stream. It can also force the Video profile level to 4.1 to ensure the PS3 is happy.
Scenario 2) here the Audio stream isn’t PS3 compliant. i.e. stored in a DTS format. We can ‘break’ the DTS stream out of the MKV file into a separate file on it’s own and re-encode it to AC3 format, finally re-muxing (via tsMuxer) the new AC3 file and Video stream into a M2TS file.
http://img161.imageshack.us/img161/7512/remuxop2kr4.th.png (http://img161.imageshack.us/my.php?image=remuxop2kr4.png)
Scenario 3) this time the Video stream isn’t PS3 compliant. i.e. the resolution isn’t quite right. Now this is where my knowledge/experience lets me down and why I’m looking for help from the rest of you. As far as I’m aware it should be, (he says laughably), a simple case of add black borders to the video stream to bring it up-to the correct resolution. (Obviously ensure the aspect ratio is maintained.) I would want to keep the Video data at the same quality/codec as the original source.
http://img391.imageshack.us/img391/6204/remuxop3ij8.th.png (http://img391.imageshack.us/my.php?image=remuxop3ij8.png)
From what I’ve read so far there are some powerful (free) tools available such as mencoder, ffmpeg and x264. However all of them have more command line options than you can shake a stick at and finding the correct route to take has been rather daunting. Thus I’m asking for help.
Scenario 4) obviously it’s possible for Scenario 2 & 3 to apply to one MKV file, but I didn’t think I needed to go over that individually.
http://www.ndu.edu/nwc/nwcCLIPART/CLIP_ART(General)/Separator_bars/bargold1.gif
I’m hoping some of you will find this useful, and I’m hoping more that someone will be able to help me with Scenario 3. Once I’ve got a reasonable solution for that I will post my script for all to share.
Best Regards
Chuckle Worthy
Other things to discuss at a later date:
- subtitles. (I don’t want to discuss subtitles at the moment, maybe once we’ve got the video and audio sorted then we can take things a step further.)
- ff/rewind with HD resolutions doesn’t work very well.
The PS3 can be quite fussy on what video and audio formats are acceptable when it comes to streamed HD content. The main problem I have remaining is when the Video stream resolution isn’t 1920x1080 or 1280x720 - my PS3 won’t show any video on playback.
I’ve read a lot on various forums and most solutions involve using Windows GUI applications (E.g. avisynth, MeGUI). As I’m using a Linux server to store my files for streaming - I would really like to create a script to do the job in one hit if possible and just leave my server to chug away. (And thus Windows apps aren’t an option for me.)
Before I go too far I would say I’m novice in the field, (Novice = Noob + '3weeks reading forums like mad' + 'tinkering at home'), so I’m drawing together items from various threads to help other people starting out. Therefore I am happy to accept constructive criticism here to improve the content of this thread as that will only serve to help others down the line.
Here’s what I found so far - PS3 Valid Video Criteria:
Profile level: 4.1
Resolution: 1920x1080 or 1280x720
Codec: H.264
I’m sure there are other things I’ve missed off...
PS3 Valid Audio Criteria:
Codec: AC3, MP3. (However not DTS)
again I’m sure there are other things I’ve missed off...
I must credit sticky123 (http://sticky123.blogspot.com/2008_03_01_archive.html) for a great blog post which is the foundation to this posting. I am hoping to take his/her work a step or two further.
http://www.ndu.edu/nwc/nwcCLIPART/CLIP_ART(General)/Separator_bars/bargold1.gif
There are three scenarios I would like to discuss and really need help with number 3:
Scenario 1) the MKV file contains video and audio streams which are both PS3 valid.
http://img223.imageshack.us/img223/4179/remuxop1ya6.th.png (http://img223.imageshack.us/my.php?image=remuxop1ya6.png)
As you can see the (fantastic) application tsMuxer does the repackaging job without the need to re-encode any data stream. It can also force the Video profile level to 4.1 to ensure the PS3 is happy.
Scenario 2) here the Audio stream isn’t PS3 compliant. i.e. stored in a DTS format. We can ‘break’ the DTS stream out of the MKV file into a separate file on it’s own and re-encode it to AC3 format, finally re-muxing (via tsMuxer) the new AC3 file and Video stream into a M2TS file.
http://img161.imageshack.us/img161/7512/remuxop2kr4.th.png (http://img161.imageshack.us/my.php?image=remuxop2kr4.png)
Scenario 3) this time the Video stream isn’t PS3 compliant. i.e. the resolution isn’t quite right. Now this is where my knowledge/experience lets me down and why I’m looking for help from the rest of you. As far as I’m aware it should be, (he says laughably), a simple case of add black borders to the video stream to bring it up-to the correct resolution. (Obviously ensure the aspect ratio is maintained.) I would want to keep the Video data at the same quality/codec as the original source.
http://img391.imageshack.us/img391/6204/remuxop3ij8.th.png (http://img391.imageshack.us/my.php?image=remuxop3ij8.png)
From what I’ve read so far there are some powerful (free) tools available such as mencoder, ffmpeg and x264. However all of them have more command line options than you can shake a stick at and finding the correct route to take has been rather daunting. Thus I’m asking for help.
Scenario 4) obviously it’s possible for Scenario 2 & 3 to apply to one MKV file, but I didn’t think I needed to go over that individually.
http://www.ndu.edu/nwc/nwcCLIPART/CLIP_ART(General)/Separator_bars/bargold1.gif
I’m hoping some of you will find this useful, and I’m hoping more that someone will be able to help me with Scenario 3. Once I’ve got a reasonable solution for that I will post my script for all to share.
Best Regards
Chuckle Worthy
Other things to discuss at a later date:
- subtitles. (I don’t want to discuss subtitles at the moment, maybe once we’ve got the video and audio sorted then we can take things a step further.)
- ff/rewind with HD resolutions doesn’t work very well.