LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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
  Search this Thread
Old 09-04-2005, 01:56 PM   #1
ptesone
Member
 
Registered: Nov 2003
Location: USA
Distribution: Debian Sarge
Posts: 77

Rep: Reputation: 15
Post DISCUSSION: AVI to DVD


This thread is to discuss the article titled: AVI to DVD
 
Old 09-15-2005, 02:11 AM   #2
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,606

Rep: Reputation: 53
Hi,

Great exposition for a topics many will be interested in, thanks.
Thanks as well to the people who suggested you to post this.
I explain first my experience and then go on to all links and comments I have.

Your tutorial is coming at the time I am trying to put 20s video clips from my camera together onto a dvd. I first tried with my meagre knowledge of transcode and ffmpeg. Eventually managed to get some mpeg movies, but then dvdauthor complained (something to do with headers of file and padding; I had read about the -f 8 option, but somehow this is not enough to get the header right.). Anyhow, I did more searches, found your thread and some others.

Linux is great there is always more than 1 method. Here are some comments:
- Somebody will ask how to do the conversion to PAL (I will try to figure out for myself)
- "avi to vob" is a keyword you might want to add to your tutorial
"avi to mpeg" as well on top of "avi to dvd"
Possibly none of these "keyword" is absolutely correct,. but it will help newbies' searches (containers, codec, format, this a steep learning curve when one starts)
- I would state in the tutorial that this method does not (does?) work with divx (divx are avi files, are they not?)

- ffmpeg with option pal-dvd worked great to convert camera's avi to mpeg, but still I had this file header problem (the file plays with mplayer but dvdauthor cannot find the first vobu).
There must be some solution to convert avi to dvdauthor compliant file with ffmpeg
(not found it yet fully spelt out with google, need to look)

I suggest you add these links at the end of the tutorial

http://tovid.sourceforge.net/ A army knife video suit

A batch script AVI to VOB (I have not tried yet)
http://inferno.slug.org/cgi-bin/wiki?AviToVob

I have heard of avidemux and did some searches and found (cross-ref with some LQ threads below)
LINUX: AVI to DVD Encoding and Authoring : BASIC (using avidemux)
http://www.videohelp.com/forum/viewtopic.php?t=242455

{edit added QCreateVOB seems to be another solution. Not tried
http://qcreatevob.sourceforge.net/
heard of http://sourceforge.net/projects/kavi2svcd/ as well
<<a GUI for generating VCD/SVCD/DVD-compliant MPEG files from an AVI, MPEG, Quicktime or whatever file using transcode and mplex>>
}

---------- LQ Threads ---------------
A thread about tools
http://www.linuxquestions.org/questi...2avi+to+dvd%22

Thread with links
http://www.linuxquestions.org/questi...2avi+to+dvd%22

---------- Further readings ---------------
http://mightylegends.zapto.org/dvd/dvdauthor_howto.php
http://gentoo-wiki.com/HOWTO_Mencode...Stream_Ripping
---------- Further readings background ---------------
http://www.bunkus.org/dvdripping4linux/single/

Last edited by Emmanuel_uk; 09-16-2005 at 02:00 PM.
 
Old 09-16-2005, 01:58 PM   #3
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,606

Rep: Reputation: 53
avi to dvd (avi to vob) 1 command line with mencoder

with MEncoder 1.0pre7-3.4.3 (C) 2000-2005 MPlayer Team
(I could net get it to work with 1.0pre6-3.4.3. maybe the feature was just added)

mpegopts is documented in http://mplayerhq.hu/DOCS/man/en/mplayer.1.html
and it all does it in one line ! :-) Good guys at mplayers really

This is the example they give for avi to DVD PAL compliant
http://mplayerhq.hu/DOCS/HTML/en/men...vd-all-pal-dvd

mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd -vf scale=720:576,\
harddup -srate 48000 -af lavcresample=48000 -lavcopts vcodec=mpeg2video:\
vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=15:acodec=ac3:\
abitrate=192:aspect=16/9 -ofps 25 \
-o movie.mpg movie.avi

Last edited by Emmanuel_uk; 09-16-2005 at 02:02 PM.
 
Old 10-23-2005, 08:40 AM   #4
bglnelissen
Member
 
Registered: Feb 2004
Location: Utrecht Holland
Distribution: MacOS, Debian, Raspbian
Posts: 76

Rep: Reputation: 15
automated avi2dvd script PAL AND NTSC

Automated BASH-script for PAL.
(For NTSC change: Look in the code at STEP 1)

Just made this overnight, some things can be made better and ofcourse you may.

have fun.

bas
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 ;)

# STEP 0
# Say hello
# give worning for the dependencies
# setting-up the right directories, variables etc

# FUNCTION FOR MAKING COLORTEXT EASIER
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

echo -e "Hello world!"

