[FFmpeg-user] Bad keyframes when encoding to the ogg container format
Robert McIntyre
rlm at mit.edu
Sat Feb 11 13:07:08 CET 2012
Again, this is using the test images in the archive from here:
http://aurellem.org/test-pics.tar.bz2.
First I'll create a ogg file with my old ffmpeg:
****************************
[~/proj/cortex/render] $ /usr/xuggler/bin/ffmpeg -r 25 -i
test-pics/%07d.png -b 90
00k -vcodec libtheora out-old.ogg
FFmpeg version SVN-r21566-xuggle-3.4.843, Copyright (c) 2000-2010
Fabrice Bellard,
et al.
built on Jan 31 2010 16:26:43 with gcc 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
configuration: --prefix=/usr/local --extra-version=xuggle-3.4.843
--extra-cflags
=-I/home/hudson/slave/workspace/xuggle_xuggler_binary_build/jdk/JDK5/label/Linux_x
86_64/build/native/x86_64-unknown-linux-gnu/captive/usr/local/include
--extra-ldfl
ags=-L/home/hudson/slave/workspace/xuggle_xuggler_binary_build/jdk/JDK5/label/Linu
x_x86_64/build/native/x86_64-unknown-linux-gnu/captive/usr/local/lib
--enable-shar
ed --enable-gpl --enable-nonfree --enable-version3 --enable-libx264
--enable-libmp
3lame --enable-libvorbis --enable-libtheora --enable-libspeex
--enable-libfaac --e
nable-libopencore-amrnb --enable-libopencore-amrwb --enable-pthreads
libavutil 50. 8. 0 / 50. 8. 0
libavcodec 52.49. 0 / 52.49. 0
libavformat 52.48. 0 / 52.48. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 9. 0 / 0. 9. 0
Input #0, image2, from 'test-pics/%07d.png':
Duration: 00:00:02.00, start: 0.000000, bitrate: N/A
Stream #0.0: Video: png, pal8, 1280x550, 25 fps, 25 tbr, 25 tbn, 25 tbc
Output #0, ogg, to 'out-old.ogg':
Stream #0.0: Video: libtheora, yuv420p, 1280x550, q=2-31, 9000
kb/s, 25 tbn, 2
5 tbc
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
Input Stream #0.0 frame size changed to 1280x550, bgratrate= 465.8kbits/s
frame= 50 fps= 22 q=0.0 Lsize= 229kB time=2.00 bitrate= 939.0kbits/s
video:224kB audio:0kB global headers:3kB muxing overhead 0.936533%
*****************************
Now I will read in that file with the new ffmpeg:
*****************************
[~/proj/cortex/render] $ ffmpeg -i out-old.ogg
ffmpeg version N-37771-gfd0b8d5 Copyright (c) 2000-2012 the FFmpeg developers
built on Feb 11 2012 11:39:48 with gcc 4.5.2
configuration: --prefix=/usr --mandir=/usr/man --enable-x11grab
--enable-gpl --e
nable-shared --disable-static --enable-gray --enable-libtheora
--enable-libvorbis
--enable-libxvid --enable-libxvid --enable-libx264 --enable-gnutls
--enable-bzlib
--enable-libmp3lame --enable-pic --disable-stripping
libavutil 51. 39.100 / 51. 39.100
libavcodec 54. 1.100 / 54. 1.100
libavformat 54. 0.100 / 54. 0.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 62.100 / 2. 62.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, ogg, from 'out-old.ogg':
Duration: 00:00:02.00, start: 0.000000, bitrate: 938 kb/s
Stream #0:0: Video: theora, yuv420p, 1280x550 [SAR 1:1 DAR
128:55], 25 tbr, 25
tbn, 25 tbc
At least one output file must be specified
*****************************
As you can see, no reports of broken keyframes.
Now I will create the same file with my new ffmpeg
*****************************
[~/proj/cortex/render] $ ffmpeg -r 25 -i test-pics/%07d.png -b:v 9000k
-vcodec libtheora out-new.ogg
ffmpeg version N-37771-gfd0b8d5 Copyright (c) 2000-2012 the FFmpeg developers
built on Feb 11 2012 11:39:48 with gcc 4.5.2
configuration: --prefix=/usr --mandir=/usr/man --enable-x11grab
--enable-gpl --e
nable-shared --disable-static --enable-gray --enable-libtheora
--enable-libvorbis
--enable-libxvid --enable-libxvid --enable-libx264 --enable-gnutls
--enable-bzlib
--enable-libmp3lame --enable-pic --disable-stripping
libavutil 51. 39.100 / 51. 39.100
libavcodec 54. 1.100 / 54. 1.100
libavformat 54. 0.100 / 54. 0.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 62.100 / 2. 62.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, image2, from 'test-pics/%07d.png':
Duration: 00:00:02.00, start: 0.000000, bitrate: N/A
Stream #0:0: Video: png, pal8, 1280x550, 25 fps, 25 tbr, 25 tbn, 25 tbc
Incompatible pixel format 'pal8' for codec 'libtheora', auto-selecting
format 'yuv
420p'
[buffer @ 0x1b58540] w:1280 h:550 pixfmt:pal8 tb:1/1000000 sar:0/1 sws_param:
[buffersink @ 0x1b516e0] auto-inserting filter 'auto-inserted scale 0'
between the
filter 'src' and the filter 'out'
[scale @ 0x1b68100] w:1280 h:550 fmt:pal8 -> w:1280 h:550 fmt:yuv420p flags:0x4
Output #0, ogg, to 'out-new.ogg':
Metadata:
encoder : Lavf54.0.100
Stream #0:0: Video: theora, yuv420p, 1280x550, q=2-31, 9000 kb/s,
25 tbn, 25 t
bc
Stream mapping:
Stream #0:0 -> #0:0 (png -> libtheora)
Press [q] to stop, [?] for help
frame= 14 fps= 0 q=0.0 size= 29kB time=00:00:00.52 bitrate=
461.6kbits/s
Buffer video input changed from size:1280x550 fmt:pal8 to
size:1280x550 fmt:rgba
[scale @ 0x1b68100] w:1280 h:550 fmt:rgba -> w:1280 h:550 fmt:yuv420p flags:0x2
frame= 26 fps= 26 q=0.0 size= 55kB time=00:00:01.04 bitrate=
435.8kbits/s
frame= 38 fps= 25 q=0.0 size= 82kB time=00:00:01.52 bitrate=
443.1kbits/s
frame= 49 fps= 24 q=0.0 size= 109kB time=00:00:01.96 bitrate=
455.2kbits/s
frame= 50 fps= 23 q=0.0 Lsize= 228kB time=00:00:02.00 bitrate=
935.1kbits/s
video:224kB audio:0kB global headers:3kB muxing overhead 0.561803%
*****************************
Reading this file back in with my new ffmpeg I get this:
*****************************
[~/proj/cortex/render] $ ffmpeg -i out-new.ogg
ffmpeg version N-37771-gfd0b8d5 Copyright (c) 2000-2012 the FFmpeg developers
built on Feb 11 2012 11:39:48 with gcc 4.5.2
configuration: --prefix=/usr --mandir=/usr/man --enable-x11grab
--enable-gpl --e
nable-shared --disable-static --enable-gray --enable-libtheora
--enable-libvorbis
--enable-libxvid --enable-libxvid --enable-libx264 --enable-gnutls
--enable-bzlib
--enable-libmp3lame --enable-pic --disable-stripping
libavutil 51. 39.100 / 51. 39.100
libavcodec 54. 1.100 / 54. 1.100
libavformat 54. 0.100 / 54. 0.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 62.100 / 2. 62.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
libpostproc 52. 0.100 / 52. 0.100
[ogg @ 0x2017de0] Broken file, keyframes not correctly marked.
Input #0, ogg, from 'out-new.ogg':
Duration: 00:00:02.00, start: 0.000000, bitrate: 935 kb/s
Stream #0:0: Video: theora, yuv420p, 1280x550 [SAR 1:1 DAR
128:55], 25 tbr, 25
tbn, 25 tbc
At least one output file must be specified
*****************************
I've uploaded both video files here:
http://aurellem.org/out-new.ogg
http://aurellem.org/out-old.ogg
The images used to generate these files again are here:
http://aurellem.org/test-pics.tar.bz2
sincerely,
--Robert McIntyre
More information about the ffmpeg-user
mailing list