[Ffmpeg-devel] Re: [PATCH] Configure selectable video grab format

Ramiro Polla angustia
Wed Jan 31 18:43:41 CET 2007


M?ns Rullg?rd wrote:
> Ramiro Polla said:
>   
>> Michel Bardiaux wrote:
>>     
>>> Ramiro Polla wrote:
>>>       
>>>> Ramiro Polla wrote:
>>>>         
>>>>> Michel Bardiaux wrote:
>>>>>           
>>>>>> M?ns Rullg?rd wrote:
>>>>>> [snip]
>>>>>>             
>>>>>>> That said, I don't like the design of the grabbing code at all.
>>>>>>> IMHO it would
>>>>>>> be much cleaner to simply run ffmpeg -f v4l2 -i /dev/video0 or
>>>>>>> whatever,
>>>>>>> dropping the whole concept of a default grabbing device used if no
>>>>>>> input is
>>>>>>> specified.
>>>>>>>
>>>>>>>               
>>>>>> FWIW I agree.
>>>>>>
>>>>>>             
>>>>> Me too =).
>>>>>
>>>>> The code for using a default grabbing device is really buggy (the
>>>>> grabbing interfaces depend on what has been set for output).
>>>>>           
>>>> It seems this would be just removing a bunch of redundant code (like
>>>> Michael said), and making few adaptations to the existing -i code.
>>>> One problem with -i <grab device> is when you want to use the default
>>>> grab device. This could be accomplished by (some suggestions):
>>>> a) using the '-' character
>>>>         
>>> Please dont, '-' generally means stdin. AAMOF ffmpeg -i - <
>>> /dev/video0 *should* work as expected.
>>>
>>>       
>> Generally as in POSIX programs, or FFmpeg? (Sorry to ask. I searched a
>> little, but it's quite hard to google for "-")
>>     
>
> Both.
>
>   
>>>> b) making -grab mean -i <default device>.
>>>>         
>>> Why do you insist on having a default grab device?
>>>
>>>       
>> First I wanted to set the default grab *format* (as is what currently
>> happens in FFmpeg). Now I'm talking about default grab *device*.
>> It would be nice to have default devices since most grab interfaces have
>> a widely used device (like /dev/bktr0, /dev/tuner0, /dev/video0...)
>>     
>
> Is typing the name really that difficult?
>
>   
>> And for the VFW grab interface I'm writing, the devices are set by a
>> number (0-9), 0 meaning default.
>>     
>
> Then I you'd say ffmpeg -f vfw -i 0.  Nobody said the parameter to -i must
> be an actual file.
>
>   

Ok, I take this as a "yes" to the question I just asked in the other e-mail.

And the problem with VFW is not because 0 is not a file, but because the 
numbering is very vague.
I know... it's Windows... It shouldn't make much sense anyways...

Ramiro Polla




More information about the ffmpeg-devel mailing list