[x264-devel] [patch] x264 --sar in mp4 container
vmrsss
vmrsss at gmail.com
Sat May 10 15:20:25 CEST 2008
Hello.
I find there is something wrong in the way x264 handles --sar with a
mp4 container. For comparison, let me first run:
> x264 test.yuv 720x576 --crf 18 --sar 64:45 -o test.264 ; MP4Bbox -
> add test.264 -new test.mp4
Then, I get:
> MP4Box -info test.mp4
>
> Track # 1 Info - TrackID 1 - TimeScale 25 - Duration 00:00:30.040
> Media Info: Language "Undetermined" - Type "vide:avc1" - 751 samples
> MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
> AVC/H264 Video - Visual Size 720 x 576 - Profile Baseline @ Level
> 5.1 NAL Unit length bits: 32
> Pixel Aspect Ratio 64:45 - Indicated track size 1024 x 576
> Self-synchronized
This is exactly as expected, SAR = 64/45 and DAR=16/9. (Notice the
"indicated track size" field.) Next, I run
> x264 test.yuv 720x576 --crf 18 --sar 64:45 -o test.mp4
and the "Indicated track size" is wrong:
> MP4Box -info test.mp4 Track # 1 Info - TrackID 1 - TimeScale 25 -
> Duration 00:00:30.040
> Media Info: Language "Undetermined" - Type "vide:avc1" - 751 samples
> MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
> AVC/H264 Video - Visual Size 720 x 576 - Profile Main @ Level 5.1
> NAL Unit length bits: 32
> Pixel Aspect Ratio 64:45 - Indicated track size 720 x 576
> Self-synchronized
Inspecting the code shows that in fact the DAR is not computed from
the frame size and the SAR. The patch attached just does this, and
then calls a suitable GPAC function to set the "Indicated track size".
Can this please be considered for inclusion in the build tree?
Cheers,
vmrsss
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sar_mp4.patch
Type: application/octet-stream
Size: 845 bytes
Desc: not available
Url : http://mailman.videolan.org/pipermail/x264-devel/attachments/20080510/73ba80c8/attachment.obj
-------------- next part --------------
More information about the x264-devel
mailing list