Log in

View Full Version : H.264 / M2TS Container - Aspect Ratio Question


v_o_r_t_e_x
25th April 2010, 16:42
I have a M2TS file with H264 Video. The AR is wrongly set to 16:9.

In the past I set the AR in the H264 elementary stream:
1) demuxed the M2TS
2) muxed it with MP4Box and set the AR to 4:3 with: MP4Box.exe -add "InputVideo.h264":par=16:15 "OutputVideo.mp4"
3) demuxed the MP4 and muxed it to a new M2TS with TSMuxer

This worked fine. Now I have a new file I want to do this, but it does not work any more:

When I want to play the final M2TS file with MediaPlayer Classic, only the sound plays.
When I play it with Windows Media Player, it's ok.
When I try to work with that file with multiAVCHD e.g., it fails.

When I mux it to a MKV file, it also plays fine.
When I remux the MKV to M2TS it fails again.

I assume TSMuxer somehow is not handling my file properly.
Maybe it's because if the message I outlined below?!

This is what I do:
META.TXT
MUXOPT --no-pcr-on-video-pid --new-audio-pes --vbr --vbv-len=500
V_MPEG4/ISO/AVC, "VIDEO.h264", insertSEI, contSPS
A_AC3, "AUDIO.ac3"

tsMuxeR.exe "meta.txt" "OUTPUT.m2ts"
SmartLabs tsMuxeR. Version 1.8.8(b) http://www.smlabs.net
Decoding H264 stream (track 1): Profile: Main@3.0 Resolution: 720:576i Frame rate: 25
0.0% complete
H264 bitstream changed: insert nal unit delimiters
Decoding AC3 stream (track 2): Bitrate: 448Kbps Sample Rate: 48KHz Channels: 2
B-pyramid level 2 detected. Shift DTS to 3 frames
99.6% complete
Processed 28724 video frames
100.0% complete
Mux successful complete.
Muxing time: 12 sec




Any ideas?!
Or how do I tell TSMuxer not to change the H264 stream at all?

Guest
25th April 2010, 16:43
I have a M2TS file with H264 Video. The AR is wrongly set to 16:9. Where did you get this M2TS file with wrong AR?

v_o_r_t_e_x
25th April 2010, 17:06
I used Sony DVDArchitect 5.0b. Although I select 4:3, it's always a 16:9 file. No idea why.

In the past I had the problem: When I remuxed MP4s to M2TS, and the MP4s I've created did not contain any aspect ratio - or it got lost somehow. Because the MP4 played ok, but the M2TS not.
That's why I started adding the AR to the H264 elemetary stream with MP4Box. And that worked good - until now. OK, the source file is different this time. And the outcome as well, unfortunately.

One thing to add:
When I take the output of DVDArchitect (demuxed with TSMUXER):
VIDEO16x9.264, AUDIO.AC3 --> TSMUXER --> M2TS --> OK

When I take the output of DVDArchitect and use MP4BOX to add the AR to the elementary stream:
VIDEO4x3.264, AUDIO.AC3 --> TSMUXER --> M2TS --> NOT OK

Second thing to add:
I now converted my source video with Sony Vegas 9.0d to H264 + AC3, then I muxed with TSMuxer:
This is now OK, AR is 4:3 and it plays as it should.

I'm still wondering what is wrong with the other workflow...