LinuxQuestions.org
Visit Jeremy's Blog.
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 11-19-2010, 03:45 PM   #1
True`Colors
LQ Newbie
 
Registered: Mar 2007
Location: Urziceni - Romania
Distribution: Fedora 16
Posts: 12

Rep: Reputation: 0
How to burn a dvd from a couple of .flv files


Create two files, say dvd.sh and dvdauthor.xml.

If you have, for example, seven .flv files downloaded from youtube as a serial, from one to seven, and wish to burn to a dvd to view with a dvd player... It can happen that not all the files have the same resolution, but try to minimise the work and speed things a little.

Into the dvdauthor.xml you may write:

===========
<dvdauthor>
<vmgm />
<titleset>
<titles>
<pgc>
<vob file="dvd.mpg" />
</pgc>
</titles>
</titleset>
</dvdauthor>
============


Into the dvd.sh file you may write:

=============
#!/bin/bash

echo "Removing contents of Trash"
rm -rfv ./.local/share/Trash/files/*
rm -rfv ./.local/share/Trash/info/*

if [ ! -d ${HOME}/dvd ]
then

# Only make dir dvd if it doesn't exist
echo "${HOME}/dvd did not exist, creating..."
mkdir "${HOME}/dvd"

fi

rm temp[1234567].[av] all.[av]


mkfifo temp1.a
mkfifo temp1.v

mkfifo temp2.a
mkfifo temp2.v

mkfifo temp3.a
mkfifo temp3.v

mkfifo temp4.a
mkfifo temp4.v

mkfifo temp5.a
mkfifo temp5.v

mkfifo temp6.a
mkfifo temp6.v

mkfifo temp7.a
mkfifo temp7.v

mkfifo all.a
mkfifo all.v


ffmpeg -i input1.flv -vn -f ac3 -acodec ac3 -ab 192k -ar 48000 -ac 2 - > temp1.a < /dev/null &

ffmpeg -i input2.flv -vn -f ac3 -acodec ac3 -ab 192k -ar 48000 -ac 2 - > temp2.a < /dev/null &

ffmpeg -i input3.flv -vn -f ac3 -acodec ac3 -ab 192k -ar 48000 -ac 2 - > temp3.a < /dev/null &

ffmpeg -i input4.flv -vn -f ac3 -acodec ac3 -ab 192k -ar 48000 -ac 2 - > temp4.a < /dev/null &

ffmpeg -i input5.flv -vn -f ac3 -acodec ac3 -ab 192k -ar 48000 -ac 2 - > temp5.a < /dev/null &

ffmpeg -i input6.flv -vn -f ac3 -acodec ac3 -ab 192k -ar 48000 -ac 2 - > temp6.a < /dev/null &

ffmpeg -i input7.flv -vn -f ac3 -acodec ac3 -ab 192k -ar 48000 -ac 2 - > temp7.a < /dev/null &


ffmpeg -i input1.flv -an -f mpeg2video -sameq -target ntsc-dvd - > temp1.v < /dev/null &

{ ffmpeg -i input2.flv -an -f mpeg2video -sameq -target ntsc-dvd - < /dev/null | tail -n +2 > temp2.v ; } &

{ ffmpeg -i input3.flv -an -f mpeg2video -sameq -target ntsc-dvd - < /dev/null | tail -n +3 > temp3.v ; } &

{ ffmpeg -i input4.flv -an -f mpeg2video -sameq -target ntsc-dvd - < /dev/null | tail -n +4 > temp4.v ; } &

{ ffmpeg -i input5.flv -an -f mpeg2video -sameq -target ntsc-dvd - < /dev/null | tail -n +5 > temp5.v ; } &

{ ffmpeg -i input6.flv -an -f mpeg2video -sameq -target ntsc-dvd - < /dev/null | tail -n +6 > temp6.v ; } &

{ ffmpeg -i input7.flv -an -f mpeg2video -sameq -target ntsc-dvd - < /dev/null | tail -n +7 > temp7.v ; } &


cat temp1.a temp2.a temp3.a temp4.a temp5.a temp6.a temp7.a > all.a &

cat temp1.v temp2.v temp3.v temp4.v temp5.v temp6.v temp7.v > all.v &


ffmpeg -i all.v -i all.a -vcodec copy -acodec copy -f dvd - > dvd.mpg

rm temp[1234567].[av] all.[av]

dvdauthor -o ${HOME}/dvd/ -x dvdauthor.xml

growisofs -Z /dev/dvd -dvd-video ${HOME}/dvd/

# halt -p
=============

Rename the files input1.flv... to input7.flv and place all the files in your home directory and a dvd disc into your dvd driver.

Run dvd.sh.
 
  


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
burn .avi files to dvd nigelc Mandriva 6 06-03-2010 07:17 PM
Can't get my avi files to burn to DVD. Nevis501 Linux - Newbie 10 10-16-2008 04:17 PM
Burn DVD from Video Files? rm6990 Linux - Software 5 08-12-2004 03:20 PM

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

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