echoyellow "Welcome to \"avi-2-DVD\""
echolightcyan "\t Your 6 Steps guide for converting avi-2-DVD"
echolightgreen "Read Me:"
echo -e "Just do everything this program asks you to do and it will work like a charm.
Make sure you have installed these programs before trying to converd avi-2-DVD:
	\t - transcode
	\t - mplex
	\t - dvdauthor
	\t - k3b"
echo ""
echo -e "This program can be quit anytime using \"ctrl-c\".
No wildcards and there (still) are no error correction for misspelled path's or filenames.
Make shure you've got enough free disc-space.
Files are not yet cleaned afterwards.
Settings now used are for PAL format, NTSC settings can be found in the source of this script.
Enough said, lets start your avi-2-DVD project!"
echo ""
echoyellow "What's the name of your new avi-2-DVD project?"
read project
echo ""

echoyellow "In which FOLDER is the \".avi\" file you want to convert?"
echo -e "Type it's path here: 
	\r\t (like: /home/myname/movies)"
read workingdir
cd  "$workingdir"
echo ""

echoyellow "Which of the following movie(s),listed below, do you want me to convert?"
echo -e "Remember, no wildcards and there (still) are no error correction for misspelled path's or filenames."
echo ""
echolightgreen "List all \".avi\" movies in this folder:"
ls | grep .avi
echo ""
read avimovie
echo ""

echo -e "To make shure the process does not conflict with other files ill make a new working directory:"
echolightgreen "\"$workingdir/DVD $project\""
mkdir "DVD $project"
mv "$avimovie" "DVD $project"
cd "DVD $project"
	
# STEP 1
# Split the .avi file into 2 separate files, one for video and one for audio
# (This AINT 5.1, see website for details)
echo ""
echolightcyan "\t Step 1"
echoyellow "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-pal --export_asr 2 -o "$avimovie" -D0 -b224 -N 0x2000 -s2 -m "$avimovie".ac3 -J modfps=clonetype=3 --export_fps 25 
#PAL
#transcode -i "$avimovie" -y ffmpeg --export_prof dvd-pal --export_asr 2 -o "$avimovie" -D0 -b224 -N 0x2000 -s2 -m "$avimovie".ac3 -J modfps=clonetype=3 --export_fps 25 
#NTSC
#transcode -i "$avimovie" -y ffmpeg --export_prof dvd-ntsc --export_asr 2 -o "$avimovie" -D0 -b224 -N 0x2000 -s2 -m "$avimovie".ac3 -J modfps=clonetype=3 --export_fps 29.97

# Moving back videofile
echolightgreen "Restoring original videofile: $avimovie"
mv $avimovie ../

# STEP 2
# Put the video & audio file back together
# This will make dvd_movie.mpg ready for DVD authoring. . .
echo ""
echolightcyan "\t Step 2"
echoyellow "Put the video & audio file back together (MPEG)"
sleep 2
mplex -f 8 -o dvd_movie.mpg "$avimovie".m2v "$avimovie".ac3

# STEP 3
# open your favorite text editor and paste the following
# save the file as: dvdauthor.xml
# in the same directory as your movie files '
echo ""
echolightcyan "\t Step 3"
echoyellow "Now i am gonna create a \"dvdauthor.xml\" file.
The 'dvdauthor' program uses this file to create 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"

# STEP 4
# using the dvdauthor.xml file to create a DVD from the dvd_movie.mpg file
echo ""
echolightcyan "\t Step 4"
echoyellow "Starting up dvdauthor and using your \"dvdauthor.xml\" file..."
sleep 2
dvdauthor -x dvdauthor.xml

