[FFmpeg-devel] ogg encode issues

Frank Barchard fbarchard
Tue Jun 30 18:32:01 CEST 2009


While encoding Ogg videos I've run into a several issues or limitations with
ffmpeg's version (as of 19289)1. vorbis audio is limited to 48khz
2. size limitation - 1920x1080 does not work. 1920x800 does.
3. ffmpeg ogg mux produces files that don't play back at correct rate. 4.
ffmpeg ogg vorbis audio produces corrupt files
more details for each

1. vorbis audio is limited to 48 Khz.
ie this works

ffmpeg -y -i color48000_2.wav -acodec libvorbis color2.ogg

*This fails

ffmpeg -y -i color96000_2.wav -acodec libvorbis color2.ogg

Error while opening encoder for output stream #0.0 - maybe incorrect
parameters such as bit_rate, rate, width or height

oggenc can do 96k

oggenc2 -o color1.ogg color96000_1.wav


2. size limitation - 1920x1080 crashes ffmpeg encoder.  1920x800 works okay.

this fails

ffmpeg -y -s 1920x1080 -r 29.97 -i red.1920x1080_30Hz_P420.yuv -b
4000000 -vcodec libtheora -an red.ogv

this works

ffmpeg -y -s 1920x1080 -r 29.97 -i red.1920x1080_30Hz_P420.yuv -s
1280x720 -b 2000000 -vcodec libtheora -an red.ogv

3. ffmpeg mux produces files that don't play back at correct rate.

This fails

ffmpeg -y -i sync2.ogg -i sync.ogv -vcodec copy -acodec copy sync2.ogv

but this works

oggz-merge sync2.ogg sync.ogv -o sync2.ogv

both produce playable files, but the ffmpeg one is out of audio
sync... framerate goes fast for awhile, then slow.

ie use mplayer to test

mplayer sync2.ogv

4. ffmpeg for ogg audio produces corrupt files

This has improved recently... it used to say the files were produced
with a buggy encoder.  But there is still an issue relating to audio.
It works on most files, so its data sensitive.

This fails:

ffmpeg -y -i sync2.wav -acodec libvorbis sync2.ogg

oggz-merge sync2.ogg sync.ogv -o sync2.ogv

oggz-info sync2.ogv
Content-Duration: 00:03:00.180

Theora: serialno 0000000000
        6610 packets in 6610 pages, 1.0 packets/page, 0.993% Ogg overhead

This works:

oggenc2 -o sync2.ogg sync2.wav

oggz-merge sync2.ogg sync.ogv -o sync2.ogv

oggz-info sync2.ogv
Content-Duration: 00:03:00.180

Theora: serialno 0000000000
        5403 packets in 5403 pages, 1.0 packets/page, 0.885% Ogg overhead
        Video-Framerate: 29.970 fps
        Video-Width: 720
        Video-Height: 480

Vorbis: serialno 0000029728
        10054 packets in 42 pages, 239.4 packets/page, 8.086% Ogg overhead
        Audio-Samplerate: 44100 Hz
        Audio-Channels: 2


*



More information about the ffmpeg-devel mailing list