LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxAnswers Discussion
User Name
Password
LinuxAnswers Discussion This forum is to discuss articles posted to LinuxAnswers.

Notices

Reply
 
LinkBack Search this Thread
Old 02-03-2008, 02:33 PM   #31
crashmeister
Senior Member
 
Registered: Feb 2002
Distribution: t2 - trying to anyway
Posts: 2,541

Rep: Reputation: 47

Nice article - I just use avidemux an do 'auto dvd'.
 
Old 03-31-2009, 11:32 AM   #32
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 47
I've recently had success with devede http://www.rastersoft.com/programas/devede.html
Nice GUI interface so you don't need to go through 10 or so commands as above.
 
Old 10-14-2009, 04:10 PM   #33
kenosando
LQ Newbie
 
Registered: Oct 2009
Distribution: Ubuntu 9.11
Posts: 10

Rep: Reputation: 0
Quote:
Originally Posted by mucktuck View Post
how on earth would you do multiple files at once? I attempted and it only did the first file I entered in. I am supposed to put comma's inbetween each name? or does this not support multiple files? or am I just inept at shell script(very likely).
After finding this page, I built my own script to handle multiple files.

Code:
#! /bin/sh

### CHECK FOR ARUGUMENTS ###

if [ -z $1 ];
then
	usage=`echo 'Usage: avi2dvd [file1.avi, file2.avi, ...,]'`
	echo $usage
	exit
fi

### BEGIN CREATING THE DVD AUTHOR XML ###

echo '<dvdauthor dest="DVD">' > dvdauthor.xml
echo '  <vmgm />' >> dvdauthor.xml 
echo '   <titleset>' >> dvdauthor.xml 
echo '     <titles>' >> dvdauthor.xml 


### STORE LIST OF ARUGUMENTS INTO TMP FILE ###

echo $* | awk -F ' ' '{i=1
while (i <= NF) {print $i;
i++} }' > tmp

### VERIFY THE ARUGMENTS ARE VALID ... ###

while read line
do
	isFile=`ls $line 2>&1`
	error='ls: cannot access '$line': No such file or directory'
	case $isFile in
		$error) ### IF ls RETURNS THE ERROR STRING ...
			echo $line 'is not a valid file'
			exit
			;;

		*) ### ELSE, WE ARE OK FOR NOW
			;;
	esac

	### NOW CHECKING FILE TYPE (THIS VERSION ONLY SUPPORTS AVI)
	fileType=`echo $line | awk -F '.' '{i=1
	while (i <= NF) {if (NF == i) print $i;
	i++} }'`
	echo $fileType
	case $fileType in
		avi) ### IF ITS AVI, WE ARE READY
			echo $line 'is ready for transcoding'
			;;
		*) ### IF NOT, LIGHTS OUT, TRY AGAIN
			echo $line 'is not a valid avi file'
			exit
			;;
	esac
done < tmp

### COMPUTING TOTAL DURATION ###

totalDur=0

while read line
do  
	thisDur=`ffmpeg -i $line 2>&1 | grep Duration | cut -d ' ' -f 4 | sed s/,// | awk -F '.' '{print $1}' | awk -F ':' '{print $2}'`
	totalDur=$(($totalDur+$thisDur))

done < tmp

if [ $totalDur -gt 120 ]
then
	echo 'WARNING: This project is '$totalDur' minutes, which will not fit on a standard DVD'
	echo 'PRESS ENTER TO CONTINUE or "Q" TO QUIT'
	read choice
	
	if [ "$choice" = "Q" ];	then
		exit
	fi

	echo 'BEGINNING TRANSCODING ...'
fi

echo 'PROCESS CAN TAKE BETWEEN' `echo "scale=3; ($totalDur/75)*60" | bc` 'AND '$totalDur' MINUTES, DEPENDING ON AVAILABLE RESOURCES'
echo 'IT IS ADVISED YOU CLOSE ALL OTHER PROCESSES TO ENSURE MAXIMUM EFFICIENCY'
echo '<ENTER>'
read enterKey

### READY TO BEGIN TRANSCODING, MPLEX, AND AUTHORING OF THE DVD ###