# STEP 5
# starting-up k3b for burning the whole project
echo ""
echolightcyan "\t Step 5"
echoyellow "Starting k3b with additional options for buring your dvd"
echoyellow "Click 'Burn' and again, click 'Burn' to start burning your disc"
cd "$workingdir/DVD $project/DVD"
ls
sleep 4
k3b --videodvd ./*

# STEP 6
# ALL DONE
echo ""
echolightcyan "\t Step 6"
echoyellow "Everything is done. Enjoy your DVD"
echoyellow "Your DVD image files and you project files still excist in: \"$workingdir/DVD $project\""
echo -e "Thnx ptesone & CousinCocaine for making this possible"
echo -e "Bye"
SOUND IS STILL NOT OK. WORKING ON IT

Last edited by bglnelissen; 10-24-2005 at 11:55 AM.
 
Old 10-24-2005, 05:33 AM   #5
vtecturbo13
Member
 
Registered: Mar 2005
Distribution: Fedora Core 3
Posts: 33

Rep: Reputation: 15
how would u change this to ntfs, comment out the pal lines ? and uncomment the ntfs ones?
 
Old 10-24-2005, 05:40 AM   #6
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,606

Rep: Reputation: 53
ntfs has nothing to do with ntsc :-)

othwerise yes to your question.
Just experiment for yourself you will learn, I am sure
 
Old 10-24-2005, 05:41 AM   #7
bglnelissen
Member
 
Registered: Feb 2004
Location: Utrecht Holland
Distribution: MacOS, Debian, Raspbian
Posts: 76

Rep: Reputation: 15
change to NTSC

Yes.
original is this:
Code:
transcode -i "$avimovie" -y ffmpeg --export_prof dvd-pal --export_asr 2 -o "$avimovie" -D0 -b224 -N 0x2000 -s2 -m "$avimovie".ac3 -J modfps=clonetype=3 --export_fps 25 
#PAL
#transcode -i "$avimovie" -y ffmpeg --export_prof dvd-pal --export_asr 2 -o "$avimovie" -D0 -b224 -N 0x2000 -s2 -m "$avimovie".ac3 -J modfps=clonetype=3 --export_fps 25 
#NTSC
#transcode -i "$avimovie" -y ffmpeg --export_prof dvd-ntsc --export_asr 2 -o "$avimovie" -D0 -b224 -N 0x2000 -s2 -m "$avimovie".ac3 -J modfps=clonetype=3 --export_fps 29.97
change it into this for NTSC:
Code:
transcode -i "$avimovie" -y ffmpeg --export_prof dvd-ntsc --export_asr 2 -o "$avimovie" -D0 -b224 -N 0x2000 -s2 -m "$avimovie".ac3 -J modfps=clonetype=3 --export_fps 29.97
#PAL
#transcode -i "$avimovie" -y ffmpeg --export_prof dvd-pal --export_asr 2 -o "$avimovie" -D0 -b224 -N 0x2000 -s2 -m "$avimovie".ac3 -J modfps=clonetype=3 --export_fps 25 
#NTSC
#transcode -i "$avimovie" -y ffmpeg --export_prof dvd-ntsc --export_asr 2 -o "$avimovie" -D0 -b224 -N 0x2000 -s2 -m "$avimovie".ac3 -J modfps=clonetype=3 --export_fps 29.97
i keep them both commented out just for backup, so you can always change it back.

good luck.

if it does not work, just say it.

bye.
bas
 
Old 10-24-2005, 05:51 AM   #8
vtecturbo13
Member
 
Registered: Mar 2005
Distribution: Fedora Core 3
Posts: 33

Rep: Reputation: 15
wow did i really type in ntfs , man i need to goto sleep
 
Old 12-04-2005, 03:59 PM   #9
mucktuck
LQ Newbie
 
Registered: Dec 2005
Posts: 1

Rep: Reputation: 0
multiple files?

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).
 
Old 01-31-2006, 02:08 PM   #10
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quick question regarding step 4)

What exactly does one paste? :}


Cheers,
Tink
 
Old 02-01-2006, 02:49 AM   #11
bglnelissen
Member
 
Registered: Feb 2004
Location: Utrecht Holland
Distribution: MacOS, Debian, Raspbian
Posts: 76

Rep: Reputation: 15
whow, this is some while ago, let me take a look. I suppose that you dont need to copy anything.

the actual code is:
[code]
dvdauthor -x dvdauthor.xml
[\code]

this means:
the program: dvdauthor
does option: -x
to the file: dvdauthor.xml

and i suppose that the file dvdauthor.xml is already made earlier in the script.

Good Luck.
 
Old 02-01-2006, 02:57 AM   #12
bglnelissen
Member
 
Registered: Feb 2004
Location: Utrecht Holland
Distribution: MacOS, Debian, Raspbian
Posts: 76

Rep: Reputation: 15
<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>



this is what the author.xml file looks like.
 
Old 02-07-2006, 12:56 PM   #13
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Sweet - thanks :)
 
Old 03-17-2006, 06:34 AM   #14
lowebb
Member
 
Registered: Aug 2005
Location: Ireland
Distribution: Ubuntu, Ubuntu, Ubuntu
Posts: 119

Rep: Reputation: 15
I'm trying to get this tutorial going. I've installed all the software required (from yum on FC4) but when I use the transcode command (modified to pal) shown I get the following error

import_ffmpeg.so] No codec found for the FOURCC 'XVID'.
video import module error: OPEN failed
[transcode] critical: failed to open input source

The file I'm trying to convert can be played with both xine and mplayer so I cant see why there is a codec problem.

Where would I get this codec (I cant seem to find a download link) and where do I put it for ffmpeg(thats where the problem seems to be) so it can find it.

Thanks for your help
 
Old 03-17-2006, 06:46 AM   #15
bglnelissen
Member
 
Registered: Feb 2004
Location: Utrecht Holland
Distribution: MacOS, Debian, Raspbian
Posts: 76

Rep: Reputation: 15
i have been out for too long now, dont know the exact problem and i dont know Yum. Try searching the forum.
sorry.
 
  


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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxAnswers Discussion

All times are GMT -5. The time now is 06:40 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