[FFmpeg-trac] #5743(undetermined:new): SAR changes when stream copying y4m video to Matroska when SAR is present in source

FFmpeg trac at avcodec.org
Thu Jul 28 11:52:02 EEST 2016


#5743: SAR changes when stream copying y4m video to Matroska when SAR is present
in source
-------------------------------------+-------------------------------------
             Reporter:  kieranjol    |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:  matroska,    |               Blocked By:
  y4m, SAR, DAR                      |  Reproduced by developer:  0
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug: Y4m videos that are stream copied to Matroska can have
 a different SAR.

 Input.y4m = Video: rawvideo (I420 / 0x30323449), yuv420p,
 176x144, SAR 128:117 DAR 1408:1053

 Out.mkv =  Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p,
 176x144, SAR 193:176 DAR 193:144

 Raised on ffmpeg-user, Carl Eugen Hoyos asked me to file a ticket:
 https://lists.ffmpeg.org/pipermail/ffmpeg-user/2016-July/032774.html

 How to reproduce: Source can be downloaded from here
 https://media.xiph.org/video/derf/y4m/bus_qcif_15fps.y4m

 {{{
 %  ffmpeg -i bus_qcif_15fps.y4m -c copy out.mkv
 ffmpeg version N-44317-g7af44ce Copyright (c) 2000-2016 the FFmpeg
 developers
   built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
   configuration:
 --prefix=/home/kieranjol/.linuxbrew/Cellar/ffmpeg/HEAD --enable-shared
 --enable-pthreads --enable-gpl --enable-version3
 --enable-hardcoded-tables --enable-avresample --cc=/usr/bin/gcc-4.8
 --host-cflags='-Os -w -pipe -march=core2'
 --host-ldflags='-L/home/kieranjol/.linuxbrew/lib
 -Wl,--dynamic-linker=/home/kieranjol/.linuxbrew/lib/ld.so
 -Wl,-rpath,/home/kieranjol/.linuxbrew/lib' --enable-libx264
 --enable-libmp3lame --enable-libxvid --enable-vda
   libavutil      55. 28.100 / 55. 28.100
   libavcodec     57. 50.100 / 57. 50.100
   libavformat    57. 41.100 / 57. 41.100
   libavdevice    57.  0.102 / 57.  0.102
   libavfilter     6. 47.100 /  6. 47.100
   libavresample   3.  0.  0 /  3.  0.  0
   libswscale      4.  1.100 /  4.  1.100
   libswresample   2.  1.100 /  2.  1.100
   libpostproc    54.  0.100 / 54.  0.100
 Input #0, yuv4mpegpipe, from 'bus_qcif_15fps.y4m':
   Duration: 00:00:05.00, start: 0.000000, bitrate: 4562 kb/s
     Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p,
 176x144, SAR 128:117 DAR 1408:1053, 15 fps, 15 tbr, 15 tbn, 15 tbc
 File 'out.mkv' already exists. Overwrite ? [y/N] y
 [matroska @ 0x21ba860] Using AVStream.codec to pass codec parameters
 to muxers is deprecated, use AVStream.codecpar instead.
 Output #0, matroska, to 'out.mkv':
   Metadata:
     encoder         : Lavf57.41.100
     Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 176x144
 [SAR 128:117 DAR 1408:1053], q=2-31, 15 fps, 15 tbr, 1k tbn, 15 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
 Press [q] to stop, [?] for help
 frame=   75 fps=0.0 q=-1.0 Lsize=    2788kB time=00:00:04.93
 bitrate=4629.1kbits/s speed= 115x
 video:2784kB audio:0kB subtitle:0kB other streams:0kB global
 headers:0kB muxing overhead: 0.134154%


 2.


 ffmpeg -i out.mkv
 ffmpeg version N-44317-g7af44ce Copyright (c) 2000-2016 the FFmpeg
 developers
   built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
   configuration:
 --prefix=/home/kieranjol/.linuxbrew/Cellar/ffmpeg/HEAD --enable-shared
 --enable-pthreads --enable-gpl --enable-version3
 --enable-hardcoded-tables --enable-avresample --cc=/usr/bin/gcc-4.8
 --host-cflags='-Os -w -pipe -march=core2'
 --host-ldflags='-L/home/kieranjol/.linuxbrew/lib
 -Wl,--dynamic-linker=/home/kieranjol/.linuxbrew/lib/ld.so
 -Wl,-rpath,/home/kieranjol/.linuxbrew/lib' --enable-libx264
 --enable-libmp3lame --enable-libxvid --enable-vda
   libavutil      55. 28.100 / 55. 28.100
   libavcodec     57. 50.100 / 57. 50.100
   libavformat    57. 41.100 / 57. 41.100
   libavdevice    57.  0.102 / 57.  0.102
   libavfilter     6. 47.100 /  6. 47.100
   libavresample   3.  0.  0 /  3.  0.  0
   libswscale      4.  1.100 /  4.  1.100
   libswresample   2.  1.100 /  2.  1.100
   libpostproc    54.  0.100 / 54.  0.100
 Input #0, matroska,webm, from 'out.mkv':
   Metadata:
     ENCODER         : Lavf57.41.100
   Duration: 00:00:05.00, start: 0.000000, bitrate: 4568 kb/s
     Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p,
 176x144, SAR 193:176 DAR 193:144, 15 fps, 15 tbr, 1k tbn, 1k tbc
 (default)
     Metadata:
       DURATION        : 00:00:05.000000000
 At least one output file must be specified
 }}}

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


More information about the FFmpeg-trac mailing list