LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   I am trying to find a shell script that will encode video to... (http://www.linuxquestions.org/questions/linux-general-1/i-am-trying-to-find-a-shell-script-that-will-encode-video-to-875551/)

darkstarbyte 04-17-2011 11:21 PM

I am trying to find a shell script that will encode video to...
 
I was trying to find a shell script that will encode video to a an iso that I can burn for a dvd. It seems I have lost a few of my dvds and I backed them up into mkv and I need to convert it to pal so it will work until I find them.

My search was leading to other formats, but I was wanting to use pal because it is smaller. My search lead me here, but this shell script is not in pal.

http://www.linuxquestions.org/linux/...CD_SVCD_or_DVD

I need a solution that would work with slackware. Thanks for your help.

cmfarley19 04-18-2011 10:54 AM

Give this a shot.
http://ubuntuforums.org/showthread.php?t=320389
This is where I started when wanting to do something similar. You may need to make a few minor tweaks to satisfy your specific situation, but this should get you going in the right direction.

darkstarbyte 04-19-2011 12:05 AM

Thanks for your help. Would this shell script work?

Code:

#!/bin/sh

mkdir ~/more/backup1/
mkdir ~/more/backup2/
mkdir ~/more/backup3/
mkdir ~/more/backup4/
mkdir ~/more/backup5/
mkdir ~/more/backup1/DVD/
mkdir ~/more/backup2/DVD/
mkdir ~/more/backup3/DVD/
mkdir ~/more/backup4/DVD/
mkdir ~/more/backup5/DVD/

cd /storage/backup

ffmpeg -r 29.97 -i *01*.mkv -target pal-dvd ~/more/backup1/backup01.mpg

ffmpeg -r 29.97 -i *02*.mkv -target pal-dvd ~/more/backup1/backup02.mpg

ffmpeg -r 29.97 -i *03*.mkv -target pal-dvd ~/more/backup1/backup03.mpg

ffmpeg -r 29.97 -i *04*.mkv -target pal-dvd ~/more/backup1/backup04.mpg

ffmpeg -r 29.97 -i *05*.mkv -target pal-dvd ~/more/backup2/backup05.mpg

ffmpeg -r 29.97 -i *06*.mkv -target pal-dvd ~/more/backup2/backup06.mpg

ffmpeg -r 29.97 -i *07*.mkv -target pal-dvd ~/more/backup2/backup07.mpg

ffmpeg -r 29.97 -i *08*.mkv -target pal-dvd ~/more/backup2/backup08.mpg

ffmpeg -r 29.97 -i *09*.mkv -target pal-dvd ~/more/backup3/backup09.mpg

ffmpeg -r 29.97 -i *10*.mkv -target pal-dvd ~/more/backup3/backup10.mpg

ffmpeg -r 29.97 -i *11*.mkv -target pal-dvd ~/more/backup3/backup11.mpg

ffmpeg -r 29.97 -i *12*.mkv -target pal-dvd ~/more/backup3/backup12.mpg

ffmpeg -r 29.97 -i *13*.mkv -target pal-dvd ~/more/backup4/backup13.mpg

ffmpeg -r 29.97 -i *14*.mkv -target pal-dvd ~/more/backup4/backup14.mpg

ffmpeg -r 29.97 -i *15*.mkv -target pal-dvd ~/more/backup4/backup15.mpg

ffmpeg -r 29.97 -i *16*.mkv -target pal-dvd ~/more/backup4/backup16.mpg

ffmpeg -r 29.97 -i *17*.mkv -target pal-dvd ~/more/backup5/backup17.mpg

ffmpeg -r 29.97 -i *18*.mkv -target pal-dvd ~/more/backup5/backup18.mpg

ffmpeg -r 29.97 -i *19*.mkv -target pal-dvd ~/more/backup5/backup19.mpg

ffmpeg -r 29.97 -i *20*.mkv -target pal-dvd ~/more/backup5/backup20.mpg

cd ~/more/backup1/
mkdir DVD/
dvdauthor -o DVD/ -t *.mpg
dvdauthor -o DVD/ -T
rm *.mpg
mkisofs -dvd-video -v -o DVD.iso DVD
rm -r DVD/

cd ~/more/backup2/
mkdir DVD/
dvdauthor -o DVD/ -t *.mpg
dvdauthor -o DVD/ -T
rm *.mpg
mkisofs -dvd-video -v -o DVD.iso DVD
rm -r DVD/

cd ~/more/backup3/
mkdir DVD/
dvdauthor -o DVD/ -t *.mpg
dvdauthor -o DVD/ -T
rm *.mpg
mkisofs -dvd-video -v -o DVD.iso DVD
rm -r DVD/

cd ~/more/backup4/
mkdir DVD/
dvdauthor -o DVD/ -t *.mpg
dvdauthor -o DVD/ -T
rm *.mpg
mkisofs -dvd-video -v -o DVD.iso DVD
rm -r DVD/

cd ~/more/backup5/
mkdir DVD/
dvdauthor -o DVD/ -t *.mpg
dvdauthor -o DVD/ -T
rm *.mpg
mkisofs -dvd-video -v -o DVD.iso DVD
rm -r DVD/

exit



All times are GMT -5. The time now is 10:47 AM.