while read line
do
	### THIS AWK SCRIPT GRABS JUST THE FILE NAME WITHOUT EXTENSION
	movie=`echo $line | awk -F '/' 'END {i=1
	while (i <= NF) {if (NF == i) print $i;
	i++} }' | awk -F '.' 'END {i=1
	while (i <= NF) {if (NF != i) printf $i;
	i++} }'`
	
	### GETTING THE LENGTH OF THE FILE IN HH:MM:SS TO SETUP CHAPTER POINTS
	len=`ffmpeg -i $line 2>&1 | grep Duration | cut -d ' ' -f 4 | sed s/,// | awk -F '.' '{print $1}'`	

	### INSERTING THE VIDEO FILE IN THE XML
	
	echo '       <pgc>' >> dvdauthor.xml
	echo '         <vob file="dvd_'${movie}'.mpg" chapters="0,'$len'"/>' >> dvdauthor.xml
	echo '       </pgc>' >> dvdauthor.xml


	### TRANSCODING (SPLITTING THE VIDEO INTO AUDIO AND VIDEO FILES
	transcode -i $line -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -o ${movie} -D0 -s2 -m ${movie}.ac3 -J modfps=clonetype=3 --export_fps 29.97
	
	### MPLEX (JOINING THE TWO FILES BACK INTO A MPG FILE
	mplex -f 8 -o dvd_${movie}.mpg ${movie}.m2v ${movie}.ac3


done < tmp

### FINISH THE XML ###

echo '      </titles>' >> dvdauthor.xml
echo '   </titleset>' >> dvdauthor.xml
echo ' </dvdauthor>' >> dvdauthor.xml

### AUTHORING THE XML WITH DVDAUTHOR ###

dvdauthor -x dvdauthor.xml	

### PROMPT USER FOR DVD BURNING OPTION ###

echo 'Would you like to burn your DVD now? (Y or N)'
read burn

if [ "$burn" = "Y" ]
then
	growisofs -Z /dev/dvd -dvd-video DVD/
fi
I commented as much as I can for the benefit of others, but here is how it works in a nutshell:

1) choose your input files (it supports as many as you put in)

2) it will then gather all the information needed about the file(s) and alert you if a) your file cannot be found or accessed b) if the file is not an avi file (you can trick my script and name the file .avi but the transcoders will pick it up).

3) it will prompt if the total amount of files are too large for a standard DVD and ask if you want to continue. Also, the total amount of time, percentage, and time remaining on a standard DVD will be displayed.

4) It will take up to two hours (realistically, not that long) depending on your computer, number and size of files, and available resources. I noticed that sometimes it would run in the high 60s frames per second transcoding (which is the longest process) up to 85 FPS, so it really varies.

5) After all processes are done, it will ask if you want to burn to a DVD. If you say 'Y' it will burn it for you, else it will exit and leave you with the DVD files in your home folder under DVD/

Last edited by kenosando; 10-14-2009 at 04:16 PM.
 
Old 11-20-2009, 08:08 AM   #34
n00kie
LQ Newbie
 
Registered: Nov 2009
Posts: 2

Rep: Reputation: 0
I got a 5.6GB DVD using this method. it could be smaller?

Hi, before all, thx for this post. Im new using linux (btw, my english is very bad) and i followed the steps of this method and all seems to be fine but i got a 5.6GB DVD and my blanks dvds are 4.7GB ... why happened that? it happen again in the future? how can i do a smaller DVD?

I really sorry for my english
 
Old 11-23-2009, 11:25 AM   #35
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 47
Using devede I was able to change the bitrate settings on the video to ensure it fitted on a normal 4.7GB DVD-R.

You haven't put what distro you're using in your profile but assuming it's a decent on then you should be able to install it using your distro's software installer.
 
Old 11-23-2009, 09:33 PM   #36
n00kie
LQ Newbie
 
Registered: Nov 2009
Posts: 2

Rep: Reputation: 0
Done... well... i burned Transformer movie hehe is a little long thats why i got a 5.6 DVD... i modified the bash script made by CousinCocaine
Code:
#!/bin/bash
# made by CousinCocaine (bglnelissen)
# All this info comes from one of my favorite websites:
# http://www.linuxquestions.org
# more specific:
# http://www.linuxquestions.org/questions/answers/556
# thnx ptesone ;)
##############################
dep1=`which transcode`
dep2=`which mplayer`
dep3=`whereis mjpegtools |cut -f 2 -d":" |sed 's/ //'`
dep4=`which ffmpeg`
dep5=`which dvdauthor`
dep6=`which dvd+rw-format`

function echolightgray {
	echo -e "\033[37;0m $1 \033[0m"
	}
function echodarkgray {
	echo -e "\033[30;1m $1 \033[0m"
	}
function echolightblue {
	echo -e "\033[34;1m $1 \033[0m"
	}
