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

Benoit Fouet benoit.fouet
Sat Oct 13 18:48:15 CEST 2007


Ramiro Polla wrote:
> Benoit Fouet wrote:
>   
>> 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
>>   
>>     
>
> I don't see how this could be done. Care to elaborate?
>   

no problem, see what is done in [1]
i guess this is enough to understand what i meant

[1]
http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071012/b769d192/attachment.txt

-- 
Ben





More information about the ffmpeg-devel mailing list