[FFmpeg-trac] #2190(avformat:open): yuv4mpegpipe does not preserve interlaced settings
FFmpeg
trac at avcodec.org
Sat Jan 26 17:21:38 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 |
------------------------------------+------------------------------------
Comment (by ulatekh):
Thank you for looking into this!
I applied your patch, and seem to be having different problems now.
Here's the result of "ffmpeg -i clip.yuv -vcodec copy clip.mov":
{{{
ffmpeg version 1.1.git Copyright (c) 2000-2013 the FFmpeg developers
built on Jan 26 2013 09:02:24 with gcc 4.7.2 (GCC) 20120921 (Red Hat
4.7.2-2)
configuration: --prefix=/usr --bindir=/usr/bin
--datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib
--mandir=/usr/share/man --arch=athlon --extra-cflags='-O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-
size=4 -m32 -march=athlon -fasynchronous-unwind-tables' --enable-bzlib
--disable-crystalhd --enable-gnutls --enable-libass --enable-libcdio
--enable-libcelt --enable-libdc1394 --disable-indev=jack --enable-
libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-
libopenjpeg --enable-libpulse --enable-librtmp --enable-libschroedinger
--enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2
--enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
--enable-avfilter --enable-postproc --enable-pthreads --disable-static
--enable-shared --enable-gpl --disable-debug --disable-stripping
--shlibdir=/usr/lib --cpu=athlon --enable-runtime-cpudetect
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 @ 0x847e560] 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
Output #0, mov, to 'clip.mov':
Metadata:
encoder : Lavf54.61.104
Stream #0:0: Video: rawvideo (raw / 0x20776172), yuv411p, 720x480
[SAR 10:11 DAR 15:11], q=2-31, 29.97 fps, 30k tbn, 29.97 tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame= 3 fps=0.0 q=-1.0 Lsize= 1520kB time=00:00:00.10
bitrate=124357.7kbits/s
video:1519kB audio:0kB subtitle:0 global headers:0kB muxing overhead
0.053112%
}}}
It seems to make a valid archive, but now I can't decode it...here's the
output from "ffmpeg -i clip.mov -vcodec rawvideo -f yuv4mpegpipe - | head
-1":
{{{
ffmpeg version 1.1.git Copyright (c) 2000-2013 the FFmpeg developers
built on Jan 26 2013 09:02:24 with gcc 4.7.2 (GCC) 20120921 (Red Hat
4.7.2-2)
configuration: --prefix=/usr --bindir=/usr/bin
--datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib
--mandir=/usr/share/man --arch=athlon --extra-cflags='-O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-
size=4 -m32 -march=athlon -fasynchronous-unwind-tables' --enable-bzlib
--disable-crystalhd --enable-gnutls --enable-libass --enable-libcdio
--enable-libcelt --enable-libdc1394 --disable-indev=jack --enable-
libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-
libopenjpeg --enable-libpulse --enable-librtmp --enable-libschroedinger
--enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2
--enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
--enable-avfilter --enable-postproc --enable-pthreads --disable-static
--enable-shared --enable-gpl --disable-debug --disable-stripping
--shlibdir=/usr/lib --cpu=athlon --enable-runtime-cpudetect
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
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'clip.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
encoder : Lavf54.61.104
Duration: 00:00:00.10, start: 0.000000, bitrate: 123249 kb/s
Stream #0:0(eng): Video: rawvideo (raw / 0x20776172), rgb24, 720x480,
124291 kb/s, SAR 10:11 DAR 15:11, 29.97 fps, 29.97 tbr, 30k tbn, 30k tbc
Metadata:
handler_name : DataHandler
[yuv4mpegpipe @ 0x99f44f0] ERROR: yuv4mpeg can only handle yuv444p,
yuv422p, yuv420p, yuv411p and gray8 pixel formats. And using 'strict -1'
also yuv444p9, yuv422p9, yuv420p9, yuv444p10, yuv422p10, yuv420p10,
yuv444p12, yuv422p12, yuv420p12, yuv444p14, yuv422p14, yuv420p14,
yuv444p16, yuv422p16, yuv420p16 and gray16 pixel formats. Use -pix_fmt to
select one.
Output #0, yuv4mpegpipe, to 'pipe:':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
encoder : Lavf54.61.104
Stream #0:0(eng): Video: rawvideo (RGB[24] / 0x18424752), rgb24,
720x480 [SAR 10:11 DAR 15:11], q=2-31, 200 kb/s, 90k tbn, 29.97 tbc
Metadata:
handler_name : DataHandler
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> rawvideo)
Could not write header for output file #0 (incorrect codec parameters ?):
Input/output error
}}}
Since it seems to want a pixel format, I tried "ffmpeg -i clip.mov -vcodec
rawvideo -pix_fmt yuv411p -f yuv4mpegpipe - | head -1" and got:
{{{
ffmpeg version 1.1.git Copyright (c) 2000-2013 the FFmpeg developers
built on Jan 26 2013 09:02:24 with gcc 4.7.2 (GCC) 20120921 (Red Hat
4.7.2-2)
configuration: --prefix=/usr --bindir=/usr/bin
--datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib
--mandir=/usr/share/man --arch=athlon --extra-cflags='-O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-
size=4 -m32 -march=athlon -fasynchronous-unwind-tables' --enable-bzlib
--disable-crystalhd --enable-gnutls --enable-libass --enable-libcdio
--enable-libcelt --enable-libdc1394 --disable-indev=jack --enable-
libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-
libopenjpeg --enable-libpulse --enable-librtmp --enable-libschroedinger
--enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2
--enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
--enable-avfilter --enable-postproc --enable-pthreads --disable-static
--enable-shared --enable-gpl --disable-debug --disable-stripping
--shlibdir=/usr/lib --cpu=athlon --enable-runtime-cpudetect
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
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'clip.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
encoder : Lavf54.61.104
Duration: 00:00:00.10, start: 0.000000, bitrate: 123249 kb/s
Stream #0:0(eng): Video: rawvideo (raw / 0x20776172), rgb24, 720x480,
124291 kb/s, SAR 10:11 DAR 15:11, 29.97 fps, 29.97 tbr, 30k tbn, 30k tbc
Metadata:
handler_name : DataHandler
[yuv4mpegpipe @ 0x9bc2640] Warning: generating rarely used 4:1:1 YUV
stream, some mjpegtools might not work.
Output #0, yuv4mpegpipe, to 'pipe:':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
encoder : Lavf54.61.104
Stream #0:0(eng): Video: rawvideo (Y41B / 0x42313459), yuv411p,
720x480 [SAR 10:11 DAR 15:11], q=2-31, 200 kb/s, 90k tbn, 29.97 tbc
Metadata:
handler_name : DataHandler
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> rawvideo)
Press [q] to stop, [?] for help
[rawvideo @ 0x9bbad20] Invalid buffer size, packet size 518400 < expected
length 1036800
Error while decoding stream #0:0: Invalid argument
[rawvideo @ 0x9bbad20] Invalid buffer size, packet size 518400 < expected
length 1036800
Error while decoding stream #0:0: Invalid argument
[rawvideo @ 0x9bbad20] Invalid buffer size, packet size 518400 < expected
length 1036800
Error while decoding stream #0:0: Invalid argument
frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=00:00:00.00 bitrate=N/A
video:0kB audio:0kB subtitle:0 global headers:0kB muxing overhead -nan%
Output file is empty, nothing was encoded (check -ss / -t / -frames
parameters if used)
}}}
kdenlive can read the .mov file, but the picture is all white, and it
still thinks it's progressive.
If I do the same thing, but with "-vcodec huffyuv" instead of "-vcodec
copy", I can decode it without a "pix_fmt" argument, but it still comes
out progressive.
Thank you once again for looking into this!
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2190#comment:2>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list