You are not logged in.

#1 2011-01-10 22:41:25

Mega-G33k
Member
From: Indiana, USA
Registered: 2009-09-14
Posts: 42

[SOLVED] [Bash] Need help fixing my DVD making script

Last year I wrote a script to make DVDs and it worked fine but now it no longer works. I haven't edited it or anything so I figure it must be a change in the software it uses. I looked through the man pages but couldn't make sense of it enough to fix it myself. Any help or constructive criticism is appreciated (Note - Prepare for what is probably terrible code, sorry).

##########
#!/bin/bash
#
# makeDVD - Make a DVD ISO from a video file
#           Burn ISO after script runs
#
# Author  - Mega-G33k
#
# Usage   - makeDVD sourceVideo.avi resultingISO.iso
#           Run this script from the directory with the video file
##########

TEMPFILE=movietemp.mpg
ISONAME=$2

ffmpeg -i "$1" -target ntsc-dvd -sameq $TEMPFILE
mkdir DVD
dvdauthor --title -f $TEMPFILE -o DVD
dvdauthor -T -o DVD
# The following command must be run from the directory above VIDEO_TS
cd DVD
mkisofs -v -dvd-video -o $ISONAME .
echo 'Would you like to burn this disc now, 1 for true 0 for false? '
read boole
if [ $boole -eq 1 ]; then
    growisofs -dvd-compat -Z /dev/sr0=$ISONAME
else
    exit 
fi

Last edited by Mega-G33k (2011-01-22 22:09:01)

Offline

#2 2011-01-10 22:50:37

dyscoria
Member
Registered: 2008-01-10
Posts: 1,007

Re: [SOLVED] [Bash] Need help fixing my DVD making script

What's the error it gives?


flack 2.0.6: menu-driven BASH script to easily tag FLAC files (AUR)
knock-once 1.2: BASH script to easily create/send one-time sequences for knockd (forum/AUR)

Offline

#3 2011-01-10 23:07:27

Mega-G33k
Member
From: Indiana, USA
Registered: 2009-09-14
Posts: 42

Re: [SOLVED] [Bash] Need help fixing my DVD making script

I'm running it right now so it will generate the error, because I closed the terminal before I posted this. But I can tell you it throws the error after I type '1' to burn the DVD.

Last edited by Mega-G33k (2011-01-10 23:07:35)

Offline

#4 2011-01-10 23:51:19

Mega-G33k
Member
From: Indiana, USA
Registered: 2009-09-14
Posts: 42

Re: [SOLVED] [Bash] Need help fixing my DVD making script

Heres part of the output

DVDAuthor::dvdauthor, version 0.7.0.
Build options: gnugetopt imagemagick iconv freetype fribidi fontconfig
Send bug reports to <dvdauthor-users@lists.sourceforge.net>

INFO: no default video format, must explicitly specify NTSC or PAL
INFO: dvdauthor creating table of contents
INFO: Scanning DVD/VIDEO_TS/VTS_01_0.IFO
ERR:  no video format specified for VMGM
I: -input-charset not specified, using utf-8 (detected in locale settings)
genisoimage 1.1.11 (Linux)
Scanning .
Scanning ./VIDEO_TS
Scanning ./AUDIO_TS
genisoimage: No such file or directory. Failed to open VIDEO_TS.IFO
genisoimage: Can't open VMG info for './'.
genisoimage: Unable to parse DVD-Video structures.
genisoimage: Could not find correct 'VIDEO_TS' directory.
genisoimage: Unable to make a DVD-Video image.
Possible reasons:
  - VIDEO_TS subdirectory was not found on specified location
  - VIDEO_TS has invalid contents
Would you like to burn this disc now, 1 for true 0 for false? 

And this is what it says after I enter 1

Executing 'builtin_dd if=part1.iso of=/dev/sr0 obs=32k seek=0'
:-( write failed: Input/output error

Offline

#5 2011-01-11 06:38:41

cosmo0
Member
Registered: 2010-10-09
Posts: 4

Re: [SOLVED] [Bash] Need help fixing my DVD making script

Hi, I was getting dvdauthor failing and throwing out these messages today:

INFO: no default video format, must explicitly specify NTSC or PAL
ERR:  no video format specified for VMGM

and googled upon your thread, the solution for me came from:

http://web.archiveorange.com/archive/v/ … KrdsldJcHE

and

http://create.freedesktop.org/wiki/Video_Format_Pref

it seems you now need the environment variable VIDEO_FORMAT set to PAL or NTSC for dvdauthor to function???

so try

export VIDEO_FORMAT=NTSC

before running your script, and set the variable in bashrc if that fixes the problem? (worked for me.)

PS, thanks for posting the script... I'm preparing a DVD .iso one step at a time ATM and might copy some bits from your script when I'm ready to automate the process smile

Last edited by cosmo0 (2011-01-11 06:43:15)

Offline

#6 2011-01-12 01:11:19

Mega-G33k
Member
From: Indiana, USA
Registered: 2009-09-14
Posts: 42

Re: [SOLVED] [Bash] Need help fixing my DVD making script

Hey thanks for the reply, I'm trying that right now.  I'll post back later to let you know if it works.  Also, I'm glad you might be able to get some use out of my script, although I think a few of the steps could probably be put together into one command.

Offline

#7 2011-01-12 01:59:13

Mega-G33k
Member
From: Indiana, USA
Registered: 2009-09-14
Posts: 42

Re: [SOLVED] [Bash] Need help fixing my DVD making script

Thanks alot that fixed the problem, my script is now functional again.

Offline

#8 2011-01-12 05:35:36

cosmo0
Member
Registered: 2010-10-09
Posts: 4

Re: [SOLVED] [Bash] Need help fixing my DVD making script

Great, glad that worked smile

I'm using a single command for the dvdauthor step, but then you need an .xml control file I think, so I'm interested to see how you handled that with the two calls to dvdauthor. Otherwise much the same process for me, ffmpeg, dvdauthor, mkisofs and growisofs smile neatO

Offline

#9 2011-01-12 20:05:22

Mega-G33k
Member
From: Indiana, USA
Registered: 2009-09-14
Posts: 42

Re: [SOLVED] [Bash] Need help fixing my DVD making script

Hi, I have noticed a weird little quirk in my script that never used to happen.  If I try to burn the disc right after its done, it won't make the iso image, but if I take the DVD out before I tell it to burn it works fine. I just have to issue the 'growisofs -dvd-compat -Z /dev/sr0=$ISOIMAGE' command manually.  Any ideas. And sorry if that didn't make sense.

Offline

Board footer

Powered by FluxBB