smartboyathome
December 29th, 2007, 03:42 AM
I am writing a script for myself which converts a movie file to the correct format for my MP3 player. I am having trouble with it, though, since mencoder isn't acting like when I run it. Here is a copy of the script:
#!/bin/sh
# **********************************************
# * Insignia Video Encoder *
# * Encodes your video for your Insignia sport *
# * By smartboyathome *
# **********************************************
echo "Type the path to your video that you want to encode and press [ENTER]: "
read pathdecoded
echo "Type where you want the encoded video to be put (including the video's file name) and press [ENTER]: "
read pathencoded
echo "Encoding, please wait..."
mencoder $pathdecoded ovc lavc -oac mp3lame -lameopts cbr:br=128 -ffourcc XVID -lavcopts vcodec=mpeg4:vbitrate=256 -vf scale=220:176,crop=220:176 -ofps 15 -o $pathencoded >> /dev/null
echo "Done!"
Basically, it is supposed to take in which movie I want to convert, and where I want to convert it to, and then convert it for me. When I run the mencoder without the script, it doesn't ask me for the -ovc, but when I run it with the script, it does. Please help make this run like executing the command.
Also, how do I make it so that it doesn't show the output?
#!/bin/sh
# **********************************************
# * Insignia Video Encoder *
# * Encodes your video for your Insignia sport *
# * By smartboyathome *
# **********************************************
echo "Type the path to your video that you want to encode and press [ENTER]: "
read pathdecoded
echo "Type where you want the encoded video to be put (including the video's file name) and press [ENTER]: "
read pathencoded
echo "Encoding, please wait..."
mencoder $pathdecoded ovc lavc -oac mp3lame -lameopts cbr:br=128 -ffourcc XVID -lavcopts vcodec=mpeg4:vbitrate=256 -vf scale=220:176,crop=220:176 -ofps 15 -o $pathencoded >> /dev/null
echo "Done!"
Basically, it is supposed to take in which movie I want to convert, and where I want to convert it to, and then convert it for me. When I run the mencoder without the script, it doesn't ask me for the -ovc, but when I run it with the script, it does. Please help make this run like executing the command.
Also, how do I make it so that it doesn't show the output?