LinuxAnswers DiscussionThis forum is to discuss articles posted to LinuxAnswers.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,606
Rep:
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
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
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.
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).
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.