Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > New and alternative a/v containers

Reply
 
Thread Tools Search this Thread Display Modes
Old 8th September 2008, 01:30   #1  |  Link
LessThanJake
Registered User
 
Join Date: Sep 2007
Posts: 31
Adding Aspect Ratio-Flag to H264-RAW-Streams

Hi,

when creating H264-streams with x264 and anamoprhic settings such as --sar 16:11 there will be AR-Information present in the bitstream after encoding.

Code:
aspect_ratio_info_present_flag: 1
aspect_ratio_idc:4  (--sar 16:11)
Without using "-engage keep_bitstream_ar_info", when muxing with mkvmerge this info will be removed from the bitstream but sets it into the Container.

So, is there a little tool existing, that can add the ar-information back into the stream?

greets
LTJ
LessThanJake is offline   Reply With Quote
Old 8th September 2008, 09:07   #2  |  Link
Kurtnoise
Swallowed in the Sea
 
Kurtnoise's Avatar
 
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
h264info...
Kurtnoise is offline   Reply With Quote
Old 8th September 2008, 14:35   #3  |  Link
LessThanJake
Registered User
 
Join Date: Sep 2007
Posts: 31
I already tested this tool before posting here.
Unfortunately this tool does its job not correct.
After patching the Stream the AR is correct, but playing the File with mpc+ffdshow, VLC, mplayer as RAW and muxed to MKV with -engage keep_bitstream_ar_info, results in grey frames combined with macroblock-salad.
H264Info changes something in the bitstream, but doesnīt add the correct entry into the SPS-NALU as posted above.

Iīm wondering a little bit that there is no real solution for this, I am already looking for such a tool for a while.

For a good C++ programmer it should be no problem to write a little tool that offers the ability to add / remove these little VUI-Parameters. As far as I know, decoding the SPS-NALU is not very hard. There are only signed and unsigned integer and a few Exp-Golomb coded bits.
Donīt get me wrong, I would do this by myself, but I would need weeks, perhaps month, with my extremly bad C++ - knowledge .

greets
LTJ
LessThanJake is offline   Reply With Quote
Old 8th September 2008, 16:44   #4  |  Link
Kurtnoise
Swallowed in the Sea
 
Kurtnoise's Avatar
 
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
remux your stream with MP4box first to create a mp4. This tool is able to specify par value via command line. Then, remux it to mkv with mmg...
Kurtnoise is offline   Reply With Quote
Old 8th September 2008, 19:07   #5  |  Link
LessThanJake
Registered User
 
Join Date: Sep 2007
Posts: 31
This way everything works correct.
Thank you.

greets
LTJ
LessThanJake is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:49.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.