[FFmpeg-user] setdar/setsar not working correctly with libvpx on 32 bit Ubuntu
Philip Kahle
philip.kahle at gmail.com
Thu Dec 6 17:13:15 CET 2012
Hi Roger,
thank you for looking into this!
I am new to git. What exactly do you mean by output from git master?
I am pretty sure that I am using the most up to date version though:
$ git checkout master
Already on 'master'
$ git pull
Already up-to-date.
also, I did a apt-get remove libvpx1 libvpx-dev
ld.so.conf includes /usr/local/lib where the shared objects are located.
ffmpeg worked only after i ran ldconfig.
To make sure, I just switched again between the ubuntu version and the one
from git. Both with the same result as before.
The version of libvpx makes no difference for the debug output of ffmpeg.
I also attach the log from building libvpx.
The ffmpeg and ffprobe output files include the output from the calls using
the same sample file on the ubuntu 12.04 64bit machine but with the ubuntu
version of libvpx (1.0.0.1). Again, proper values are set for SAR and DAR
on this machine.
I just swallowed the pill and removed the whole libav/vlc/mplayer stack
from the 64bit system in order to try the git version from libvpx there.
Still works like a charm. Even the output is the same (except the filesize
and bit_rate in ffrpobe's output).
Regards, Philip
On Thu, Dec 6, 2012 at 4:09 PM, Roger Pack <rogerdpack2 at gmail.com> wrote:
> On 12/6/12, Philip Kahle <philip.kahle at gmail.com> wrote:
> > Hi everyone,
> >
> > I want to transcode mp4 files (with wrong DAR=5:4 and SAR=1:1) into webm
> > using ffmpeg and thereby set the aspect ratios to DAR=4:3 and SAR=16:15.
> >
> > Command:
> >
> > /usr/local/bin/ffmpeg -i mp4_test.mp4 -vcodec libvpx -acodec libvorbis
> -vf
> > setdar='4:3' out_mp4-webm_setdaronly.webm
> >
> > This works well on a machine running Ubuntu 12.04 64 bit and also on
> Centos
> > 6.
>
> Could we get full command line and console output for the one that
> works as well?
>
>
> > I tried Ffmpeg versions 1.0, 1.0.1 and the current one from git with the
> > same result.
>
> Could you attach the ouput from git master? Just tomake sure that
> that's what you're using.
> Thanks.
> -roger-=
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
-------------- next part --------------
sudo ./configure --extra-cflags="-fPIC" --enable-pic --enable-shared
Configuring selected codecs
enabling vp8_encoder
enabling vp8_decoder
Configuring for target 'x86-linux-gcc'
enabling x86
enabling pic
enabling runtime_cpu_detect
enabling mmx
enabling sse
enabling sse2
enabling sse3
enabling ssse3
enabling sse4_1
using yasm
enabling postproc
enabling unit_tests
Creating makefiles for x86-linux-gcc libs
Creating makefiles for x86-linux-gcc examples
Creating makefiles for x86-linux-gcc docs
sudo make
[DEP] vpx_config.c.d
[CC] vp8/encoder/rdopt.c.o
[CC] vp8/encoder/segmentation.c.o
[CC] vp8/encoder/tokenize.c.o
[CC] vp8/encoder/treewriter.c.o
[CC] vp8/encoder/temporal_filter.c.o
[CC] vp8/encoder/x86/vp8_enc_stubs_mmx.c.o
[CC] vp8/encoder/x86/denoising_sse2.c.o
[CC] vp8/encoder/x86/vp8_enc_stubs_sse2.c.o
[CC] vp8/vp8_dx_iface.c.o
[CC] vp8/decoder/asm_dec_offsets.c.o
[CC] vp8/decoder/dboolhuff.c.o
[CC] vp8/decoder/decodemv.c.o
[CC] vp8/decoder/decodframe.c.o
[CC] vp8/decoder/detokenize.c.o
[CC] vp8/decoder/onyxd_if.c.o
[CC] vp8/decoder/threading.c.o
[CC] vpx_config.c.o
[AS] vpx_ports/emms.asm.o
[AS] vpx_ports/x86_abi_support.asm.o
[AS] vp8/common/x86/dequantize_mmx.asm.o
[AS] vp8/common/x86/idctllm_mmx.asm.o
[AS] vp8/common/x86/iwalsh_mmx.asm.o
[AS] vp8/common/x86/loopfilter_mmx.asm.o
[AS] vp8/common/x86/recon_mmx.asm.o
[AS] vp8/common/x86/sad_mmx.asm.o
[AS] vp8/common/x86/subpixel_mmx.asm.o
[AS] vp8/common/x86/variance_impl_mmx.asm.o
[AS] vp8/common/x86/idctllm_sse2.asm.o
[AS] vp8/common/x86/recon_sse2.asm.o
[AS] vp8/common/x86/sad_sse2.asm.o
[AS] vp8/common/x86/subpixel_sse2.asm.o
[AS] vp8/common/x86/loopfilter_sse2.asm.o
[AS] vp8/common/x86/iwalsh_sse2.asm.o
[AS] vp8/common/x86/variance_impl_sse2.asm.o
[AS] vp8/common/x86/sad_sse3.asm.o
[AS] vp8/common/x86/sad_ssse3.asm.o
[AS] vp8/common/x86/subpixel_ssse3.asm.o
[AS] vp8/common/x86/variance_impl_ssse3.asm.o
[AS] vp8/common/x86/sad_sse4.asm.o
[AS] vp8/common/x86/postproc_mmx.asm.o
[AS] vp8/common/x86/mfqe_sse2.asm.o
[AS] vp8/common/x86/postproc_sse2.asm.o
[AS] vp8/encoder/x86/dct_mmx.asm.o
[AS] vp8/encoder/x86/subtract_mmx.asm.o
[AS] vp8/encoder/x86/dct_sse2.asm.o
[AS] vp8/encoder/x86/fwalsh_sse2.asm.o
[AS] vp8/encoder/x86/quantize_sse2.asm.o
[AS] vp8/encoder/x86/subtract_sse2.asm.o
[AS] vp8/encoder/x86/temporal_filter_apply_sse2.asm.o
[AS] vp8/encoder/x86/quantize_ssse3.asm.o
[AS] vp8/encoder/x86/quantize_sse4.asm.o
[AS] vp8/encoder/x86/quantize_mmx.asm.o
[AS] vp8/encoder/x86/encodeopt.asm.o
[AR] libvpx_g.a
[STRIP] libvpx.a < libvpx_g.a
[CREATE] libvpx.ver
[LD] libvpx.so.1.1.0
[LN] libvpx.so
[LN] libvpx.so.1
[LN] libvpx.so.1.1
[CREATE] vpx.pc
[CXX] third_party/googletest/src/src/gtest-all.cc.o
[AR] libgtest_g.a
[STRIP] libgtest.a < libgtest_g.a
[CC] test/../md5_utils.c.o
[CXX] test/altref_test.cc.o
[CXX] test/config_test.cc.o
[CXX] test/cq_test.cc.o
[CXX] test/datarate_test.cc.o
[CXX] test/decode_test_driver.cc.o
[CXX] test/encode_test_driver.cc.o
[CXX] test/error_resilience_test.cc.o
[CXX] test/keyframe_test.cc.o
[CXX] test/resize_test.cc.o
[CXX] test/test_libvpx.cc.o
[CXX] test/test_vector_test.cc.o
[LD] test_libvpx
[EXAMPLE] vp8cx_set_ref.c
[DEP] vp8cx_set_ref.c.d
[EXAMPLE] vp8_set_maps.c
[DEP] vp8_set_maps.c.d
[EXAMPLE] error_resilient.c
[DEP] error_resilient.c.d
[EXAMPLE] decode_with_drops.c
[DEP] decode_with_drops.c.d
[EXAMPLE] force_keyframe.c
[DEP] force_keyframe.c.d
[EXAMPLE] twopass_encoder.c
[DEP] twopass_encoder.c.d
[EXAMPLE] simple_encoder.c
[DEP] simple_encoder.c.d
[EXAMPLE] decode_to_md5.c
[DEP] decode_to_md5.c.d
[EXAMPLE] postproc.c
[DEP] postproc.c.d
[EXAMPLE] simple_decoder.c
[DEP] simple_decoder.c.d
[DEP] vp8_scalable_patterns.c.d
[DEP] vpxenc.c.d
[DEP] libmkv/EbmlWriter.c.d
[DEP] tools_common.c.d
[DEP] y4minput.c.d
[DEP] args.c.d
[DEP] vpxdec.c.d
[DEP] nestegg/src/nestegg.c.d
[DEP] nestegg/halloc/src/halloc.c.d
[CC] args.c.o
[CC] tools_common.c.o
[CC] nestegg/halloc/src/halloc.c.o
[CC] nestegg/src/nestegg.c.o
[CC] vpxdec.c.o
[LD] vpxdec
[CC] y4minput.c.o
[CC] libmkv/EbmlWriter.c.o
[CC] vpxenc.c.o
[LD] vpxenc
[CC] vp8_scalable_patterns.c.o
[LD] vp8_scalable_patterns
[CC] simple_decoder.c.o
[LD] simple_decoder
[CC] postproc.c.o
[LD] postproc
[CC] decode_to_md5.c.o
[LD] decode_to_md5
[CC] simple_encoder.c.o
[LD] simple_encoder
[CC] twopass_encoder.c.o
[LD] twopass_encoder
[CC] force_keyframe.c.o
[LD] force_keyframe
[CC] decode_with_drops.c.o
[LD] decode_with_drops
[CC] error_resilient.c.o
[LD] error_resilient
[CC] vp8_set_maps.c.o
[LD] vp8_set_maps
[CC] vp8cx_set_ref.c.o
[LD] vp8cx_set_ref
make[1]: Für das Ziel »all« ist nichts zu tun.
sudo make install
[INSTALL] /usr/local/lib/libvpx.a
[INSTALL] /usr/local/lib/libvpx.so.1.1.0
[LN] /usr/local/lib/libvpx.so
[LN] /usr/local/lib/libvpx.so.1
[LN] /usr/local/lib/libvpx.so.1.1
[INSTALL] /usr/local/lib/pkgconfig/vpx.pc
[INSTALL] /usr/local/bin/vpxdec
[INSTALL] /usr/local/bin/vpxenc
[INSTALL] /usr/local/bin/vp8_scalable_patterns
-------------- next part --------------
/usr/local/bin/ffmpeg -y -v debug -i mp4_test.mp4 -vcodec libvpx -acodec libvorbis -vf setdar='4:3' out_mp4-webm_setdar.webm
ffmpeg version 1.0.1 Copyright (c) 2000-2012 the FFmpeg developers
built on Dec 5 2012 09:51:49 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --enable-avfilter --enable-libvorbis --enable-pthreads --enable-libvpx --disable-stripping --enable-gpl --enable-postproc
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 @ 0x2416240] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2416240] ISO: File Type Major Brand: isom
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2416240] File position before avformat_find_stream_info() is 7551734
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2416240] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2416240] 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
[Parsed_setdar_0 @ 0x242ec40] a:4/3
[buffer @ 0x24132a0] Setting entry with key 'video_size' to value '720x576'
[buffer @ 0x24132a0] Setting entry with key 'pix_fmt' to value '0'
[buffer @ 0x24132a0] Setting entry with key 'time_base' to value '1/25'
[buffer @ 0x24132a0] Setting entry with key 'pixel_aspect' to value '1/1'
[buffer @ 0x24132a0] Setting entry with key 'sws_param' to value 'flags=2'
[buffer @ 0x24132a0] Setting entry with key 'frame_rate' to value '25/1'
[graph 0 input from stream 0:0 @ 0x2413160] w:720 h:576 pixfmt:yuv420p tb:1/25 fr:25/1 sar:1/1 sws_param:flags=2
[Parsed_setdar_0 @ 0x242ec40] w:720 h:576 -> dar:4/3 sar:16/15
[abuffer @ 0x24430e0] Setting entry with key 'time_base' to value '1/48000'
[abuffer @ 0x24430e0] Setting entry with key 'sample_rate' to value '48000'
[abuffer @ 0x24430e0] Setting entry with key 'sample_fmt' to value 's16'
[abuffer @ 0x24430e0] Setting entry with key 'channel_layout' to value '0x3'
[graph 1 input from stream 0:1 @ 0x2412e20] tb:1/48000 samplefmt:s16 samplerate:48000 chlayout:0x3
[aformat @ 0x2441c40] Setting entry with key 'sample_fmts' to value 'flt'
[audio format for output stream 0:1 @ 0x2443240] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed_anull_0' and the filter 'audio format for output stream 0:1'
[auto-inserted resampler 0 @ 0x24144a0] chl:stereo fmt:s16 r:48000Hz -> chl:stereo fmt:flt r:48000Hz
[libvpx @ 0x24408a0] v1.0.0
[libvpx @ 0x24408a0] --prefix=/usr --enable-pic --enable-shared --disable-install-bins --disable-install-srcs --target=x86_64-linux-gcc
[libvpx @ 0x24408a0] vpx_codec_enc_cfg
[libvpx @ 0x24408a0] generic settings
g_usage: 0
g_threads: 0
g_profile: 0
g_w: 320
g_h: 240
g_timebase: {1/30}
g_error_resilient: 0
g_pass: 0
g_lag_in_frames: 0
[libvpx @ 0x24408a0] rate control settings
rc_dropframe_thresh: 0
rc_resize_allowed: 0
rc_resize_up_thresh: 60
rc_resize_down_thresh: 30
rc_end_usage: 0
rc_twopass_stats_in: (nil)(0)
rc_target_bitrate: 256
[libvpx @ 0x24408a0] quantizer settings
rc_min_quantizer: 4
rc_max_quantizer: 63
[libvpx @ 0x24408a0] bitrate tolerance
rc_undershoot_pct: 100
rc_overshoot_pct: 100
[libvpx @ 0x24408a0] decoder buffer model
rc_buf_sz: 6000
rc_buf_initial_sz: 4000
rc_buf_optimal_sz: 5000
[libvpx @ 0x24408a0] 2 pass rate control settings
rc_2pass_vbr_bias_pct: 50
rc_2pass_vbr_minsection_pct: 0
rc_2pass_vbr_maxsection_pct: 400
[libvpx @ 0x24408a0] keyframing settings
kf_mode: 1
kf_min_dist: 0
kf_max_dist: 128
[libvpx @ 0x24408a0]
[libvpx @ 0x24408a0] vpx_codec_enc_cfg
[libvpx @ 0x24408a0] generic settings
g_usage: 0
g_threads: 0
g_profile: 0
g_w: 720
g_h: 576
g_timebase: {1/25}
g_error_resilient: 0
g_pass: 0
g_lag_in_frames: 25
[libvpx @ 0x24408a0] rate control settings
rc_dropframe_thresh: 0
rc_resize_allowed: 0
rc_resize_up_thresh: 60
rc_resize_down_thresh: 30
rc_end_usage: 0
rc_twopass_stats_in: (nil)(0)
rc_target_bitrate: 200
[libvpx @ 0x24408a0] quantizer settings
rc_min_quantizer: 4
rc_max_quantizer: 63
[libvpx @ 0x24408a0] bitrate tolerance
rc_undershoot_pct: 100
rc_overshoot_pct: 100
[libvpx @ 0x24408a0] decoder buffer model
rc_buf_sz: 6000
rc_buf_initial_sz: 4000
rc_buf_optimal_sz: 5000
[libvpx @ 0x24408a0] 2 pass rate control settings
rc_2pass_vbr_bias_pct: 50
rc_2pass_vbr_minsection_pct: 0
rc_2pass_vbr_maxsection_pct: 400
[libvpx @ 0x24408a0] keyframing settings
kf_mode: 1
kf_min_dist: 0
kf_max_dist: 128
[libvpx @ 0x24408a0]
[libvpx @ 0x24408a0] vpx_codec_control
[libvpx @ 0x24408a0] VP8E_SET_CPUUSED: 3
[libvpx @ 0x24408a0] VP8E_SET_ARNR_MAXFRAMES: 0
[libvpx @ 0x24408a0] VP8E_SET_ARNR_STRENGTH: 3
[libvpx @ 0x24408a0] VP8E_SET_ARNR_TYPE: 3
[libvpx @ 0x24408a0] VP8E_SET_NOISE_SENSITIVITY: 0
[libvpx @ 0x24408a0] VP8E_SET_TOKEN_PARTITIONS: 0
[libvpx @ 0x24408a0] VP8E_SET_STATIC_THRESHOLD: 0
[libvpx @ 0x24408a0] VP8E_SET_CQ_LEVEL: 0
[libvpx @ 0x24408a0] Using deadline: 1000000
[mpeg4 @ 0x241d320] detected 4 logical cores
Output #0, webm, to 'out_mp4-webm_setdar.webm':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf54.29.104
Stream #0:0(und), 0, 1/1000: Video: vp8, yuv420p, 720x576 [SAR 16:15 DAR 4:3], 1/25, q=-1--1, 200 kb/s, 1k tbn, 25 tbc
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : VideoHandler
Stream #0:1(und), 0, 1/1000: Audio: vorbis, 48000 Hz, stereo, flt
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (mpeg4 -> libvpx)
Stream #0:1 -> #0:1 (aac -> libvorbis)
Press [q] to stop, [?] for help
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2416240] demuxer injecting skip 1024
[aac @ 0x2426ca0] skip 1024 samples due to side data
[aac @ 0x2426ca0] skip whole frame, skip left: 0
[webm @ 0x242ed60] Writing block at offset 4481, size 35936, pts 0, dts 0, duration 40, flags 128
[webm @ 0x242ed60] Writing block at offset 40425, size 40, pts 19, dts 19, duration 3, flags 128
[webm @ 0x242ed60] Writing block at offset 40471, size 222, pts 21, dts 21, duration 12, flags 128
[webm @ 0x242ed60] Writing block at offset 40700, size 208, pts 33, dts 33, duration 21, flags 128
[webm @ 0x242ed60] Writing block at offset 40915, size 211, pts 40, dts 40, duration 40, flags 0
[webm @ 0x242ed60] Writing block at offset 41133, size 208, pts 55, dts 55, duration 21, flags 128
[webm @ 0x242ed60] Writing block at offset 41348, size 212, pts 76, dts 76, duration 21, flags 128
[webm @ 0x242ed60] Writing block at offset 41567, size 355, pts 80, dts 80, duration 40, flags 0
[webm @ 0x242ed60] Writing block at offset 41929, size 208, pts 97, dts 97, duration 21, flags 128
[webm @ 0x242ed60] Writing block at offset 42144, size 207, pts 119, dts 119, duration 21, flags 128
...
-------------- next part --------------
ffprobe -print_format json -show_format -show_streams out_mp4-webm_setdar.webm
ffprobe version 1.0.1 Copyright (c) 2007-2012 the FFmpeg developers
built on Dec 5 2012 09:51:49 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --enable-avfilter --enable-libvorbis --enable-pthreads --enable-libvpx --disable-stripping --enable-gpl --enable-postproc
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-webm_setdar.webm':
Duration: 00:00:11.33, start: 0.000000, bitrate: 276 kb/s
Stream #0:0: Video: vp8, yuv420p, 720x576, SAR 16:15 DAR 4:3, 25 fps, 25 tbr, 1k tbn, 1k tbc (default)
Stream #0:1: Audio: vorbis, 48000 Hz, stereo, s16 (default)
"streams": [
{
"index": 0,
"codec_name": "vp8",
"codec_long_name": "On2 VP8",
"codec_type": "video",
"codec_time_base": "1/1000",
"codec_tag_string": "[0][0][0][0]",
"codec_tag": "0x0000",
"width": 720,
"height": 576,
"has_b_frames": 0,
"sample_aspect_ratio": "16:15",
"display_aspect_ratio": "4:3",
"pix_fmt": "yuv420p",
"level": -99,
"r_frame_rate": "25/1",
"avg_frame_rate": "25/1",
"time_base": "1/1000",
"start_pts": 0,
"start_time": "0.000000"
},
{
"index": 1,
"codec_name": "vorbis",
"codec_long_name": "Vorbis",
"codec_type": "audio",
"codec_time_base": "1/48000",
"codec_tag_string": "[0][0][0][0]",
"codec_tag": "0x0000",
"sample_fmt": "s16",
"sample_rate": "48000",
"channels": 2,
"bits_per_sample": 0,
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/1000",
"start_pts": 0,
"start_time": "0.000000"
}
],
"format": {
"filename": "out_mp4-webm_setdar.webm",
"nb_streams": 2,
"format_name": "matroska,webm",
"format_long_name": "Matroska / WebM",
"start_time": "0.000000",
"duration": "11.332000",
"size": "391104",
"bit_rate": "276105"
}
}
More information about the ffmpeg-user
mailing list