[FFmpeg-user] Video capture from V4L2 devices with multiple inputs

Rodney Baker rodney.baker at iinet.net.au
Fri Sep 9 08:56:57 CEST 2011


Hi all. I have a DVB-T tuner card (Leadtek DTV1800H) that also has an analog 
tuner and both composite video and S-video capture inputs. This card is 
supported in the mainline kernel from 3.1rc1 onwards. I have been trying to do 
video capture via the composite video input (which appears as input 1 on 
/dev/video1) but ffmpeg does not seem to allow passing V4L2 options to switch 
inputs.

With mencoder I can pass V4L2 options through from the command line (e.g. 
tv:// -tv device=/dev/video1:input=1...etc.) but I cannot find an equivalent 
in the ffmepg man page or online docs. The docs suggest that the appropriate 
input must first be activated using an external program (e.g. xawtv) and if I 
do so I can view the composite video input, but as soon as I invoke ffplay or 
ffmpeg with [ffmpeg|ffplay] -f video4linux2 -i  /dev/video1 it resets the 
device and selectes input0 (the analog TV tuner) instead of input1 (the 
composite video input).

How hard would it be to add the ability to parse V4L2 options and pass them 
through via the V4L2 API? I am not a programmer so I don't really have any 
idea where to start, although I'd be happy to help with testing.

BTW, I've confirmed that I can capture both video and audio via this card 
using VLC - video via V4L2 and audio via ALSA - although the options for 
successful encoding via VLC seem limited and I would prefer to use ffmpeg if 
possible.

Regards,
Rodney.

-- 
===================================================
Rodney Baker VK5ZTV
rodney.baker at iinet.net.au
=================================================== 



More information about the ffmpeg-user mailing list