09-26-2008
Help need to make a shell script run for ffmpeg vhook watermaking in shell
i have a small problem getting a batxh shell script to run in shell
this is the code
Quote:
#!/bin/bash
echo "flv-watermarker converter"
vhook='/usr/local/cpffmpeg/lib/vhook'
output='/var/www/vhosts/mysite.com/httpdocs/con'
fonts='/usr/share/fonts/TrueType'
text='MYSITE.COM'
echo "$vhook - $output - $fonts - $text"
if (($# ==0))
then
echo "Usage: flvwatermarker [flv files] ..."
exit
fi
while (($# !=0 ))
do
ffmpeg -i $1 -sameq -vhook '$vhook/drawtext.so $fonts/Verdana.TTF -t $text -x 5 -y 5' $output/${1%.*}.flv
shift
done
echo "Finished with flv-watermarker converter"
the problem seems to be centered around the ffmpeg command, something maybe to do with the ' ' wrapping around the vhook part command
this is a strange problem , if i take the ffmpeg command and run it directly from the shell promt it works, but inside this shell script it always seems to stop working around the ffmpeg part
i have other simlier shell scripts without the ' ' wrapping around parts of the ffmpeg command and they work fine, just this one seems to not work at all, i have tried adding " " to wrap the hole ffmpeg command, remove the ' ' from the vhook part, but it does not seem to work for me
i'm new to shell scripting and unix, any help or advise as to way this is not working whould be very usefull, thanks in advance
ps this was the orgianl script before i moved some commands into variables, on the ffmpeg line, to stop that long line always breaking onto two lines in nano
Quote:
#!/bin/bash
echo "flv-watermarker converter"
if (($# ==0))
then
echo "Usage: flvwatermarker [flv files] ..."
exit
fi
while (($# !=0 ))
do
ffmpeg -i $1 -sameq -vhook '/usr/local/cpffmpeg/lib/vhook/drawtext.so /usr/share/fonts/TrueType/Verdana.TTF -t MYSITE.COM -x 5 -y 5' /var/www/vhosts/mysite.com/httpdocs/con/$1.flv
shift
done
echo "Finished with flv-watermarker converter"
Last edited by wingchun22; 09-26-2008 at 07:11 PM..
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
I am having one situation in which I need to run some simple unix commands after doing "chroot" command in a shell script. Which in turn creates a new shell.
So scenario is that
- I need to have one shell script which is ran as a part of crontab
- in this shell script I need to do a... (2 Replies)
Discussion started by: hkapil
2 Replies
2. Shell Programming and Scripting
Hi Perl/UNIX experts,
I have a problem in running a shell script from my perl script (auto.pl).
I run the perl script using
perl auto.pl
from the shell prompt
The shell script picks the files in "input" folder and procesess it.
The shell script blue.sh has this code.
export... (16 Replies)
Discussion started by: hifake
16 Replies
3. Shell Programming and Scripting
Hi,
I am using HP-UNIX.
I have a requirement as below
I have to change env twice like:
cadenv <env>
cadenv <env>
ccm start -d /dbpath
ccm tar -xvf *.tar
ccm rcv ....
mv *.tar BACKUP
but after I do the first cadenv <env> , I am unable to execute any of the later commands .
... (6 Replies)
Discussion started by: charlei
6 Replies
4. Shell Programming and Scripting
please can u help me in my homework, i want to creat a script shell for ln (symbolik link). This script will do everything that Ln do it. (1 Reply)
Discussion started by: halo03
1 Replies
5. Shell Programming and Scripting
Hi guys,
I have a simple question, I want to store the output of the following command:
As you can see it is running all the time, and we get a new line every 3sec.
I just want to store these new lines into a single variable, so I can use it into a script.
To clear the screen, and... (4 Replies)
Discussion started by: Thireus
4 Replies
6. Shell Programming and Scripting
Hi,shell script is scheduled from maestro and we want mastero should not run shell script so can we edit the shell script so that it should run.ThanksPrakash (5 Replies)
Discussion started by: prakashdba2010
5 Replies
7. Shell Programming and Scripting
Say i have a simple example:
root@server # cat /root/scripts/test.sh
while sleep 5
do
echo "how are u mate" >> /root/scripts/test.log
done
root@server #
Instead of using rc.local to start or another script to check status, I would like make it as daemon, where i can do the following:
... (2 Replies)
Discussion started by: timmywong
2 Replies
8. Shell Programming and Scripting
I need to run a local shell script on a remote machine. I am able to achieve that by executing the command
> ssh -qtt user@host < test.sh
However, when I try to pass arguments to test.sh it fails.
Any pointers would be appreciated. (7 Replies)
Discussion started by: Sree10
7 Replies
9. Shell Programming and Scripting
Linux System having all Perl, Python, PHP (and Ruby) installed
From a Shell script, can call a Perl, Python, PHP (or Ruby ?) file
eg
eg
a Shell script run in a case statement call to run a php file, also Perl or/and Python file???
Like
#!/usr/bin/bash
....
....
case $INPUT_STRING... (1 Reply)
Discussion started by: hoyanet
1 Replies
LEARN ABOUT DEBIAN
fakenect-record
FAKENECT-RECORD(1) libfreenect manual FAKENECT-RECORD(1)
NAME
fakenect-record - program to save dumps from kinect to file
SYNOPSIS
fakenect-record [-h] [-ffmpeg] [-ffmpeg-opts options] outputdir
DESCRIPTION
fakenect-record dumps the output of the kinect in outputdir folder. It saves the acceleration, depth, and rgb data as individual files with
names in the form "TYPE-CURRENTIME-TIMESTAMP" where:
* TYPE is either (a)ccel, (d)epth, or (r)gb
* TIMESTAMP corresponds to the timestamp associated with the observation (or in the case of accel, the last timestamp seen)
* CURRENTTIME corresponds to a floating point version of the time in seconds.
The purpose of storing the current time is so that delays can be recreated exactly as they occurred. For RGB and DEPTH the dump is just
the entirety of the data provided in PPM and PGM formats respectively (just a 1 line header above the raw dump). For ACCEL, the dump is
the "freenect_raw_tilt_state". Only the front part of the file name is used, with the rest left undefined (extension, extra info, etc).
A file called INDEX.txt is also output with all of the filenames local to that directory to simplify the format (e.g., no need to read the
directory structure).
Once started, the program will continue to acquire data from the kinect. When you want to stop it, hit Ctrl-C and the signal will be
caught, runloop stopped, and everything will be stored cleanly.
OPTIONS
-ffmpeg
If present, send the the video stream to ffmpeg
-ffmpeg-opts options
When using ffmpeg, specify the options to be used with it. If unspecified, it will use the options "-aspect 4:3 -r 20 -vcodec
msmpeg4 -b 30000k"
-h Display the command-line help
SEE ALSO
fakenect(1)
OpenKinect 2012-05-21 FAKENECT-RECORD(1)