Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Tomas Härdin" <git@haerdin.se>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: [FFmpeg-devel] [PATCH v2 2/7] lavc/libcodec2: Report actual bitrate used both when decoding and encoding
Date: Sat, 30 Dec 2023 22:23:49 +0100
Message-ID: <e8a8a5b0762e31471341487644d9bdbb679766fa.camel@haerdin.se> (raw)
In-Reply-To: <a85bc5d6a405ba989d98383a10612d42d015ea90.camel@haerdin.se>

[-- Attachment #1: Type: text/plain, Size: 66 bytes --]

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

/Tomas

[-- Attachment #2: 0002-lavc-libcodec2-Report-actual-bitrate-used-both-when-.patch --]
[-- Type: text/x-patch, Size: 751 bytes --]

From 5c913a3eaf5cf8c21edc119870b7fdc8251bd900 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <git@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


[-- Attachment #3: Type: text/plain, Size: 251 bytes --]

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

  reply	other threads:[~2023-12-30 21:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-30 21:22 [FFmpeg-devel] [PATCH v2 1/7] lavc/codec2utils: Use actual libcodec2 version Tomas Härdin
2023-12-30 21:23 ` Tomas Härdin [this message]
2023-12-30 21:25 ` [FFmpeg-devel] [PATCH v2 3/7] lavf/codec2: Compute duration from filesize Tomas Härdin
2023-12-30 21:25 ` [FFmpeg-devel] [PATCH v2 4/7] lavf/codec2: Allow versions between 0.8 and 1.X Tomas Härdin
2023-12-30 21:25 ` [FFmpeg-devel] [PATCH v2 5/7] lavf/codec2: Multiple of block_align -> not corrupt Tomas Härdin
2023-12-30 21:26 ` [FFmpeg-devel] [PATCH v2 6/7] lavf/codec2: Silence warnings when either muxer/demuxer is disabled Tomas Härdin
2023-12-30 21:27 ` [FFmpeg-devel] [PATCH v2 7/7] Add FATE tests for codec2, codec2raw and libcodec2 wrapper Tomas Härdin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e8a8a5b0762e31471341487644d9bdbb679766fa.camel@haerdin.se \
    --to=git@haerdin.se \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git