On Mon, May 27, 2024 at 01:49:47PM +0100, Dmitrii Okunev wrote: > MediaCodec supports parameter "video-bitrate" to change the bitrate > on fly. This commit add possibility to use it. > > It adds option -bitrate_ctrl_socket to the encoder which makes > the encoder to create an UNIX socket and listen for messages > to change the bitrate. > > An example of ffmpeg execution: > > ffmpeg -listen 1 -i rtmp://0.0.0.0:1935/live/myStream -c:v > hevc_mediacodec -bitrate_ctrl_socket /run/bitrate.sock -b:v 8M -f rtsp > rtsp://127.0.0.1:1935/live/reEncoded > > An example of changing the bitrate to 1000 BPS: > > printf '%016X' 1000 | xxd -r -p | socat -u STDIN UNIX:/run/bitrate.sock
Nitpick: please do s/\* / \*/g on the following lines: > + const FFAMediaFormat* format_ctx) > +static int mediacodec_ndk_setParameters(FFAMediaCodec* ctx, > + const FFAMediaFormat* format_ctx) > + int (*setParameters)(FFAMediaCodec* codec, const FFAMediaFormat* format); (found by an in-progress review bot) _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".