Without this it looks like the encoder runs at 128 kbit/s

/Tomas
From 5c913a3eaf5cf8c21edc119870b7fdc8251bd900 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <g...@haerdin.se>
Date: Fri, 29 Dec 2023 14:09:51 +0100
Subject: [PATCH 2/7] lavc/libcodec2: Report actual bitrate used both when
 decoding and encoding

---
 libavcodec/libcodec2.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/libcodec2.c b/libavcodec/libcodec2.c
index 950d48685e..2e03236b81 100644
--- a/libavcodec/libcodec2.c
+++ b/libavcodec/libcodec2.c
@@ -72,6 +72,7 @@ static av_cold int libcodec2_init_common(AVCodecContext *avctx, int mode)
     }
 
     codec2_set_natural_or_gray(c2->codec, 1);
+    avctx->bit_rate = avctx->sample_rate / avctx->frame_size * avctx->block_align * 8;
 
     return 0;
 
-- 
2.39.2

_______________________________________________
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".

Reply via email to