LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   tv-recording whith transcode and init whith v4lctl is not working with cron (https://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
 
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?

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 10:21 PM.