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.
|