tv-recording whith transcode and init whith v4lctl is not working with cron
I´m using transcode to record from my tv-card so i have to use v4lctl to switch to the right channel. If I´m not at home i tried to use cron to start record. I´m using this script
#!/bin/sh
TODAY=$( date +%Y%m%d )
NOW=$( date +%H:%M )
#init tv-card
v4lctl -c /dev/video0 setinput television
v4lctl setfreqtab europe-west
v4lctl setnorm PAL-BG
v4lctl setchannel 1
#record
transcode \
-x v4l2=resync_margin=1:resync_interval=250,v4l2 \
-g 720x576 \
-i /dev/video0 \
-p /dev/dsp \
-c 00:40:00 \
-e 32000,16,2 \
-N 0x1 \
-J resample,levels,smartyuv \
-w 4000 \
-y ffmpeg \
-F mjpeg \
-o /home/gottfried/videos/aufnahme-${TODAY}-${NOW}.avi
if I´m starting this script in a terminal it works fine, but if I´m using crontab to start this script my tv card isn´t initialized right.
Is there an other way to init the tv-card?
|