[Ffmpeg-devel] Minimal number of frames for valid Mpeg2-Stream?

Bernhard Prell bernhard.prell
Tue Oct 11 17:36:24 CEST 2005


Dear ffmpeg-Gurus,

Background: I am using libavcodec to generate DVD-compliant files from my 
program. It's working good for "normal" films. Now I also would like to 
generate the MPEG2 Files for the DVD-navigation-menus that can be fed to 
spumux. In fact I want to produce a mpeg file that has only one(!) frame (for 
the menu background).
Obviously this doesn't seem to work: In the loop where I put the frames into 
the stream (in the same way as ouput_example.c) the first few iterations the 
videoPts-value stays zero and the resulting file is not playable...
The parameters are initialized like in ffmpeg when invoking it with the 
DVD-output format.

Question:
How to do it right? :-)
Or more specific: Is there a minimal number of frames I have to write with 
libavcodec to get a valid mpeg2 file? I already tried with GOP=0 and 1 and/or 
max_b_frames=0 and 1.

I searched the web for quite some time and experimented with the parameters 
but now I'm stuck...

Thank you very much in advance,

Bernhard





More information about the ffmpeg-devel mailing list