[FFmpeg-devel] Change bitrate on-the-fly

Llorx dallorx at gmail.com
Sun Jul 31 19:32:23 EEST 2016


Hi,

About 1 or 2 years ago I had written an addition for ffmpeg to change the
video bitrate while ffmpeg is running. The way I've done it is by listening
to a UDP socket for an int32, and each time a 4 byte packet enters, changes
the bitrate, taking effect instantly. Works like a charm, and the UDP way
fits my needings without problems. I needed it because currently I have a
business that requires streaming video in some difficult and
bandwith-changing environments, so I have a thrid party program than
launchs ffmpeg and analyzes the packets sent to detect bandwidth
alterations, changing the bitrate accordingly.

Now I would like to share it with the community, as I had some messages
from some users telling me to release it (As I posted a question about this
on Stack Overflow).

I know that the UDP thing is a bit hackish, so I would like to ask you,
ffmpeg masters, how do you consider that this can be applied in a more
"professional" way. I thought that instead of listening to a UDP socket
(configurable at launch time with a parameter), I can use named pipes,
memory mapped files or simply process signaling. The last method is only
available on Unix with SA_SIGINFO. Windows can't handle such signal
behaviour.

What do you think is the best option?


More information about the ffmpeg-devel mailing list