I have a small script to transcode videos for a tablet in mythtv. It works except for the kdialog command. When I paste the command into a terminal it works fine, but not in the script. What am I doing wrong? I'm using Kubuntu 12.04.
#!/bin/sh
VIDEOIN=$1
FILENAME=$2
OUTDIR=$3
# Now we'll convert the new temp file to mpg using avconv
cp $VIDEOIN "$OUTDIR/$FILENAME.tmp"
avconv -i "$OUTDIR/$FILENAME.tmp" -acodec libmp3lame -ac 2 -vcodec mpeg2video -q 8 -vf scale=-1:480 "$OUTDIR/$FILENAME.avi"
# Now, we'll remove the temp file
rm -f "$OUTDIR/$FILENAME.tmp"
kdialog --title "Mythtv" --passivepopup "Transcode of recording for tablet complete" 10
#!/bin/sh
VIDEOIN=$1
FILENAME=$2
OUTDIR=$3
# Now we'll convert the new temp file to mpg using avconv
cp $VIDEOIN "$OUTDIR/$FILENAME.tmp"
avconv -i "$OUTDIR/$FILENAME.tmp" -acodec libmp3lame -ac 2 -vcodec mpeg2video -q 8 -vf scale=-1:480 "$OUTDIR/$FILENAME.avi"
# Now, we'll remove the temp file
rm -f "$OUTDIR/$FILENAME.tmp"
kdialog --title "Mythtv" --passivepopup "Transcode of recording for tablet complete" 10
Comment