function echolightgreen {
	echo -e "\033[32;1m $1 \033[0m"
	}
function echolightcyan {
	echo -e "\033[36;1m $1 \033[0m"
	}
function echolightred {
	echo -e "\033[31;1m $1 \033[0m"
	}
function echolightpurple {
	echo -e "\033[35;1m $1 \033[0m"
	}
function echoyellow {
	echo -e "\033[33;1m $1 \033[0m"
	}
function echowhite {
	echo -e "\033[37;1m $1 \033[0m"
	}
#emptying terminal
reset
if [ $# -eq 0 ]
then
echo
echolightcyan "[+]Usage: $0 [your_movie.avi]"
echo
exit
fi
avimovie=$1
if [ -e "$avimovie" ]
then

#Checking dependencies...

if [ "$dep1" == '' -o "$dep2" == '' -o "$dep3" == '' -o "$dep4" == '' -o "$dep5" == '' -o "$dep6" == '' ]
then
echolightred "[ERROR]"
echolightcyan "
 The following dependencies are required:
	\t - transcode
	\t - mplayer
	\t - dvdauthor
	\t - mjpegtools
	\t - dvd+rw-tools
	\t - ffmpeg"

echo
exit
fi
tmp=`echo $avimovie |sed 's/.avi// '`
pathdvd=$tmp"_DVD"
echoyellow "Creating project PATH..."
mkdir -p "$pathdvd"
sleep 1
echoyellow "Preparing Files..."
mv $avimovie $pathdvd
cd $pathdvd
sleep 1
echo ""
echolightgreen "Split the .avi file into 2 separate files, one for video and one for audio:
\t - 1 video file, '.m2v'
\t - 1 audio file, '.ac3'"
sleep 2
transcode -i "$avimovie" -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -o "$avimovie" -D0 -s2 -m "$avimovie".ac3 -J modfps=clonetype=3 --export_fps 29.97
echoyellow "Put the video & audio file back together (MPEG)..."
sleep 2
mplex -f 8 -o dvd_movie.mpg "$avimovie".m2v "$avimovie".ac3

echo ""
echoyellow "Creating the right DVD structure..."
sleep 2
echo -e "<dvdauthor dest=\"DVD\">
	  <vmgm />
	   <titleset>
	     <titles>
	       <pgc>
	         <vob file=\"dvd_movie.mpg\" chapters=\"0,15:00,30:00,45:00,1:00:00\"/>
	       </pgc>
	      </titles>
	   </titleset>
	 </dvdauthor>" > "dvdauthor.xml"

echo
sleep 2
dvdauthor -x dvdauthor.xml
mkdir Avi_Original
mv $avimovie Avi_Original
echo
echoyellow "Your DVD image files and you project files are in: [$pathdvd] AND The original AVI file is in [$pathdvd/Avi_Original]"
echo

until [ "$burn" = "y" -o "$burn" = "n" -o "$burn" = "Y" -o "$burn" = "N" ]
do
echodarkgray 'Would you like to burn your DVD now? (Y or N)'
read burn
done
if [ "$burn" == "Y" -o "$burn" == "y" ]
then
	growisofs -Z /dev/dvd -dvd-video "$pathdvd/DVD/"
fi
echoyellow "Everything is done. Enjoy your DVD :)"
else
echo
echolightred "[$avimovie] Doesnt Exist"
echo
fi
works fine to me... im using debian lenny

Last edited by n00kie; 11-28-2009 at 07:04 AM.
 
Old 01-22-2010, 09:40 AM   #37
sumeet inani
Member
 
Registered: Oct 2008
Posts: 772
Blog Entries: 22

Rep: Reputation: 46
I have got another easy method

I have installed medibuntu-ffmpeg on ubuntu 8.04

ffmpeg -i input file -f dvd output.vob

it works well.
What say ?
 
Old 12-09-2011, 03:17 PM   #38
Die Go
LQ Newbie
 
Registered: Dec 2011
Posts: 1

Rep: Reputation: Disabled
Thanks, it works
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
AVI to DVD ptesone Linux - Software 9 07-21-2009 08:11 PM
transcoding DVD to avi PhaseSpace Linux - Software 4 05-10-2009 10:26 AM
Dvd to Divx (avi) Knowledgements Debian 8 08-21-2005 01:57 PM
DVD AVI rip to DVD mooreted Mandriva 4 02-20-2005 08:57 AM
AVI on dvd? benne Linux - Software 3 02-05-2005 11:25 AM


All times are GMT -5. The time now is 12:45 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration