[FFmpeg-trac] #3528(undetermined:new): Ffmpeg does not maintain or store the aspect ratio with WMV2 and libxvid codecs

FFmpeg trac at avcodec.org
Thu Apr 3 16:20:07 CEST 2014


#3528: Ffmpeg does not maintain or store the aspect ratio with WMV2 and libxvid
codecs
-------------------------------------+-------------------------------------
             Reporter:  ramitbhalla  |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug: When using libxvid or wmv2 ffmpeg does not store or
 maintain the aspect ratio.

 Whether one specifies the -aspect or setsar it doesn't seem to make any
 difference. When played back in WMP the aspect ratio is not preserved.

 I will upload a sample video which has 16:9 aspect ratio and plays back
 fine in WMP. When converted using wmv2 or libxvid, when played back in WMP
 it shows as a 4:3 (with wmv2 it doesn't seem to store the aspect ratio,
 with libxvid it appears to store it but when played back in WMP it still
 shows up as 4:3, for some reason it isnn't storing it correctly).

 I will upload the same file as below (cut down in size and renamed)

 One examples of wmv2 below (you can also use libxvid instead)
 How to reproduce:
 {{{
 ffmpeg.2315Custom1.exe -i "..\The Bridges That Built London... (BBC FOUR -
 14-06-20
 12).ts" -vcodec wmv2 -b 1400000 -acodec wmav2 -ab 192k test.wmv
 ffmpeg version N-62019-gd506dea Copyright (c) 2000-2014 the FFmpeg
 developers
   built on Apr  1 2014 13:31:14 with gcc 4.8.0 (GCC)
   configuration: --arch=x86 --target-os=mingw32 --cross-
 prefix=/Software/ffmpeg/sandbox/mingw-w64-i686/bin/i686-w64-ming
 w32- --pkg-config=pkg-config --enable-gpl --enable-libx264 --enable-
 avisynth --enable-libxvid --enable-libmp3lame --enab
 le-version3 --enable-zlib --enable-librtmp --enable-libvorbis --enable-
 libtheora --enable-libspeex --enable-libopenjpeg
 --enable-gnutls --enable-libgsm --enable-libfreetype --enable-libopus
 --disable-w32threads --enable-frei0r --enable-filt
 er=frei0r --enable-libvo-aacenc --enable-bzlib --enable-libxavs --extra-
 cflags=-DPTW32_STATIC_LIB --enable-libopencore-a
 mrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-
 libschroedinger --enable-libvpx --enable-libilbc --pref
 ix=/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32 --enable-
 static --disable-shared --enable-libsoxr --enable-f
 ontconfig --enable-libass --enable-libutvideo --enable-libbluray --enable-
 iconv --enable-libtwolame --extra-cflags=-DLIB
 TWOLAME_STATIC --enable-libzvbi --enable-libcaca --enable-libmodplug
 --extra-libs=-lstdc++ --extra-libs=-lpng --enable-l
 ibvidstab --extra-cflags= --extra-cflags= --enable-nonfree --enable-
 libfdk-aac --enable-libfaac --enable-runtime-cpudete
 ct
   libavutil      52. 71.100 / 52. 71.100
   libavcodec     55. 55.107 / 55. 55.107
   libavformat    55. 36.100 / 55. 36.100
   libavdevice    55. 11.100 / 55. 11.100
   libavfilter     4.  3.100 /  4.  3.100
   libswscale      2.  5.102 /  2.  5.102
   libswresample   0. 18.100 /  0. 18.100
   libpostproc    52.  3.100 / 52.  3.100
 [NULL @ 034f3d60] start time is not set in estimate_timings_from_pts
 Input #0, mpegts, from '..\The Bridges That Built London... (BBC FOUR -
 14-06-2012).ts':
   Duration: 00:01:38.16, start: 0.151678, bitrate: 4310 kb/s
   Program 1
     Stream #0:0[0x30]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
 yuv420p(tv), 720x576 [SAR 64:45 DAR 16:9], max.
  15000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
     Stream #0:1[0x40](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
 stereo, s16p, 256 kb/s
     Stream #0:2[0x50](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
 Please use -b:a or -b:v, -b is ambiguous
 Output #0, asf, to 'test.wmv':
   Metadata:
     WM/EncodingSettings: Lavf55.36.100
     Stream #0:0: Video: wmv2 (WMV2 / 0x32564D57), yuv420p, 720x576 [SAR
 64:45 DAR 16:9], q=2-31, 1400 kb/s, 1k tbn, 25 t
 bc
     Stream #0:1(eng): Audio: wmav2 (a[1][0][0] / 0x0161), 48000 Hz,
 stereo, fltp, 192 kb/s
 Stream mapping:
   Stream #0:0 -> #0:0 (mpeg2video -> wmv2)
   Stream #0:1 -> #0:1 (mp2 -> wmav2)
 Press [q] to stop, [?] for help
 frame= 2455 fps= 70 q=5.1 Lsize=   19720kB time=00:01:38.20
 bitrate=1645.1kbits/s
 video:16771kB audio:2300kB subtitle:0kB other streams:0kB global
 headers:0kB muxing overhead: 3.402935%
 }}}
 {{{
 ffmpeg.2315Custom1.exe -i test.wmv
 ffmpeg version N-62019-gd506dea Copyright (c) 2000-2014 the FFmpeg
 developers
   built on Apr  1 2014 13:31:14 with gcc 4.8.0 (GCC)
   configuration: --arch=x86 --target-os=mingw32 --cross-
 prefix=/Software/ffmpeg/sandbox/mingw-w64-i686/bin/i686-w64-ming
 w32- --pkg-config=pkg-config --enable-gpl --enable-libx264 --enable-
 avisynth --enable-libxvid --enable-libmp3lame --enab
 le-version3 --enable-zlib --enable-librtmp --enable-libvorbis --enable-
 libtheora --enable-libspeex --enable-libopenjpeg
 --enable-gnutls --enable-libgsm --enable-libfreetype --enable-libopus
 --disable-w32threads --enable-frei0r --enable-filt
 er=frei0r --enable-libvo-aacenc --enable-bzlib --enable-libxavs --extra-
 cflags=-DPTW32_STATIC_LIB --enable-libopencore-a
 mrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-
 libschroedinger --enable-libvpx --enable-libilbc --pref
 ix=/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32 --enable-
 static --disable-shared --enable-libsoxr --enable-f
 ontconfig --enable-libass --enable-libutvideo --enable-libbluray --enable-
 iconv --enable-libtwolame --extra-cflags=-DLIB
 TWOLAME_STATIC --enable-libzvbi --enable-libcaca --enable-libmodplug
 --extra-libs=-lstdc++ --extra-libs=-lpng --enable-l
 ibvidstab --extra-cflags= --extra-cflags= --enable-nonfree --enable-
 libfdk-aac --enable-libfaac --enable-runtime-cpudete
 ct
   libavutil      52. 71.100 / 52. 71.100
   libavcodec     55. 55.107 / 55. 55.107
   libavformat    55. 36.100 / 55. 36.100
   libavdevice    55. 11.100 / 55. 11.100
   libavfilter     4.  3.100 /  4.  3.100
   libswscale      2.  5.102 /  2.  5.102
   libswresample   0. 18.100 /  0. 18.100
   libpostproc    52.  3.100 / 52.  3.100
 Guessed Channel Layout for  Input Stream #0.1 : stereo
 Input #0, asf, from 'test.wmv':
   Metadata:
     encoder         : Lavf55.36.100
   Duration: 00:01:38.29, start: 0.000000, bitrate: 1643 kb/s
     Stream #0:0: Video: wmv2 (WMV2 / 0x32564D57), yuv420p, 720x576, 25
 tbr, 1k tbn, 1k tbc
     Stream #0:1: Audio: wmav2 (a[1][0][0] / 0x0161), 48000 Hz, stereo,
 fltp, 192 kb/s
 At least one output file must be specified}}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/3528>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list