LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   tv-recording whith transcode and init whith v4lctl is not working with cron (http://www.linuxquestions.org/questions/linux-software-2/tv-recording-whith-transcode-and-init-whith-v4lctl-is-not-working-with-cron-472567/)

Goofy180173 08-10-2006 03:32 AM

tv-recording whith transcode and init whith v4lctl is not working with cron
 
Im using transcode to record from my tv-card so i have to use v4lctl to switch to the right channel. If Im not at home i tried to use cron to start record. Im 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 Im starting this script in a terminal it works fine, but if Im using crontab to start this script my tv card isnt initialized right.

Is there an other way to init the tv-card?

RGummi 10-13-2006 12:54 PM

Hi,

I have made my own script and it works fine. But you should use the "at" command for sheduling. At which user does the cron job run? I use ivtv-tune and give the frequency! I think your cron job runs with root account and it does not know what channel 1 is!

R


All times are GMT -5. The time now is 02:16 AM.