[FFmpeg-user] setdar/setsar not working correctly with libvpx on 32 bit Ubuntu
Philip Kahle
philip.kahle at gmail.com
Thu Dec 6 18:04:30 CET 2012
This is interesting. I tried before with setdar, mpeg4 codec and packaging
to mp4
which worked as expected both for mp4 and avi (uncompressed) as input.
$ ffmpeg -i mp4_test.mp4 -vcodec mpeg4 -an -vf setdar='4:3'
out_mp4-mp4_setdar.mp4
So I thought that it's restricted to webm.
But using an mkv container produces in both cases the wrong values for SAR
and DAR.
$ ffmpeg -i mp4_test.mp4 -vcodec mpeg4 -an -vf setdar='4:3'
out_mp4-mkv_setdar.mkv
The resolution is correctly annotated in the container with SAR=16:15 and
DAR=4:3 but
the stream still has the wrong settings of 212:199 and 265:199.
Exactly the same happens for the avi file.
I am not sure how to interpret this. Please see for yourself in the log
file that is attached.
64bit machine libvpx head:
ref: refs/heads/master
32bit machine:
ref: refs/heads/master
on both it points to:
9a3de881c0e681ba1a79a166a86308bbc84b4acd branch 'master' of
http://git.chromium.org/webm/libvpx
Thanks, Philip
On Thu, Dec 6, 2012 at 5:03 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> Philip Kahle <philip.kahle <at> gmail.com> writes:
>
> > /usr/local/bin/ffmpeg -i mp4_test.mp4 -vcodec libvpx
> > -acodec libvorbis -vf setdar='4:3' out_mp4-webm_setdaronly.webm
>
> Is this also reproducible if you do not use an external library
> (vpx) but mpeg4 instead?
> $ ffmpeg -i mp4_test.mp4 -an -vcodec mpeg4 out.mkv
>
> And please always post current git head output and if you report
> different behaviour on different sytems (like in this case),
> please post both outputs, it may allow to understand the problem.
>
> Carl Eugen
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
-------------- next part --------------
$ /usr/local/bin/ffmpeg -v debug -i mp4_test.mp4 -vcodec mpeg4 -an -vf setdar='4:3' out_mp4-mkv_setdar.mkv
ffmpeg version 1.0.1 Copyright (c) 2000-2012 the FFmpeg developers
built on Dec 6 2012 12:04:11 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --prefix=/usr/local/ --enable-shared --enable-avfilter --enable-libvorbis --enable-pthreads --enable-libvpx --enable-gpl --enable-pic
libavutil 51. 73.101 / 51. 73.101
libavcodec 54. 59.100 / 54. 59.100
libavformat 54. 29.104 / 54. 29.104
libavdevice 54. 2.101 / 54. 2.101
libavfilter 3. 17.100 / 3. 17.100
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x944e500] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x944e500] ISO: File Type Major Brand: isom
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x944e500] File position before avformat_find_stream_info() is 7551734
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x944e500] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x944e500] File position after avformat_find_stream_info() is 34562
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'mp4_test.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
creation_time : 1970-01-01 00:00:00
encoder : Umile Encoder 3
Duration: 00:00:10.40, start: 0.000000, bitrate: 5809 kb/s
Stream #0:0(und), 1, 1/25: Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 720x576 [SAR 1:1 DAR 5:4], 1/25, 5612 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : VideoHandler
Stream #0:1(und), 1, 1/48000: Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 192 kb/s
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : SoundHandler
File 'out_mp4-mkv_setdar.mkv' already exists. Overwrite ? [y/N] y
a:4/3
[buffer @ 0x9475e80] Setting entry with key 'video_size' to value '720x576'
[buffer @ 0x9475e80] Setting entry with key 'pix_fmt' to value '0'
[buffer @ 0x9475e80] Setting entry with key 'time_base' to value '1/25'
[buffer @ 0x9475e80] Setting entry with key 'pixel_aspect' to value '1/1'
[buffer @ 0x9475e80] Setting entry with key 'sws_param' to value 'flags=2'
[buffer @ 0x9475e80] Setting entry with key 'frame_rate' to value '25/1'
[graph 0 input from stream 0:0 @ 0x9475dc0] w:720 h:576 pixfmt:yuv420p tb:1/25 fr:25/1 sar:1/1 sws_param:flags=2
[Parsed_setdar_0 @ 0x9465e80] w:720 h:576 -> dar:4/3 sar:16/15
[mpeg4 @ 0x9476d80] detected 2 logical cores
[mpeg4 @ 0x9476d80] intra_quant_bias = 0 inter_quant_bias = -64
[mpeg4 @ 0x9454ee0] detected 2 logical cores
Output #0, matroska, to 'out_mp4-mkv_setdar.mkv':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf54.29.104
Stream #0:0(und), 0, 1/1000: Video: mpeg4, yuv420p, 720x576 [SAR 16:15 DAR 4:3], 1/25, q=2-31, 200 kb/s, 1k tbn, 25 tbc
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : VideoHandler
Stream mapping:
Stream #0:0 -> #0:0 (mpeg4 -> mpeg4)
Press [q] to stop, [?] for help
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x944e500] demuxer injecting skip 1024
[matroska @ 0x94766c0] Writing block at offset 842, size 33824, pts 0, dts 0, duration 40, flags 128
[matroska @ 0x94766c0] Writing block at offset 34674, size 39641, pts 40, dts 40, duration 40, flags 0
[matroska @ 0x94766c0] Writing block at offset 74323, size 41057, pts 80, dts 80, duration 40, flags 0
[matroska @ 0x94766c0] Writing block at offset 115388, size 43230, pts 120, dts 120, duration 40, flags 0
[matroska @ 0x94766c0] Writing block at offset 158626, size 15749, pts 160, dts 160, duration 40, flags 0
...
$ /usr/local/bin/ffprobe -show_format -show_streams out_mp4-mkv_setdar.mkv
ffprobe version 1.0.1 Copyright (c) 2007-2012 the FFmpeg developers
built on Dec 6 2012 12:04:11 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --prefix=/usr/local/ --enable-shared --enable-avfilter --enable-libvorbis --enable-pthreads --enable-libvpx --enable-gpl --enable-pic
libavutil 51. 73.101 / 51. 73.101
libavcodec 54. 59.100 / 54. 59.100
libavformat 54. 29.104 / 54. 29.104
libavdevice 54. 2.101 / 54. 2.101
libavfilter 3. 17.100 / 3. 17.100
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, matroska,webm, from 'out_mp4-mkv_setdar.mkv':
Metadata:
MAJOR_BRAND : isom
MINOR_VERSION : 512
COMPATIBLE_BRANDS: isomiso2mp41
ENCODER : Lavf54.29.104
Duration: 00:00:10.40, start: 0.000000, bitrate: 387 kb/s
Stream #0:0(und): Video: mpeg4 (Simple Profile), yuv420p, 720x576 [SAR 16:15 DAR 4:3], SAR 212:199 DAR 265:199, 25 fps, 25 tbr, 1k tbn, 25 tbc (default)
Metadata:
CREATION_TIME : 1970-01-01 00:00:00
LANGUAGE : und
HANDLER_NAME : VideoHandler
[STREAM]
index=0
codec_name=mpeg4
codec_long_name=MPEG-4 part 2
profile=Simple Profile
codec_type=video
codec_time_base=1/25
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
width=720
height=576
has_b_frames=0
sample_aspect_ratio=212:199
display_aspect_ratio=265:199
pix_fmt=yuv420p
level=1
timecode=N/A
quarter_sample=0
divx_packed=0
id=N/A
r_frame_rate=25/1
avg_frame_rate=25/1
time_base=1/1000
start_pts=0
start_time=0.000000
duration_ts=N/A
duration=N/A
bit_rate=N/A
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
TAG:CREATION_TIME=1970-01-01 00:00:00
TAG:LANGUAGE=und
TAG:HANDLER_NAME=VideoHandler
[/STREAM]
[FORMAT]
filename=out_mp4-mkv_setdar.mkv
nb_streams=1
format_name=matroska,webm
format_long_name=Matroska / WebM
start_time=0.000000
duration=10.400000
size=504385
bit_rate=387988
TAG:MAJOR_BRAND=isom
TAG:MINOR_VERSION=512
TAG:COMPATIBLE_BRANDS=isomiso2mp41
TAG:ENCODER=Lavf54.29.104
[/FORMAT]
More information about the ffmpeg-user
mailing list