From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id E1FDB4B0D2 for ; Tue, 28 May 2024 15:38:29 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B3D6D68D44A; Tue, 28 May 2024 18:38:26 +0300 (EEST) Received: from b-painless.mh.aa.net.uk (b-painless.mh.aa.net.uk [81.187.30.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CD4A768CCDC for ; Tue, 28 May 2024 18:38:19 +0300 (EEST) Received: from 0.e.f.0.c.8.2.e.1.0.c.4.0.c.3.6.0.5.8.0.9.1.8.0.0.b.8.0.1.0.0.2.ip6.arpa ([2001:8b0:819:850:63c0:4c01:e28c:fe0] helo=andrews-2024-laptop.sayers) by painless-b.tch.aa.net.uk with smtp (Exim 4.96) (envelope-from ) id 1sByu2-007C8L-2b for ffmpeg-devel@ffmpeg.org; Tue, 28 May 2024 16:38:19 +0100 Date: Tue, 28 May 2024 16:38:18 +0100 From: Andrew Sayers To: FFmpeg development discussions and patches Message-ID: References: <20240527124947.55154-1-xaionaro@dx.center> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240527124947.55154-1-xaionaro@dx.center> Subject: Re: [FFmpeg-devel] [PATCH] avcodec/mediacodec: Add support of dynamic bitrate X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: 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-request@ffmpeg.org with subject "unsubscribe".