[FFmpeg-devel] [PATCH] Warn if user specifies bitrates smaller than 1000

Benoit Fouet benoit.fouet
Fri Oct 12 10:26:16 CEST 2007


Hi,

Ramiro Polla wrote:
> Benoit Fouet wrote:
>> Hi,
>>
>> Ramiro Polla wrote:
>>> Hello,
>>>
>>> Attached patch should reduce the number of silly bug reports. Please
>>> comment on the wording of the message...
>>> https://roundup.mplayerhq.hu/roundup/ffmpeg/issue60
>>>
>>> Ramiro Polla
>>> ------------------------------------------------------------------------
>>>
>>>
>>> Index: ffmpeg.c
>>> ===================================================================
>>> --- ffmpeg.c    (revision 10702)
>>> +++ ffmpeg.c    (working copy)
>>> @@ -2115,6 +2115,20 @@
>>>      }
>>>  }
>>>  
>>> +static void opt_bitrate(const char *arg)
>>> +{
>>> +    if( atoi(arg) < 1000 )
>>> +        fprintf(stderr, "\nWARNING: The -b parameter is set too
>>> low\nIt takes bits/s as argument, not kbits/s\n\n");
>>>   
>>
>> this will issue a warning if a user sets -(a/v)b 64k
>> i don't think you'd want that...
>
> New patch attached.
>
> And where is -vb handled? I've always used -b for video. I can't find
> a "vb" option.
>

it's handled in the opt_default
it will consume the v of vb to know it is a video option.

IMO, the easiest way would be to use OPT_FUNC2 and have only one one
function to handle all bitrate options

-- 
Ben
Purple Labs S.A.
www.purplelabs.com




More information about the ffmpeg-devel mailing list