Michel Bardiaux wrote: > Ramiro Polla wrote: >> 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 "-") (Really, I'm curious now =) >>>> 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...) > > Widely, yes, universal, no. This would be bad for packagers, since > whatever default device they select, might well not exist on the > target system. Pick bktr and ship to a system with a v4l device, or > the reverse. > >> And for the VFW grab interface I'm writing, the devices are set by a >> number (0-9), 0 meaning default. > > Its the *system* default, no? You're right. Now it makes sense for me that since FFmpeg doesn't care about the system, this is wrong. > Then under Windows, if -i 0, you should look up in the registry which > device has been given as default. > Actually, VFW does it internally. I don't have to look at the registry. So, would it be OK to drop the whole "default" thing for grabbing??? (format and device) That way, -f and -i would be mandatory for any grabbing (and it would be even easier to implement). Ramiro Polla
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4