[FFmpeg-trac] #2190(avformat:open): yuv4mpegpipe does not preserve interlaced settings (was: Lossless codecs don't preserve interlacing)

FFmpeg trac at avcodec.org
Sat Jan 26 05:58:39 CET 2013


#2190: yuv4mpegpipe does not preserve interlaced settings
------------------------------------+------------------------------------
             Reporter:  ulatekh     |                    Owner:
                 Type:  defect      |                   Status:  open
             Priority:  normal      |                Component:  avformat
              Version:  git-master  |               Resolution:
             Keywords:  yuv4mpeg    |               Blocked By:
             Blocking:              |  Reproduced by developer:  1
Analyzed by developer:  0           |
------------------------------------+------------------------------------
Changes (by cehoyos):

 * keywords:   => yuv4mpeg
 * status:  new => open
 * component:  avcodec => avformat
 * reproduced:  0 => 1


Comment:

 For future tickets: Please always provide complete, uncut console output
 together with your command line!

 One of the problems is that the interlacing information cannot even be
 saved when storing the original stream in yuv4mpeg:
 {{{
 $ ffmpeg -i clip.yuv -f yuv4mpegpipe -|head -1
 ffmpeg version N-49300-gcfc7b9c Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Jan 26 2013 03:53:20 with gcc 4.7 (SUSE Linux)
   configuration: --enable-gpl --disable-indev=jack
   libavutil      52. 16.100 / 52. 16.100
   libavcodec     54. 91.100 / 54. 91.100
   libavformat    54. 61.104 / 54. 61.104
   libavdevice    54.  3.102 / 54.  3.102
   libavfilter     3. 33.101 /  3. 33.101
   libswscale      2.  2.100 /  2.  2.100
   libswresample   0. 17.102 /  0. 17.102
   libpostproc    52.  2.100 / 52.  2.100
 [yuv4mpegpipe @ 0x32e9f40] Estimating duration from bitrate, this may be
 inaccurate
 Input #0, yuv4mpegpipe, from 'clip.yuv':
   Duration: N/A, bitrate: N/A
     Stream #0:0: Video: rawvideo (Y41B / 0x42313459), yuv411p, 720x480,
 SAR 10:11 DAR 15:11, 29.97 fps, 29.97 tbr, 29.97 tbn, 29.97 tbc
 [yuv4mpegpipe @ 0x32f0f00] Warning: generating rarely used 4:1:1 YUV
 stream, some mjpegtools might not work.
 Output #0, yuv4mpegpipe, to 'pipe:':
   Metadata:
     encoder         : Lavf54.61.104
     Stream #0:0: Video: rawvideo (Y41B / 0x42313459), yuv411p, 720x480
 [SAR 10:11 DAR 15:11], q=2-31, 200 kb/s, 90k tbn, 29.97 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (rawvideo -> rawvideo)
 Press [q] to stop, [?] for help
 [yuv4mpegpipe @ 0x32f0f00] Encoder did not produce proper pts, making some
 up.
 YUV4MPEG2 W720 H480 F30000:1001 Ip A10:11 C411 XYSCSS=411
 }}}
 {{{
 $ ffmpeg -i clip.yuv -vcodec copy -f yuv4mpegpipe -|head -1
 ffmpeg version N-49300-gcfc7b9c Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Jan 26 2013 03:53:20 with gcc 4.7 (SUSE Linux)
   configuration: --enable-gpl --disable-indev=jack
   libavutil      52. 16.100 / 52. 16.100
   libavcodec     54. 91.100 / 54. 91.100
   libavformat    54. 61.104 / 54. 61.104
   libavdevice    54.  3.102 / 54.  3.102
   libavfilter     3. 33.101 /  3. 33.101
   libswscale      2.  2.100 /  2.  2.100
   libswresample   0. 17.102 /  0. 17.102
   libpostproc    52.  2.100 / 52.  2.100
 [yuv4mpegpipe @ 0x2a6cf80] Estimating duration from bitrate, this may be
 inaccurate
 Input #0, yuv4mpegpipe, from 'clip.yuv':
   Duration: N/A, bitrate: N/A
     Stream #0:0: Video: rawvideo (Y41B / 0x42313459), yuv411p, 720x480,
 SAR 10:11 DAR 15:11, 29.97 fps, 29.97 tbr, 29.97 tbn, 29.97 tbc
 [yuv4mpegpipe @ 0x2a73f40] Warning: generating rarely used 4:1:1 YUV
 stream, some mjpegtools might not work.
 Output #0, yuv4mpegpipe, to 'pipe:':
   Metadata:
     encoder         : Lavf54.61.104
     Stream #0:0: Video: rawvideo (Y41B / 0x42313459), yuv411p, 720x480
 [SAR 10:11 DAR 15:11], q=2-31, 29.97 fps, 90k tbn, 29.97 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
 Press [q] to stop, [?] for help
 YUV4MPEG2 W720 H480 F30000:1001 Ip A10:11 C411 XYSCSS=411
 }}}
 I sent a patch that fixes the problem here, but please note that yuv4mpeg
 is a container (and rawvideo the only codec it supports), the interlacing
 information that is stored in yuv4mpeg should be stored in the container
 you use to store the chosen codec, avi cannot store this information
 afaict, mov does. (Huffyuv might be theoretically able to store the
 information, but I was unable to find original source code or
 specification that would explain the exact meaning of the extradata, and
 even if we found it, it would not be supported by the original codec
 because it was added later in an experimental version.)
 http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/158164

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2190#comment:1>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list