[FFmpeg-devel] [WIP] libcodec2 wrapper + de/muxer in FFmpeg

Michael Niedermayer michael at niedermayer.cc
Wed Aug 9 22:42:01 EEST 2017


On Tue, Aug 08, 2017 at 11:49:45PM +0200, Tomas Härdin wrote:
 [...]

>  ffmpeg.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 5bd20883fdc12aefa609fc803fe5709069b3e9a0  0003-Don-t-complain-about-codec2-s-700-bit-s-modes-in-ffm.patch
> From b693b6175289e6ad0c643462d8f69f6830086099 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <tjoppen at acc.umu.se>
> Date: Thu, 3 Aug 2017 17:33:04 +0200
> Subject: [PATCH 3/3] Don't complain about codec2's 700 bit/s modes in ffmpeg.c
> 
> ---
>  ffmpeg.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/ffmpeg.c b/ffmpeg.c
> index 888d19a647..09a5b541c0 100644
> --- a/ffmpeg.c
> +++ b/ffmpeg.c
> @@ -3480,7 +3480,8 @@ static int init_output_stream(OutputStream *ost, char *error, int error_len)
>              av_buffersink_set_frame_size(ost->filter->filter,
>                                              ost->enc_ctx->frame_size);
>          assert_avoptions(ost->encoder_opts);
> -        if (ost->enc_ctx->bit_rate && ost->enc_ctx->bit_rate < 1000)
> +        if (ost->enc_ctx->bit_rate && ost->enc_ctx->bit_rate < 1000 &&
> +            ost->enc_ctx->codec_id != AV_CODEC_ID_CODEC2 /* don't complain about 700 bit/s modes */)
>              av_log(NULL, AV_LOG_WARNING, "The bitrate parameter is set too low."
>                                           " It takes bits/s as argument, not kbits/s\n");
>  

LGTM

alternatively you could add a minimum bitrate parameter to AVCodec
or AVCodecDescriptor

thx

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you fake or manipulate statistics in a paper in physics you will never
get a job again.
If you fake or manipulate statistics in a paper in medicin you will get
a job for life at the pharma industry.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170809/603e8f7e/attachment.sig>


More information about the ffmpeg-devel mailing list