[FFmpeg-devel] Number of bytes read at a time

Jon Dufresne jon.dufresne
Wed Jul 11 23:04:45 CEST 2007


In my program I created a custom protocol for ffmpeg that reads
streaming data off a custom piece of hardware in the form of an mpeg2
transport stream.

I've noticed that every time ffmpeg reads the device it requests 32768
(0x8000) bytes of data. Usually this is read in 10-12ms, but I have
witnessed occasional times where it takes 30-40ms. Since this is more
than 33 ms this is longer than the time of one frame (29.97 fps).

Is there a way that I can reduce the number of bytes read at once? Is
there some parameter to set in the Protocol struct or the FormatContext?

I think if it read fewer bytes at a time then I would be more successful
at getting a frame in time.


More information about the ffmpeg-devel mailing list