Technical details:
$ lsusb
...
Bus 001 Device 008: ID 05e1:0408 Syntek Semiconductor Co., Ltd STK1160 Video Capture Device
Although the video capture function did work out-of-the-box, I had some trouble with grabbing the sound.
I ended up with the following bash script that reliably captures the video AND sound. Just create a shell-script file in your home-directory, add the "execute" permissions and create a launcher that references your script.
Details about this script:I ended up with the following bash script that reliably captures the video AND sound. Just create a shell-script file in your home-directory, add the "execute" permissions and create a launcher that references your script.
#!/bin/bash
amixer -c stk1160mixer sset Line unmute cap
cvlc -vvv --color --input-slave=alsa://pulse --live-caching=300 \
--v4l2-standard=PAL --deinterlace-mode=yadif \
--video-filter=deinterlace v4l:///dev/video0
- by default the sound from the USB device is muted. You have to unmute it with the amixer command or, manually, with the alsamixer interface. See https://linuxtv.org/wiki/index.php/Stk1160#Enable_sound_capture for details.
- cvlc runs VLC without the window decorators (menu, etc.). This is handy for having a simple launcher for the kids. Use plain vlc if you don't mind the menus and buttons.
- Ubuntu use pulse-audio, so it is important tot use the "pulse" input-slave parameter. I couldn't get other suggested settings like "hw2,0" etc. to work, so stick with "pulse"...
- You can try to improve the deinterlace-mode. See https://wiki.videolan.org/deinterlacing#VLC_deinterlace_modes for possible values and how they work.
Known issues:
- Make sure you configure the video capture device as your sound input device in "Sound Settings":
- The linuxtv wiki says that the amixer command must only be run once, but I ended up running it always. This doesn't seem to have any bad effects, so I left it in for now.
- When plugging in the USB stick on a live Ubuntu system, the stk1160mixer is not always present. I had the most reliable operation by plugging in the USB device before booting.
No comments:
Post a Comment