LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-24-2007, 10:31 AM   #1
d1l2w3
Member
 
Registered: May 2004
Location: Amboy WA USA
Distribution: Mandriva 2007
Posts: 366

Rep: Reputation: 30
need help with a script


I put together a script for shrinking and backing up movies that I OWN.
The script works well until the 'dvdauthor' line . When I try to burn the movie, K3B says there are not enough files. There is VTS_01_0.BUP, VTS_01_0.IFO and 4 *.VOB files. What am I missing?

I don't know if the 'mkisofs' line will work since I haven't got that far.

Any help appreciated.

dlw

echo " "
echo -n "Enter name of movie >"

read -e dvd
mkdir /home/don/Movies/$dvd
cd /home/don/Movies/$dvd

vobcopy -l

eject /dev/hdc

echo " "
echo "Remove DVD."
echo " "
echo "Insert blank DVD."
echo " "

tcextract -i *.vob -x mpeg2 -d2 > video.m2v
tcextract -i *.vob -a 0 -x ac3 -t mpeg2 -d2 > audio.ac3

rm *.vob

vsize=`du -b video.m2v | cut -c 1-10`
audio=`du -b audio.ac3 | cut -c 1-9`

dvdlessaudio=$((4700000000-$audio))
division=$(echo "scale=2; $vsize/$dvdlessaudio" | bc)

req=$(echo "scale=2; $division*1.04" | bc)

echo " "
echo "====================================== "
echo "Requant factor for this movie is:" "$req"
echo "====================================== "
echo " "

tcrequant -d2 -i video.m2v -o shrinked.m2v -f $req

mplex -f 8 -S 0 -M -V -o final.mpg shrinked.m2v audio.ac3

# dvdauthor -o newdvd final.mpg

# mkisofs -dvd-video -udf -o $dvd.iso /home/don/Movies/$dvd

# eject /dev/hdc
 
Old 08-24-2007, 01:20 PM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Hi.

dvdauthor usually takes an xml file as its argument, not the mpg file you're trying to make into a DVD. Something like:
Code:
<dvdauthor dest="DVD">
<vmgm>
</vmgm>
<titleset>
<titles>
<pgc>
<vob file="final.mpg"/>
</pgc>
</titles>
</titleset>
</dvdauthor>
would create a DVD filesystem in ./DVD from 'final.mpg'.

Dave
 
Old 08-24-2007, 07:16 PM   #3
d1l2w3
Member
 
Registered: May 2004
Location: Amboy WA USA
Distribution: Mandriva 2007
Posts: 366

Original Poster
Rep: Reputation: 30
Thank you for replying.
What I was missing is that dvdauthor needed to reference the .xml file.

Now for the growisofs.

Thanks,
dlw
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Iptables (with masq) troubleshooting, very simple script attached script and logs. xinu Linux - Networking 13 11-01-2007 04:19 AM
Start a script after GDM autologin, don't quit when script finishes Plastech Linux - Newbie 2 05-29-2007 10:15 AM
i get an error message running php script inside a cgi script. repolona Linux - Software 0 02-22-2007 09:10 PM
send automatic input to a script called by another script in bash programming jorgecab Programming 2 04-01-2004 12:20 AM
linux 9 and java script error - premature end of script header sibil Linux - Newbie 0 01-06-2004 04:21 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration