Sponsored Content
Top Forums Shell Programming and Scripting Help need to make a shell script run for ffmpeg vhook watermaking in shell Post 302240837 by wingchun22 on Friday 26th of September 2008 06:04:45 PM
Old 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

How to run unix commands in a new shell inside a shell script?

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

How to Run a shell script from Perl script in Parent shell?

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

How to run cmds after changing to a new env (shell) in a shell script

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 help me: how to make Ln in script shell

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

[How To?] Run shell script and get output into another shell.

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

how we can make shell script not to run

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

How to make a bash or shell script run as daemon?

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

To run a local shell script in a remote machine by passing arguments to the local shell script

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

Shell script run in a case statement call to run a php file, also Perl

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
platform::shell(n)					       Tcl Bundled Packages						platform::shell(n)

__________________________________________________________________________________________________________________________________________________

NAME
platform::shell - System identification support code and utilities SYNOPSIS
package require platform::shell ?1.1.4? platform::shell::generic shell platform::shell::identify shell platform::shell::platform shell _________________________________________________________________ DESCRIPTION
The platform::shell package provides several utility commands useful for the identification of the architecture of a specific Tcl shell. This package allows the identification of the architecture of a specific Tcl shell different from the shell running the package. The only requirement is that the other shell (identified by its path), is actually executable on the current machine. While for most platform this means that the architecture of the interrogated shell is identical to the architecture of the running shell this is not generally true. A counter example are all platforms which have 32 and 64 bit variants and where a 64bit system is able to run 32bit code. For these running and interrogated shell may have different 32/64 bit settings and thus different identifiers. For applications like a code repository it is important to identify the architecture of the shell which will actually run the installed packages, versus the architecture of the shell running the repository software. COMMANDS
platform::shell::identify shell This command does the same identification as platform::identify, for the specified Tcl shell, in contrast to the running shell. platform::shell::generic shell This command does the same identification as platform::generic, for the specified Tcl shell, in contrast to the running shell. platform::shell::platform shell This command returns the contents of tcl_platform(platform) for the specified Tcl shell. KEYWORDS
operating system, cpu architecture, platform, architecture platform::shell 1.1.4 platform::shell(n)
All times are GMT -4. The time now is 07:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy