debian/0000755000000000000000000000000012346306101007162 5ustar debian/watch0000644000000000000000000000015012346305512010214 0ustar version=3 options=uversionmangle=s/-/./ \ http://sf.net/dvd-slideshow/dvd-slideshow-([0-9.-]*)\.tar\.gz debian/copyright0000644000000000000000000000226612346305512011130 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Source: http://sf.net/projects/dvd-slideshow/files/ Upstream-Name: DVD Slideshow Upstream-Contact: Scott Dylewski Files: * Copyright: 2003-2011 Scott Dylewski 2003 Scott Merrill License: GPL-2+ Files: debian/* Copyright: 2012-2014 Alessio Treglia License: GPL-2+ License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . . On Debian systems the full text of the GNU General Public License can be found in the `/usr/share/common-licenses/GPL-2' file. debian/dvd-slideshow.install0000644000000000000000000000016212346305512013332 0ustar dvd-slideshow usr/bin dvd-menu usr/bin gallery1-to-slideshow usr/bin jigl2slideshow usr/bin dir2slideshow usr/bin debian/changelog0000644000000000000000000000154512346306101011041 0ustar dvd-slideshow (0.8.4.2-3) unstable; urgency=low * Fix use of deprecated commands. Thanks to Theppitak Karoonboonyanan for report and patch. (Closes: #750626) -- Alessio Treglia Thu, 12 Jun 2014 12:17:04 +0100 dvd-slideshow (0.8.4.2-2) unstable; urgency=low [ Reinhard Tartler ] * bump standards version * update obsolete dependencies to point to libav variants * add myself to uploaders [ Alessio Treglia ] * Port to avconv, patch taken from Ubuntu. Thanks to Dimitri Ledkov for the good work. (Closes: #710411) * Update copyright holders line. * Bump Standards to 3.9.5. -- Alessio Treglia Tue, 04 Feb 2014 15:36:52 +0000 dvd-slideshow (0.8.4.2-1) unstable; urgency=low * Initial release. (Closes: #690103) -- Alessio Treglia Wed, 10 Oct 2012 20:46:33 +0100 debian/dvd-slideshow.docs0000644000000000000000000000003312346305512012611 0ustar doc/*.html dvd-slideshowrc debian/control0000644000000000000000000000327112346305512010575 0ustar Source: dvd-slideshow Section: graphics Priority: optional Maintainer: Debian Multimedia Maintainers Uploaders: Alessio Treglia , Reinhard Tartler Homepage: http://dvd-slideshow.sourceforge.net/ Standards-Version: 3.9.5 Build-Depends: debhelper (>= 7.0.50~), libsox-fmt-all Vcs-Git: git://anonscm.debian.org/pkg-multimedia/dvd-slideshow.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-multimedia/dvd-slideshow.git Package: dvd-slideshow Architecture: all Depends: dvdauthor (>= 0.6.9), libav-tools, gsfonts, imagemagick, libavcodec-extra, mjpegtools (>= 1.8.0), netpbm, sox, vorbis-tools, ${misc:Depends} Recommends: jhead, lame, twolame Description: set of tools to create DVD slideshows with menus DVD Slideshow consists in a set of tools which allows one to create slideshows-style videos from a collection of pictures. This package provides the following programs: * dir2slideshow: Generates a listing of the pictures in a given directory for easy input to dvd-slideshow. * dvd-slideshow: This is the main script. It generates a DVD-compatible MPEG2 video file with audio from a text file input listing of pictures and effects. * dvd-menu: Creates a simple DVD menu with buttons that link to MPEG2 files generated with dvd-slideshow or ones created by the user. * gallery1-to-slideshow: Generates a text file listing of the pictures visible in a given "Gallery" (http://gallery.sourceforge.net) photo album in order to easily pass the information to dvd_slideshow. * jigl2slideshow: Does the same thing as gallery2slideshow, but works on a jigl gallery. debian/dvd-slideshow.changelogs0000644000000000000000000000002312346305512013772 0ustar doc/changelog.html debian/compat0000644000000000000000000000000212346305512010365 0ustar 7 debian/rules0000755000000000000000000000023412346305512010246 0ustar #!/usr/bin/make -f %: dh $@ override_dh_installdocs: dh_installdocs -pdvd-slideshow rm debian/dvd-slideshow/usr/share/doc/dvd-slideshow/changelog.html debian/source/0000755000000000000000000000000012346305512010467 5ustar debian/source/format0000644000000000000000000000001412346305512011675 0ustar 3.0 (quilt) debian/gbp.conf0000644000000000000000000000003612346305512010605 0ustar [DEFAULT] pristine-tar = True debian/dvd-slideshow.manpages0000644000000000000000000000001012346305512013447 0ustar man/*.1 debian/patches/0000755000000000000000000000000012346305631010620 5ustar debian/patches/01_dvd-burn.patch0000644000000000000000000000070412346305512013661 0ustar Description: On most desktop configurations there's no need to gain root privileges to burn CDs. --- dvd-burn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- dvd-slideshow.orig/dvd-burn +++ dvd-slideshow/dvd-burn @@ -2,5 +2,5 @@ # example dvd burning command. I use this to burn a dvd iso image -sudo cdrecord -v driveropts=burnfree -eject -dao dev=ATAPI:0,0,0 $1 +cdrecord -v driveropts=burnfree -eject -dao dev=ATAPI:0,0,0 $1 debian/patches/03-toolame.diff0000644000000000000000000001452412346305512013336 0ustar Description: Use twolame instead of toolame. --- dvd-menu | 16 ++++++++-------- dvd-slideshow | 48 ++++++++++++++++++++++++------------------------ 2 files changed, 32 insertions(+), 32 deletions(-) --- dvd-slideshow.orig/dvd-menu +++ dvd-slideshow/dvd-menu @@ -1679,19 +1679,19 @@ echo "song=$audiofile" ffmpeg -i "$tmpdir/fade_audio.wav" -vn -y -ab "$audio_bitrate"k -acodec ac3 -ar $audio_sample_rate -ac 6 "$tmpdir/fade_audio.ac3" >> "$logfile" 2>&1 fi else - ## toolame is way faster! (3x in my test) - it=`which toolame` + ## twolame is way faster! (3x in my test) + it=`which twolame` if [ -n "$it" ] ; then - toolame_version=`toolame -h | head -n 4 | grep version | awk '{ print $3 }'` - echo "[dvd-menu] using toolame $toolame_version..." - if [ "$toolame_version" == '0.2m' ] ; then - toolame -s $audio_sample_rate -b $audio_bitrate "$tmpdir/audio.wav" "$tmpdir/audio.mp2" >> "$logfile" 2>&1 + twolame_version=`twolame -h | head -n 4 | grep version | awk '{ print $3 }'` + echo "[dvd-menu] using twolame $twolame_version..." + if [ "$twolame_version" == '0.2m' ] ; then + twolame -s $audio_sample_rate -b $audio_bitrate "$tmpdir/audio.wav" "$tmpdir/audio.mp2" >> "$logfile" 2>&1 else ## need to hard code in the sample rate here because the syntax is bad if [ "$vcd" -eq 1 ] || [ "$svcd" -eq 1 ] ; then - toolame -s 44.1 -b $audio_bitrate "$tmpdir/audio.wav" "$tmpdir/audio.mp2" >> "$logfile" 2>&1 + twolame -s 44100 -b $audio_bitrate "$tmpdir/audio.wav" "$tmpdir/audio.mp2" >> "$logfile" 2>&1 else - toolame -s 48 -b $audio_bitrate "$tmpdir/audio.wav" "$tmpdir/audio.mp2" >> "$logfile" 2>&1 + twolame -s 48000 -b $audio_bitrate "$tmpdir/audio.wav" "$tmpdir/audio.mp2" >> "$logfile" 2>&1 fi fi else --- dvd-slideshow.orig/dvd-slideshow +++ dvd-slideshow/dvd-slideshow @@ -6876,18 +6876,18 @@ if [ -n "${passed_audio[0]}" ] ; then # cleanup; exit 1 fi else - ## toolame is way faster! (3x in my test) - it=`which toolame 2> /dev/null` + ## twolame is way faster! (3x in my test) + it=`which twolame 2> /dev/null` if [ -n "$it" ] ; then - toolame_version=`toolame -h | head -n 4 | grep version | awk '{ print $3 }'` - myecho "[dvd-slideshow] using toolame $toolame_version..." - if [ "$toolame_version" == '0.2m' ] ; then - toolame -s $audio_sample_rate -b $audio_bitrate "$tmpdir/audio1.wav" "$tmpdir/audio1.mp2" >> "$outdir"/"$logfile" 2>&1 + twolame_version=`twolame -h | head -n 4 | grep version | awk '{ print $3 }'` + myecho "[dvd-slideshow] using twolame $twolame_version..." + if [ "$twolame_version" == '0.2m' ] ; then + twolame -s $audio_sample_rate -b $audio_bitrate "$tmpdir/audio1.wav" "$tmpdir/audio1.mp2" >> "$outdir"/"$logfile" 2>&1 else if [ "$vcd" -eq 1 ] || [ "$svcd" -eq 1 ] ; then - toolame -s 44.1 -b $audio_bitrate "$tmpdir/audio1.wav" "$tmpdir/audio1.mp2" >> "$outdir"/"$logfile" 2>&1 + twolame -s 44100 -b $audio_bitrate "$tmpdir/audio1.wav" "$tmpdir/audio1.mp2" >> "$outdir"/"$logfile" 2>&1 else - toolame -s 48 -b $audio_bitrate "$tmpdir/audio1.wav" "$tmpdir/audio1.mp2" >> "$outdir"/"$logfile" 2>&1 + twolame -s 48000 -b $audio_bitrate "$tmpdir/audio1.wav" "$tmpdir/audio1.mp2" >> "$outdir"/"$logfile" 2>&1 fi fi else @@ -7125,18 +7125,18 @@ if [ -n "${audio_1[0]}" ] ; then ## au fi if [ "$output_format" == 'mpg' ] || [ "$output_format" == "mpeg2" ] ; then - ## toolame is way faster! (3x in my test) - it=`which toolame 2> /dev/null` + ## twolame is way faster! (3x in my test) + it=`which twolame 2> /dev/null` if [ -n "$it" ] ; then - toolame_version=`toolame -h | head -n 4 | grep version | awk '{ print $3 }'` - myecho "[dvd-slideshow] Creating mp2 audio using toolame $toolame_version..." - if [ "$toolame_version" == '0.2m' ] ; then - toolame -s $audio_sample_rate -b $audio_bitrate "$tmpdir/audio1.wav" "$tmpdir/audio1.mp2" >> "$outdir"/"$logfile" 2>&1 + twolame_version=`twolame -h | head -n 4 | grep version | awk '{ print $3 }'` + myecho "[dvd-slideshow] Creating mp2 audio using twolame $twolame_version..." + if [ "$twolame_version" == '0.2m' ] ; then + twolame -s $audio_sample_rate -b $audio_bitrate "$tmpdir/audio1.wav" "$tmpdir/audio1.mp2" >> "$outdir"/"$logfile" 2>&1 else if [ "$vcd" -eq 1 ] || [ "$svcd" -eq 1 ] ; then - toolame -s 44.1 -b $audio_bitrate "$tmpdir/audio1.wav" "$tmpdir/audio1.mp2" >> "$outdir"/"$logfile" 2>&1 + twolame -s 44100 -b $audio_bitrate "$tmpdir/audio1.wav" "$tmpdir/audio1.mp2" >> "$outdir"/"$logfile" 2>&1 else - toolame -s 48 -b $audio_bitrate "$tmpdir/audio1.wav" "$tmpdir/audio1.mp2" >> "$outdir"/"$logfile" 2>&1 + twolame -s 48000 -b $audio_bitrate "$tmpdir/audio1.wav" "$tmpdir/audio1.mp2" >> "$outdir"/"$logfile" 2>&1 fi fi else @@ -7355,18 +7355,18 @@ if [ -n "${audio_2[0]}" ] ; then ## au cleanup; exit 1 fi else - ## toolame is way faster! (3x in my test) - it=`which toolame 2> /dev/null` + ## twolame is way faster! (3x in my test) + it=`which twolame 2> /dev/null` if [ -n "$it" ] ; then - toolame_version=`toolame -h | head -n 4 | grep version | awk '{ print $3 }'` - myecho "[dvd-slideshow] Creating mp2 audio using toolame $toolame_version..." - if [ "$toolame_version" == '0.2m' ] ; then - toolame -s $audio_sample_rate -b $audio_bitrate "$tmpdir/audio2.wav" "$tmpdir/audio2.mp2" >> "$outdir"/"$logfile" 2>&1 + twolame_version=`twolame -h | head -n 4 | grep version | awk '{ print $3 }'` + myecho "[dvd-slideshow] Creating mp2 audio using twolame $twolame_version..." + if [ "$twolame_version" == '0.2m' ] ; then + twolame -s $audio_sample_rate -b $audio_bitrate "$tmpdir/audio2.wav" "$tmpdir/audio2.mp2" >> "$outdir"/"$logfile" 2>&1 else if [ "$vcd" -eq 1 ] || [ "$svcd" -eq 1 ] ; then - toolame -s 44.1 -b $audio_bitrate "$tmpdir/audio2.wav" "$tmpdir/audio2.mp2">> "$outdir"/"$logfile" 2>&1 + twolame -s 44100 -b $audio_bitrate "$tmpdir/audio2.wav" "$tmpdir/audio2.mp2">> "$outdir"/"$logfile" 2>&1 else - toolame -s 48 -b $audio_bitrate "$tmpdir/audio2.wav" "$tmpdir/audio2.mp2" >> "$outdir"/"$logfile" 2>&1 + twolame -s 48000 -b $audio_bitrate "$tmpdir/audio2.wav" "$tmpdir/audio2.mp2" >> "$outdir"/"$logfile" 2>&1 fi fi else debian/patches/series0000644000000000000000000000014312346305614012034 0ustar 03-toolame.diff 01_dvd-burn.patch 02_dvd-menu.patch ffmpeg-avconv.patch 04_obsolete-commands.patch debian/patches/04_obsolete-commands.patch0000644000000000000000000004202212346305736015565 0ustar Description: Fix numerous syntax errors. Author: Theppitak Karoonboonyanan Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=750626 Forwarded: no --- dvd-slideshow | 72 ++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 40 insertions(+), 32 deletions(-) --- dvd-slideshow.orig/dvd-slideshow +++ dvd-slideshow/dvd-slideshow @@ -913,11 +913,11 @@ if [ "$mpeg_encoder" == 'avconv' ] ; the # use avconv's -loop option to see if it's faster with a single image piped to the yuv4mpegpipe if [ "$yuvfirstfile" -eq 1 ]; then yuvfirstfile=0 -# avconv -f image2 -loop_input -i "$1" -vframes "$myframes" -y -aspect $aspect_ratio -s "$dvd_width"x"$dvd_height" -r $framerate -an -pix_fmt yuv420p -f yuv4mpegpipe - 2>> "$avconv_err" >&9 - avconv -f image2 -loop_input -i "$1" -vframes "$myframes" -y -s "$dvd_width"x"$dvd_height" -r $framerate -an -pix_fmt yuv420p -f yuv4mpegpipe - 2>> "$avconv_err" >&9 +# avconv -f image2 -loop 1 -i "$1" -vframes "$myframes" -y -aspect $aspect_ratio -s "$dvd_width"x"$dvd_height" -r $framerate -an -pix_fmt yuv420p -f yuv4mpegpipe - 2>> "$avconv_err" >&9 + avconv -f image2 -loop 1 -i "$1" -vframes "$myframes" -y -s "$dvd_width"x"$dvd_height" -r $framerate -an -pix_fmt yuv420p -f yuv4mpegpipe - 2>> "$avconv_err" >&9 else -# avconv -f image2 -loop_input -i "$1" -vframes "$myframes" -y -aspect $aspect_ratio -s "$dvd_width"x"$dvd_height" -r $framerate -an -pix_fmt yuv420p -f yuv4mpegpipe - 2>> "$avconv_err" | yuvstrip >&9 - avconv -f image2 -loop_input -i "$1" -vframes "$myframes" -y -s "$dvd_width"x"$dvd_height" -r $framerate -an -pix_fmt yuv420p -f yuv4mpegpipe - 2>> "$avconv_err" | yuvstrip >&9 +# avconv -f image2 -loop 1 -i "$1" -vframes "$myframes" -y -aspect $aspect_ratio -s "$dvd_width"x"$dvd_height" -r $framerate -an -pix_fmt yuv420p -f yuv4mpegpipe - 2>> "$avconv_err" | yuvstrip >&9 + avconv -f image2 -loop 1 -i "$1" -vframes "$myframes" -y -s "$dvd_width"x"$dvd_height" -r $framerate -an -pix_fmt yuv420p -f yuv4mpegpipe - 2>> "$avconv_err" | yuvstrip >&9 fi else # use old method using ppmtoy4m pipe if [ "$yuvfirstfile" -eq 1 ]; then @@ -2522,7 +2522,7 @@ wavlength () # wavlength $file # returns song length in ms if [ "$soxi" == '1' ] ; then - soxi "$1" -D 1> "$tmpdir"/trash.txt + soxi -D "$1" 1> "$tmpdir"/trash.txt song_length=`cat "$tmpdir"/trash.txt` else sox "$1" $sox_nop stat 2> "$tmpdir"/trash.txt @@ -2535,7 +2535,7 @@ wavlength () rawlength () { - sox -t raw -r $audio_sample_rate $sox_word -s -c 2 "$1" $sox_nop stat 2> "$tmpdir"/trash.txt + sox -t raw -r $audio_sample_rate $sox_word $sox_int -c 2 "$1" $sox_nop stat 2> "$tmpdir"/trash.txt song_length=`cat "$tmpdir"/trash.txt | grep 'Length (seconds):' | awk -F: '{print $2}' | tr -d \[:blank:\]` song_length=$( echo "scale=0; 1000 * $song_length" | bc | awk -F. '{printf ("%3.0f", $0)}' ) rm "$tmpdir"/trash.txt @@ -3516,12 +3516,20 @@ else progver=`sox -h 2>&1 | head -n 1 | awk '{ print $3 }'` logecho "[dvd-slideshow] Found sox version $progver" progver1="$( echo ${progver#v} | awk -F. '{print $1}' )" + progver2="$( echo ${progver#v} | awk -F. '{print $2}' )" if [ $progver1 -lt 14 ] ; then # use old sox commands: sox_word='-w' + sox_int='-s' sox_nop='-e' soxi=0 - else # use new commands ( > 14.0.0 ) + elif [ $progver2 -lt 4 ]; then # use new commands ( < 14.4.0 ) sox_word='-2' + sox_int='-s' + sox_nop='-n' + soxi=1 + else # use new commands ( >= 14.4.0 ) + sox_word='-b 16' + sox_int='-e signed-integer' sox_nop='-n' soxi=1 fi @@ -6545,9 +6553,9 @@ for file in "${image[@]}"; do elif [ "$file" == 'silence' ]; then myecho "[dvd-slideshow] creating silent audio track... we will splice it later." if [ "$audiosmp" -eq 1 ] ; then - sox -t raw -s $sox_word -c 2 -r $audio_sample_rate /dev/zero -t wav -c 2 -r $audio_sample_rate "$tmpdir/audio$track"_"$audio_index_padded.wav" trim 0 1 & + sox -t raw $sox_int $sox_word -c 2 -r $audio_sample_rate /dev/zero -t wav -c 2 -r $audio_sample_rate "$tmpdir/audio$track"_"$audio_index_padded.wav" trim 0 1 & else - sox -t raw -s $sox_word -c 2 -r $audio_sample_rate /dev/zero -t wav -c 2 -r $audio_sample_rate "$tmpdir/audio$track"_"$audio_index_padded.wav" trim 0 1 + sox -t raw $sox_int $sox_word -c 2 -r $audio_sample_rate /dev/zero -t wav -c 2 -r $audio_sample_rate "$tmpdir/audio$track"_"$audio_index_padded.wav" trim 0 1 fi else myecho "[dvd-slideshow] ERROR: Unknown audio file format. Must be mp3, ogg, mp4/aac, wav, or silence" @@ -6845,7 +6853,7 @@ if [ -n "${passed_audio[0]}" ] ; then # myecho "[dvd-slideshow] fade_in_time=$fade_in_hms fade_out_time=$fade_out_hms" total_audio_length="$(( $total_audio_length + $song_length ))" myecho "[dvd-slideshow] total_audio_length=`hms $total_audio_length`" - sox -v 0.95 "$tmpdir/audio$track"_"$i_padded.wav" $sox_word -s -c 2 -r $audio_sample_rate "$tmpdir/audio1_$i_padded.raw" fade t "$fade_in_hms" "$song_length_hms" "$fade_out_hms" + sox -v 0.95 "$tmpdir/audio$track"_"$i_padded.wav" $sox_word $sox_int -c 2 -r $audio_sample_rate "$tmpdir/audio1_$i_padded.raw" fade t "$fade_in_hms" "$song_length_hms" "$fade_out_hms" let i=$i+1 myecho "[dvd-slideshow] ###############" done @@ -6855,11 +6863,11 @@ if [ -n "${passed_audio[0]}" ] ; then # # video is longer than audio. need to add silence to end. thetime_hms=`hms $(( $end_time - $total_audio_length + 1000 ))` #plus 10 so sox actually crops. myecho "[dvd-slideshow] Buffering end of audio file with silence for $thetime_hms" - sox -t raw -s $sox_word -c 2 -r $audio_sample_rate /dev/zero $sox_word -s -c 2 -r $audio_sample_rate "$tmpdir/audio1_$i_padded.raw" trim 0 "$thetime_hms" + sox -t raw $sox_int $sox_word -c 2 -r $audio_sample_rate /dev/zero $sox_word $sox_int -c 2 -r $audio_sample_rate "$tmpdir/audio1_$i_padded.raw" trim 0 "$thetime_hms" fi ## cat all the audio files together: - cat "$tmpdir"/audio1_????.raw | sox -t raw $sox_word -s -c 2 -r $audio_sample_rate - "$tmpdir/audio1.wav" + cat "$tmpdir"/audio1_????.raw | sox -t raw $sox_word $sox_int -c 2 -r $audio_sample_rate - "$tmpdir/audio1.wav" ## fade out at end of video: sox "$tmpdir/audio1.wav" "$tmpdir/audio_out.wav" fade t 0 "$end_hms" "$fade_out_hms" mv "$tmpdir/audio_out.wav" "$tmpdir/audio1.wav" @@ -6951,7 +6959,7 @@ if [ -n "${audio_1[0]}" ] ; then ## au song_end_hms=`hms $song_end_ms` song_start_hms="0" # cannot modify starting point yet... myecho "[dvd-slideshow] Creating silence audio file for $song_end_hms" - sox -t raw -s $sox_word -c 1 -r $audio_sample_rate /dev/zero $sox_word -s -c 2 -r $audio_sample_rate "$tmpdir"/audio1_$i_padded.raw trim "0" "$song_end_hms" + sox -t raw $sox_int $sox_word -c 1 -r $audio_sample_rate /dev/zero $sox_word $sox_int -c 2 -r $audio_sample_rate "$tmpdir"/audio1_$i_padded.raw trim "0" "$song_end_hms" else ## file should only be wav format at this point since it was decoded before ## all audio files are of the format "$tmpdir"/audio_1.wav @@ -7046,13 +7054,13 @@ if [ -n "${audio_1[0]}" ] ; then ## au # fade only to the end of song length now, because we may have to add silence: # We should probably eventually add the silence first, and then chop the song? if [ "$fade_in_time" -eq 0 ] && [ "$fade_out_time" -eq 0 ] ; then - sox -v $volume "$tmpdir/audio1_$i_padded.wav" $sox_word -s -c 2 -r $audio_sample_rate "$tmpdir/audio1_$i_padded.raw" + sox -v $volume "$tmpdir/audio1_$i_padded.wav" $sox_word $sox_int -c 2 -r $audio_sample_rate "$tmpdir/audio1_$i_padded.raw" else # fade in or out - sox -v $volume "$tmpdir/audio1_$i_padded.wav" $sox_word -s -c 2 -r $audio_sample_rate "$tmpdir/audio1_$i_padded.raw" fade t "$fade_in_hms" "$song_length_hms" "$fade_out_hms" + sox -v $volume "$tmpdir/audio1_$i_padded.wav" $sox_word $sox_int -c 2 -r $audio_sample_rate "$tmpdir/audio1_$i_padded.raw" fade t "$fade_in_hms" "$song_length_hms" "$fade_out_hms" fi thetime_hms=`hms $(( $song_end_ms - $song_length_ms ))` myecho "[dvd-slideshow] Adding $thetime_hms of silence to end of original audio file" - sox -t raw -s $sox_word -c 2 -r $audio_sample_rate /dev/zero $sox_word -s -c 2 -r $audio_sample_rate "$tmpdir/silence.raw" trim 0 "$thetime_hms" + sox -t raw $sox_int $sox_word -c 2 -r $audio_sample_rate /dev/zero $sox_word $sox_int -c 2 -r $audio_sample_rate "$tmpdir/silence.raw" trim 0 "$thetime_hms" cat "$tmpdir/audio1_$i_padded.raw" "$tmpdir/silence.raw" > "$tmpdir/audio.raw" mv "$tmpdir/audio.raw" "$tmpdir/audio1_$i_padded.raw" rm "$tmpdir"/silence.raw @@ -7067,13 +7075,13 @@ if [ -n "${audio_1[0]}" ] ; then ## au # echo "song_length_ms=$song_length_ms song_end_ms=$song_end_ms fade_in_time=$fade_in_time fade_out_time=$fade_out_time" if [ "$song_length_ms" -ne "$song_end_ms" ] && [ "$fade_in_time" -eq 0 ] && [ "$fade_out_time" -eq 0 ] ; then # echo "cropping" - sox -v $volume "$tmpdir/audio1_$i_padded.wav" $sox_word -s -c 2 -r $audio_sample_rate "$tmpdir/audio1_$i_padded.raw" trim 0 "$song_end_hms" + sox -v $volume "$tmpdir/audio1_$i_padded.wav" $sox_word $sox_int -c 2 -r $audio_sample_rate "$tmpdir/audio1_$i_padded.raw" trim 0 "$song_end_hms" elif [ "$fade_out_time" -ne 0 ] || [ "$fade_in_time" -ne 0 ] ; then # echo "fading" - sox -v $volume "$tmpdir/audio1_$i_padded.wav" $sox_word -s -c 2 -r $audio_sample_rate "$tmpdir/audio1_$i_padded.raw" fade t "$fade_in_hms" "$song_end_hms" "$fade_out_hms" + sox -v $volume "$tmpdir/audio1_$i_padded.wav" $sox_word $sox_int -c 2 -r $audio_sample_rate "$tmpdir/audio1_$i_padded.raw" fade t "$fade_in_hms" "$song_end_hms" "$fade_out_hms" else # echo "converting" - sox -v $volume "$tmpdir/audio1_$i_padded.wav" $sox_word -s -c 2 -r $audio_sample_rate "$tmpdir/audio1_$i_padded.raw" + sox -v $volume "$tmpdir/audio1_$i_padded.wav" $sox_word $sox_int -c 2 -r $audio_sample_rate "$tmpdir/audio1_$i_padded.raw" fi fi # now, audio should span to the end mark @@ -7082,7 +7090,7 @@ if [ -n "${audio_1[0]}" ] ; then ## au ## buffer beginning with silence: thetime_hms=`hms "${audio1_start[$i]}"` myecho "[dvd-slideshow] Adding $thetime_hms to beginning of audio file" - sox -t raw -s $sox_word -c 2 -r $audio_sample_rate /dev/zero $sox_word -s -c 2 -r $audio_sample_rate "$tmpdir/silence.raw" trim 0 "$thetime_hms" + sox -t raw $sox_int $sox_word -c 2 -r $audio_sample_rate /dev/zero $sox_word $sox_int -c 2 -r $audio_sample_rate "$tmpdir/silence.raw" trim 0 "$thetime_hms" cat "$tmpdir"/silence.raw "$tmpdir/audio1_$i_padded.raw" > "$tmpdir/audio.raw" mv "$tmpdir/audio.raw" "$tmpdir/audio1_$i_padded.raw" rm "$tmpdir"/silence.raw @@ -7101,7 +7109,7 @@ if [ -n "${audio_1[0]}" ] ; then ## au myecho "[dvd-slideshow] Creating ac3 audio..." checkforprog avconv rm -f "$tmpdir/audio1.ac3" - cat "$tmpdir"/audio1_????.raw | sox -t raw $sox_word -s -c 2 -r $audio_sample_rate - -t wav - 2> /dev/null >"$tmpdir/audio1.wav" + cat "$tmpdir"/audio1_????.raw | sox -t raw $sox_word $sox_int -c 2 -r $audio_sample_rate - -t wav - 2> /dev/null >"$tmpdir/audio1.wav" if [ $? -ne 0 ] ; then ## sox errored myecho "[dvd-slideshow] ERROR during sox execution!" @@ -7118,7 +7126,7 @@ if [ -n "${audio_1[0]}" ] ; then ## au fi else myecho "[dvd-slideshow] Converting all track 1 audio files..." - cat "$tmpdir"/audio1_????.raw | sox -t raw $sox_word -s -c 2 -r $audio_sample_rate - "$tmpdir/audio1.wav" + cat "$tmpdir"/audio1_????.raw | sox -t raw $sox_word $sox_int -c 2 -r $audio_sample_rate - "$tmpdir/audio1.wav" if [ "$debug" -ge 1 ] ; then length=`wavlength "$tmpdir/audio1.wav"` myecho "[dvd-slideshow] Actual length of .raw file=`hms $length`" @@ -7184,7 +7192,7 @@ if [ -n "${audio_2[0]}" ] ; then ## au song_end_hms=`hms $song_end_ms` song_start_hms="0" # cannot modify starting point yet... myecho "[dvd-slideshow] Creating silence audio file for $song_end_hms" - sox -t raw -s $sox_word -c 2 -r $audio_sample_rate /dev/zero $sox_word -s -c 2 -r $audio_sample_rate "$tmpdir"/audio2_$i_padded.raw trim "0" "$song_end_hms" + sox -t raw $sox_int $sox_word -c 2 -r $audio_sample_rate /dev/zero $sox_word $sox_int -c 2 -r $audio_sample_rate "$tmpdir"/audio2_$i_padded.raw trim "0" "$song_end_hms" else # not silence ## file should only be wav format at this point since it was decoded before ## all audio files are of the format "$tmpdir"/audio_2.wav @@ -7283,19 +7291,19 @@ if [ -n "${audio_2[0]}" ] ; then ## au # fade only to the end of song length now, because we may have to add silence: # We should probably eventually add the silence first, and then chop the song? if [ "$fade_in_time" -eq 0 ] && [ "$fade_out_time" -eq 0 ] ; then - sox -v $volume "$tmpdir/audio2_$i_padded.wav" $sox_word -s -c 2 -r $audio_sample_rate "$tmpdir/audio2_$i_padded.raw" + sox -v $volume "$tmpdir/audio2_$i_padded.wav" $sox_word $sox_int -c 2 -r $audio_sample_rate "$tmpdir/audio2_$i_padded.raw" else # one of the fades is nonzero: - sox -v $volume "$tmpdir/audio2_$i_padded.wav" $sox_word -s -c 2 -r $audio_sample_rate "$tmpdir/audio2_$i_padded.raw" fade t "$fade_in_hms" "$song_length_hms" "$fade_out_hms" + sox -v $volume "$tmpdir/audio2_$i_padded.wav" $sox_word $sox_int -c 2 -r $audio_sample_rate "$tmpdir/audio2_$i_padded.raw" fade t "$fade_in_hms" "$song_length_hms" "$fade_out_hms" fi thetime_hms=`hms $(( $song_end_ms - $song_length_ms + 1000 ))` #plus 1s so sox actually crops. thetime2_hms=`hms $(( $song_end_ms - $song_length_ms ))` myecho "[dvd-slideshow] Adding $thetime2_hms of silence to end of original audio file" - sox -t raw -s $sox_word -c 2 -r $audio_sample_rate /dev/zero $sox_word -s -c 2 -r $audio_sample_rate "$tmpdir/silence.raw" trim 0 "$thetime_hms" + sox -t raw $sox_int $sox_word -c 2 -r $audio_sample_rate /dev/zero $sox_word $sox_int -c 2 -r $audio_sample_rate "$tmpdir/silence.raw" trim 0 "$thetime_hms" cat "$tmpdir/audio2_$i_padded.raw" "$tmpdir/silence.raw" > "$tmpdir/audio.raw" mv "$tmpdir/audio.raw" "$tmpdir/audio2_$i_padded.raw" # hopefully there won't be many times where the audio needs to be buffered # at the end, so we'll add one extra step to make the coding easier: - sox -t raw -s $sox_word -c 2 -r $audio_sample_rate "$tmpdir/audio2_$i_padded.raw" "$tmpdir/audio2_$i_padded.wav" + sox -t raw $sox_int $sox_word -c 2 -r $audio_sample_rate "$tmpdir/audio2_$i_padded.raw" "$tmpdir/audio2_$i_padded.wav" rm "$tmpdir"/silence.raw fi if [ "$debug" -ge 2 ] ; then @@ -7307,20 +7315,20 @@ if [ -n "${audio_2[0]}" ] ; then ## au fi if [ "$song_length_ms" -ne "$song_end_ms" ] && [ "$fade_in_time" -eq 0 ] && [ "$fade_out_time" -eq 0 ] ; then # echo "cropping" - sox -v $volume "$tmpdir/audio2_$i_padded.wav" $sox_word -s -c 2 -r $audio_sample_rate "$tmpdir/audio2_$i_padded.raw" trim 0 "$song_end_hms" + sox -v $volume "$tmpdir/audio2_$i_padded.wav" $sox_word $sox_int -c 2 -r $audio_sample_rate "$tmpdir/audio2_$i_padded.raw" trim 0 "$song_end_hms" elif [ "$fade_out_time" -ne 0 ] || [ "$fade_in_time" -ne 0 ] ; then # echo "fading" - sox -v $volume "$tmpdir/audio2_$i_padded.wav" $sox_word -s -c 2 -r $audio_sample_rate "$tmpdir/audio2_$i_padded.raw" fade t "$fade_in_hms" "$song_end_hms" "$fade_out_hms" + sox -v $volume "$tmpdir/audio2_$i_padded.wav" $sox_word $sox_int -c 2 -r $audio_sample_rate "$tmpdir/audio2_$i_padded.raw" fade t "$fade_in_hms" "$song_end_hms" "$fade_out_hms" else # echo "converting" - sox -v $volume "$tmpdir/audio2_$i_padded.wav" $sox_word -s -c 2 -r $audio_sample_rate "$tmpdir/audio2_$i_padded.raw" + sox -v $volume "$tmpdir/audio2_$i_padded.wav" $sox_word $sox_int -c 2 -r $audio_sample_rate "$tmpdir/audio2_$i_padded.raw" fi fi # end of if silence or not if [ $i -eq 0 ] && [ "${audio2_start[$i]}" -ne 0 ] ; then ## buffer beginning with silence: thetime_hms=`hms "${audio2_start[$i]}"` myecho "[dvd-slideshow] Adding $thetime_hms to beginning of audio file" - sox -t raw -s $sox_word -c 2 -r $audio_sample_rate /dev/zero $sox_word -s -c 2 -r $audio_sample_rate "$tmpdir/silence.raw" trim 0 "$thetime_hms" + sox -t raw $sox_int $sox_word -c 2 -r $audio_sample_rate /dev/zero $sox_word $sox_int -c 2 -r $audio_sample_rate "$tmpdir/silence.raw" trim 0 "$thetime_hms" cat "$tmpdir"/silence.raw "$tmpdir/audio2_$i_padded.raw" > "$tmpdir/audio.raw" mv "$tmpdir/audio.raw" "$tmpdir/audio2_$i_padded.raw" rm "$tmpdir"/silence.raw @@ -7337,7 +7345,7 @@ if [ -n "${audio_2[0]}" ] ; then ## au myecho "[dvd-slideshow] Concatenating all track 2 audio files..." ## cat all the audio files together: # find "$tmpdir" -name audio2_????.raw -print0 | xargs -0 sox -t raw $sox_word -s -c 2 -r $audio_sample_rate - "$tmpdir/audio2.wav" - cat "$tmpdir"/audio2_????.raw | sox -t raw $sox_word -s -c 2 -r $audio_sample_rate - "$tmpdir/audio2.wav" + cat "$tmpdir"/audio2_????.raw | sox -t raw $sox_word $sox_int -c 2 -r $audio_sample_rate - "$tmpdir/audio2.wav" if [ "$debug" -ge 1 ] ; then length=`wavlength "$tmpdir/audio2.wav"` myecho "[dvd-slideshow] Actual length of .raw file=`hms $length`" debian/patches/ffmpeg-avconv.patch0000644000000000000000000011262412346305512014403 0ustar Description: Port from ffmpeg to avconv. Author: Dmitrijs Ledkovs --- dvd-menu | 46 ++++++------- dvd-slideshow | 200 +++++++++++++++++++++++++++++----------------------------- 2 files changed, 123 insertions(+), 123 deletions(-) --- dvd-slideshow.orig/dvd-menu +++ dvd-slideshow/dvd-menu @@ -46,7 +46,7 @@ echo 'Changes: Change imagemagick calls with -type TrueColor to -type TrueColorMatte for latest version Sox v. > 13 changes -w to -2 and -e to -n (thanks Ludovic) Font path follows links. Thanks Jim Potter! - AC3 audio created with ffmpeg needs k added to bitrate + AC3 audio created with avconv needs k added to bitrate Changed -depth 16 to -depth 8 in background gradient creation. Fix embedded image help text. Default layout will switch to two columns of buttons (no embedded image) if the button @@ -127,7 +127,7 @@ Options: [-mp2] Use MP2 audio by default. AC3 seems to be more stable - in hardware players, but requires ffmpeg. + in hardware players, but requires avconv. [-p] Use PAL format instead of NTSC (untested initial support) @@ -179,7 +179,7 @@ Requires: sox >= 14.0.0 mjpegtools (mp2enc, mpeg2enc, ppmtoy4m) ImageMagick (convert) - ffmpeg + avconv Variables: dvd-menu will read the following variables out of your ~/.dvd-slideshow/dvd-slideshowrc file. @@ -196,7 +196,7 @@ Variables: menu_panel_location_y=175 # distance of the top of the first menu item to the top of the screen menu_button_font_size=21 menu_title_justify=left - mpeg_encodr='ffmpeg' # or mpeg2enc + mpeg_encodr='avconv' # or mpeg2enc ' } @@ -664,7 +664,7 @@ function fade () if [ "$mpeg_encoder" == 'mpeg2enc' ] ; then find "$tmpdir" -name "fade*.ppm" -type f -print0 | sort -z -d | xargs -0 cat | ppmtoy4m -v 0 -n 0 -S "$subsample" -F $ppmtoy4m_frc -A $ppmtoy4m_aspect -I p | mpeg2enc $mpeg2enc_params -o "$tmpdir/fade.mpg" >> "$logfile" 2>&1 else - find "$tmpdir" -name "fade*.ppm" -type f -print0 | sort -z -d | xargs -0 cat | ppmtoy4m -v 0 -n 0 -S "$subsample" -F $ppmtoy4m_frc -A $ppmtoy4m_aspect -I p | ffmpeg -f yuv4mpegpipe -i - -target $ffmpeg_target -r $framerate -an -aspect $aspect_ratio -s "$dvd_width"x"$dvd_height" -y -f mpeg2video "$tmpdir/fade.mpg" >> "$logfile" 2>&1 + find "$tmpdir" -name "fade*.ppm" -type f -print0 | sort -z -d | xargs -0 cat | ppmtoy4m -v 0 -n 0 -S "$subsample" -F $ppmtoy4m_frc -A $ppmtoy4m_aspect -I p | avconv -f yuv4mpegpipe -i - -target $avconv_target -r $framerate -an -aspect $aspect_ratio -s "$dvd_width"x"$dvd_height" -y -f mpeg2video "$tmpdir/fade.mpg" >> "$logfile" 2>&1 fi find "$tmpdir" -name "fade*.ppm" -type f -print0 | xargs -0 rm } @@ -747,7 +747,7 @@ pal=0 continuous=0 ; continuous_method=0 no_dvdauthor=0 ac3=1 -mpeg_encoder='ffmpeg' # or 'mpeg2enc' +mpeg_encoder='avconv' # or 'mpeg2enc' iso=0 no_menu=0 autocrop=1 @@ -989,19 +989,19 @@ if [ "$vcd" -eq 1 ] ; then audio_bitrate=224 audio_sample_rate=44100 mplex_type=1 - ffmpeg_target='vcd' + avconv_target='vcd' elif [ "$svcd" -eq 1 ] ; then # setup audio parameters ac3=0 audio_bitrate=224 audio_sample_rate=44100 mplex_type=4 - ffmpeg_target='svcd' + avconv_target='svcd' else audio_bitrate=128 audio_sample_rate=48000 mplex_type=8 - ffmpeg_target='dvd' + avconv_target='dvd' fi if [ "$pal" -eq 1 ] ; then @@ -1190,27 +1190,27 @@ progver=`dvdauthor -h 2>&1 | head -n 1 | logecho "[dvd-menu] Found dvdauthor version $progver" -# ffmpeg -it=`which ffmpeg 2> /dev/null` +# avconv +it=`which avconv 2> /dev/null` if [ -z "$it" ] ; then - # no ffmpeg! use mp2 audio instead: - myecho "[dvd-menu] Warning: no ffmpeg found for AC3 audio encoding." + # no avconv! use mp2 audio instead: + myecho "[dvd-menu] Warning: no avconv found for AC3 audio encoding." myecho "[dvd-menu] Using MP2 audio instead." myecho "[dvd-menu] MP2 audio is less compatible with DVD player hardware." - myecho "[dvd-menu] http://ffmpeg.sourceforge.net" + myecho "[dvd-menu] http://avconv.sourceforge.net" ac3=0 mpeg_encoder='mpeg2enc' else - # found ffmpeg - logecho "`ffmpeg -version 2>&1`" + # found avconv + logecho "`avconv -version 2>&1`" ## check to see if we have mpeg2video output option: - it=`ffmpeg -f mpeg2video 2>&1 | grep 'Unknown input or output format: mpeg2video'` + it=`avconv -f mpeg2video 2>&1 | grep 'Unknown input or output format: mpeg2video'` if [ -z "$it" ] ; then # mpeg2video should be ok - [ "$mpeg_encoder" == 'ffmpeg' ] && mpeg_encoder='ffmpeg' + [ "$mpeg_encoder" == 'avconv' ] && mpeg_encoder='avconv' else - [ "$mpeg_encoder" == 'ffmpeg' ] && mpeg_encoder='mpeg2enc' - myecho "[dvd-menu] Warning: ffmpeg is not compiled with the mpeg2video option" + [ "$mpeg_encoder" == 'avconv' ] && mpeg_encoder='mpeg2enc' + myecho "[dvd-menu] Warning: avconv is not compiled with the mpeg2video option" myecho "[dvd-menu] required for making dvds! Using mpeg2enc instead." mpeg_encoder='mpeg2enc' fi @@ -1589,7 +1589,7 @@ if [ "$no_menu" -eq 0 ] ; then if [ "$mpeg_encoder" == 'mpeg2enc' ] ; then ppmtoy4m -v 0 -n "$frames" -r -S "$subsample" -F $ppmtoy4m_frc -A $ppmtoy4m_aspect -I p "$tmpdir/menu.ppm" | mpeg2enc $mpeg2enc_params -o "$tmpdir/menu.mpg" else - ppmtoy4m -v 0 -n "$frames" -r -S "$subsample" -F $ppmtoy4m_frc -A $ppmtoy4m_aspect -I p "$tmpdir/menu.ppm" | ffmpeg -f yuv4mpegpipe -i - -target $ffmpeg_target -r $framerate -an -aspect $aspect_ratio -s "$dvd_width"x"$dvd_height" -y -f mpeg2video "$tmpdir/menu.mpg" >> "$logfile" 2>&1 + ppmtoy4m -v 0 -n "$frames" -r -S "$subsample" -F $ppmtoy4m_frc -A $ppmtoy4m_aspect -I p "$tmpdir/menu.ppm" | avconv -f yuv4mpegpipe -i - -target $avconv_target -r $framerate -an -aspect $aspect_ratio -s "$dvd_width"x"$dvd_height" -y -f mpeg2video "$tmpdir/menu.mpg" >> "$logfile" 2>&1 fi ## or, for a background video, cat all the frame through a composite call to add the button text and mask ## all at once. (and, use transparent background for button text) @@ -1674,9 +1674,9 @@ echo "song=$audiofile" if [ "$ac3" -eq 1 ] ; then echo "[dvd-menu] Creating ac3 audio..." rm -f "$tmpdir/audio.ac3" - ffmpeg -i "$tmpdir/audio.wav" -vn -y -ab "$audio_bitrate"k -acodec ac3 -ar $audio_sample_rate -ac 6 "$tmpdir/audio.ac3" >> "$logfile" 2>&1 + avconv -i "$tmpdir/audio.wav" -vn -y -ab "$audio_bitrate"k -acodec ac3 -ar $audio_sample_rate -ac 6 "$tmpdir/audio.ac3" >> "$logfile" 2>&1 if [ "$fadein" -eq 1 ] || [ "$fadeout" -eq 1 ] ; then - ffmpeg -i "$tmpdir/fade_audio.wav" -vn -y -ab "$audio_bitrate"k -acodec ac3 -ar $audio_sample_rate -ac 6 "$tmpdir/fade_audio.ac3" >> "$logfile" 2>&1 + avconv -i "$tmpdir/fade_audio.wav" -vn -y -ab "$audio_bitrate"k -acodec ac3 -ar $audio_sample_rate -ac 6 "$tmpdir/fade_audio.ac3" >> "$logfile" 2>&1 fi else ## twolame is way faster! (3x in my test) --- dvd-slideshow.orig/dvd-slideshow +++ dvd-slideshow/dvd-slideshow @@ -52,7 +52,7 @@ echo 'Changes: 0.8.4 New features: Improved encoding speed significantly. (thanks Gary Hunt!) - Use qscale VBR option in ffmpeg for flv and mp4 output instead of fixed bitrate. + Use qscale VBR option in avconv for flv and mp4 output instead of fixed bitrate. Logo (-logo) works as general overlay (beta). Added -threads $cores to ffmepg calls for speed improvement? Added .ogg mode ( use -ogv ) (not working yet) @@ -100,7 +100,7 @@ echo 'Changes: Change LANG=C to LANG=POSIX to try to fix radix problems with printf Added some code to only process one crossfade in the background at a time. Fixed problem with subtitles- last one was not being displayed. - Added "k" to audio bitrate arguments to ffmpeg (thanks Tony!) + Added "k" to audio bitrate arguments to avconv (thanks Tony!) Fixed bug where subtitles would not show in crop and kenburns effects. Fixed bug with audio timing when using scroll & kenburns. removed -size option from crop function because large images were improperly cropped. @@ -159,7 +159,7 @@ Options: [-p] Use PAL output video format instead of NTSC [-mpeg2enc] - Force use mpeg2enc with mp2 audio even though ffmpeg is installed + Force use mpeg2enc with mp2 audio even though avconv is installed [-mp2] Use MP2 audio instead of AC3. Default audio format is now AC3 because it seems to be more @@ -571,7 +571,7 @@ kenburns_acceleration=2 # in seconds #image_postprocess='shadow' image_postprocess='none' -mpeg_encoder='ffmpeg' # or mpeg2enc. I find ffmpeg 2x faster than mpeg2enc +mpeg_encoder='avconv' # or mpeg2enc. I find avconv 2x faster than mpeg2enc output_format='mpeg2' # or flv, mpg, mp4, mp4_ipod. mpeg2 is default #output_format='flv' # or flv, mpg, mp4, mp4_ipod ignore_seq_end='-M' @@ -620,7 +620,7 @@ do # -B) shift; browsable=1 ; submenu=1 ;; # create a browsable slideshow (not working) -vcd) shift; vcd=1 ;; # use vcd resolution and mp1 audio -svcd) shift; svcd=1 ;; # use svcd resolution and mp1 audio - -mpeg2enc) shift; commandline_mpeg_encoder='mpeg2enc'; commandline_ac3=0 ;; # force using mpeg2enc/mp2 instead of ffmpeg/ac3 + -mpeg2enc) shift; commandline_mpeg_encoder='mpeg2enc'; commandline_ac3=0 ;; # force using mpeg2enc/mp2 instead of avconv/ac3 -flv) shift; output_format='flv' ;; # flv output -swf) shift; output_format='swf' ;; # swf output -mp4) shift; output_format='mp4' ;; # mp4 output @@ -706,7 +706,7 @@ if [ "$nocleanup" -eq 0 ] ; then rm -f temp_slideshow_image.ppm ; rm -f temp.ppm rm -f temp_slideshow_image_scaled.ppm rm -f "$outdir/$tmptxtfile" - # close pipe to ffmpeg/mpeg2enc ( close file descriptor 9 ) + # close pipe to avconv/mpeg2enc ( close file descriptor 9 ) exec 9>&- rm -f "$tmpdir/$yuvfifo" if [ "$yuvpid" -ne 0 ]; then @@ -896,9 +896,9 @@ encode_video () { if [ "$yuvfirstfile" -eq 1 ]; then yuvfirstfile=0 - ffmpeg -i "$1" -threads "$cores" -y -aspect $aspect_ratio -s "$dvd_width"x"$dvd_height" -r $framerate -an -pix_fmt yuv420p -f yuv4mpegpipe - 2>> "$ffmpeg_err" >&9 + avconv -i "$1" -threads "$cores" -y -aspect $aspect_ratio -s "$dvd_width"x"$dvd_height" -r $framerate -an -pix_fmt yuv420p -f yuv4mpegpipe - 2>> "$avconv_err" >&9 else - ffmpeg -i "$1" -threads "$cores" -y -aspect $aspect_ratio -s "$dvd_width"x"$dvd_height" -r $framerate -an -pix_fmt yuv420p -f yuv4mpegpipe - 2>> "$ffmpeg_err" | yuvstrip >&9 + avconv -i "$1" -threads "$cores" -y -aspect $aspect_ratio -s "$dvd_width"x"$dvd_height" -r $framerate -an -pix_fmt yuv420p -f yuv4mpegpipe - 2>> "$avconv_err" | yuvstrip >&9 fi } @@ -909,15 +909,15 @@ encode () # encode $image $frames local myimage="$1" local myframes="$2" -if [ "$mpeg_encoder" == 'ffmpeg' ] ; then - # use ffmpeg's -loop option to see if it's faster with a single image piped to the yuv4mpegpipe +if [ "$mpeg_encoder" == 'avconv' ] ; then + # use avconv's -loop option to see if it's faster with a single image piped to the yuv4mpegpipe if [ "$yuvfirstfile" -eq 1 ]; then yuvfirstfile=0 -# ffmpeg -f image2 -loop_input -i "$1" -vframes "$myframes" -y -aspect $aspect_ratio -s "$dvd_width"x"$dvd_height" -r $framerate -an -pix_fmt yuv420p -f yuv4mpegpipe - 2>> "$ffmpeg_err" >&9 - ffmpeg -f image2 -loop_input -i "$1" -vframes "$myframes" -y -s "$dvd_width"x"$dvd_height" -r $framerate -an -pix_fmt yuv420p -f yuv4mpegpipe - 2>> "$ffmpeg_err" >&9 +# avconv -f image2 -loop_input -i "$1" -vframes "$myframes" -y -aspect $aspect_ratio -s "$dvd_width"x"$dvd_height" -r $framerate -an -pix_fmt yuv420p -f yuv4mpegpipe - 2>> "$avconv_err" >&9 + avconv -f image2 -loop_input -i "$1" -vframes "$myframes" -y -s "$dvd_width"x"$dvd_height" -r $framerate -an -pix_fmt yuv420p -f yuv4mpegpipe - 2>> "$avconv_err" >&9 else -# ffmpeg -f image2 -loop_input -i "$1" -vframes "$myframes" -y -aspect $aspect_ratio -s "$dvd_width"x"$dvd_height" -r $framerate -an -pix_fmt yuv420p -f yuv4mpegpipe - 2>> "$ffmpeg_err" | yuvstrip >&9 - ffmpeg -f image2 -loop_input -i "$1" -vframes "$myframes" -y -s "$dvd_width"x"$dvd_height" -r $framerate -an -pix_fmt yuv420p -f yuv4mpegpipe - 2>> "$ffmpeg_err" | yuvstrip >&9 +# avconv -f image2 -loop_input -i "$1" -vframes "$myframes" -y -aspect $aspect_ratio -s "$dvd_width"x"$dvd_height" -r $framerate -an -pix_fmt yuv420p -f yuv4mpegpipe - 2>> "$avconv_err" | yuvstrip >&9 + avconv -f image2 -loop_input -i "$1" -vframes "$myframes" -y -s "$dvd_width"x"$dvd_height" -r $framerate -an -pix_fmt yuv420p -f yuv4mpegpipe - 2>> "$avconv_err" | yuvstrip >&9 fi else # use old method using ppmtoy4m pipe if [ "$yuvfirstfile" -eq 1 ]; then @@ -932,12 +932,12 @@ fi encode_fade () { -if [ "$mpeg_encoder" == 'ffmpeg' ] ; then +if [ "$mpeg_encoder" == 'avconv' ] ; then if [ "$yuvfirstfile" -eq 1 ]; then yuvfirstfile=0 - ffmpeg -f image2 -i "$tmpdir/fade_%04d.ppm" -y -aspect $aspect_ratio -s "$dvd_width"x"$dvd_height" -r $framerate -an -pix_fmt yuv420p -f yuv4mpegpipe - 2>> "$ffmpeg_err" >&9 + avconv -f image2 -i "$tmpdir/fade_%04d.ppm" -y -aspect $aspect_ratio -s "$dvd_width"x"$dvd_height" -r $framerate -an -pix_fmt yuv420p -f yuv4mpegpipe - 2>> "$avconv_err" >&9 else - ffmpeg -f image2 -i "$tmpdir/fade_%04d.ppm" -y -aspect $aspect_ratio -s "$dvd_width"x"$dvd_height" -r $framerate -an -pix_fmt yuv420p -f yuv4mpegpipe - 2>> "$ffmpeg_err" | yuvstrip >&9 + avconv -f image2 -i "$tmpdir/fade_%04d.ppm" -y -aspect $aspect_ratio -s "$dvd_width"x"$dvd_height" -r $framerate -an -pix_fmt yuv420p -f yuv4mpegpipe - 2>> "$avconv_err" | yuvstrip >&9 fi else # use old method by sorting through files and piping through ppmtoy4m if [ "$yuvfirstfile" -eq 1 ]; then @@ -2698,7 +2698,7 @@ duration2frames () local total_slideshow_frames=`div1000 $(( $frames_per_ms * $total_slideshow_time / 1000 ))` local frames=$(( $total_slideshow_frames - $this_start_frame )) if [ "$frames" -le 2 ] ; then - frames=2 # this is needed because ffmpeg seems to crash when encoding only one frame! + frames=2 # this is needed because avconv seems to crash when encoding only one frame! fi echo "$frames" } @@ -3445,14 +3445,14 @@ logecho "[dvd-slideshow] Using `which ba bashversion=`bash --version | head -n 1 | awk '{print $4}' | awk -F. '{print $1"."$2}'` if [ $debug -ge 2 ] ; then - ffmpeg_out="$outdir"/"$logfile" - ffmpeg_err="$outdir"/"$logfile" + avconv_out="$outdir"/"$logfile" + avconv_err="$outdir"/"$logfile" elif [ $debug -ge 1 ] ; then - ffmpeg_out="$outdir"/"$logfile" - ffmpeg_err='/dev/null' + avconv_out="$outdir"/"$logfile" + avconv_err='/dev/null' else - ffmpeg_out='/dev/null' - ffmpeg_err='/dev/null' + avconv_out='/dev/null' + avconv_err='/dev/null' fi # version of "find" @@ -3585,30 +3585,30 @@ else logecho "[dvd-slideshow] Found dvdauthor version $progver" fi -if [ "$mpeg_encoder" == 'ffmpeg' ] ; then - # ffmpeg - it=`which ffmpeg 2> /dev/null` +if [ "$mpeg_encoder" == 'avconv' ] ; then + # avconv + it=`which avconv 2> /dev/null` if [ -z "$it" ] ; then - # no ffmpeg! use mp2 audio instead: - myecho "[dvd-slideshow] Warning: no ffmpeg found for AC3 audio encoding." + # no avconv! use mp2 audio instead: + myecho "[dvd-slideshow] Warning: no avconv found for AC3 audio encoding." myecho "[dvd-slideshow] Using MP2 audio instead." myecho "[dvd-slideshow] MP2 audio is less compatible with DVD player hardware." - myecho "[dvd-slideshow] TIP: Install ffmpeg for faster video encoding also!" - myecho "[dvd-slideshow] http://ffmpeg.sourceforge.net" - myecho "[dvd-slideshow] Debian/Ubuntu: sudo apt-get install ffmpeg" + myecho "[dvd-slideshow] TIP: Install avconv for faster video encoding also!" + myecho "[dvd-slideshow] http://avconv.sourceforge.net" + myecho "[dvd-slideshow] Debian/Ubuntu: sudo apt-get install avconv" ac3=0 mpeg_encoder='mpeg2enc' else - # found ffmpeg - logecho "[dvd-slideshow] `ffmpeg -version 2>&1 | head -n 1 `" + # found avconv + logecho "[dvd-slideshow] `avconv -version 2>&1 | head -n 1 `" ## check to see if we have mpeg2video output option: - it=`ffmpeg -f mpeg2video 2>&1 | grep 'Unknown input or output format: mpeg2video'` + it=`avconv -f mpeg2video 2>&1 | grep 'Unknown input or output format: mpeg2video'` if [ -z "$it" ] ; then # mpeg2video should be ok - [ "$mpeg_encoder" == 'ffmpeg' ] && mpeg_encoder='ffmpeg' + [ "$mpeg_encoder" == 'avconv' ] && mpeg_encoder='avconv' else - [ "$mpeg_encoder" == 'ffmpeg' ] && mpeg_encoder='mpeg2enc' - myecho "[dvd-slideshow] Warning: ffmpeg is not compiled with the mpeg2video option" + [ "$mpeg_encoder" == 'avconv' ] && mpeg_encoder='mpeg2enc' + myecho "[dvd-slideshow] Warning: avconv is not compiled with the mpeg2video option" myecho "[dvd-slideshow] required for making dvds! Using mpeg2enc instead." mpeg_encoder='mpeg2enc' fi @@ -4197,7 +4197,7 @@ if [ "$output_format" == 'flv' ] ; then aspect_ratio="4:3" # what is used when output size is not this aspect ratio? audio_sample_rate=44100 audio_bitrate=64 - ffmpeg_options='' + avconv_options='' elif [ "$output_format" == 'swf' ] ; then #video_bitrate=100 if [ $high_quality -eq 1 ] ; then @@ -4217,7 +4217,7 @@ elif [ "$output_format" == 'swf' ] ; the aspect_ratio="4:3" audio_sample_rate=44100 audio_bitrate=128 - ffmpeg_options='' + avconv_options='' elif [ "$output_format" == 'mp4' ] ; then video_bitrate=1200000 if [ $high_quality -eq 1 ] ; then @@ -4238,7 +4238,7 @@ elif [ "$output_format" == 'mp4' ] ; the aspect_ratio="4:3" audio_sample_rate=44100 audio_bitrate=128 - ffmpeg_options='' + avconv_options='' elif [ "$output_format" == 'mp4_ipod' ] ; then # copied this from mp4 options, but probably don't need all these #video_bitrate=1200000 @@ -4260,9 +4260,9 @@ elif [ "$output_format" == 'mp4_ipod' ] audio_sample_rate=44100 audio_bitrate=96k ac3=1 # force ac3 - #ffmpeg_options='-level 41 crf 25 -bufsize 20000k -maxrate 25000k -g 250 -coder 1 -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -flags2 +brdo+dct8x8+bpyramid -me umh -subq 7 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -rc_eq '\''blurCplx^(1-qComp)'\'' -bf 16 -b_strategy 1 -bidir_refine 1 -refs 6 -deblockalpha 0 -deblockbeta 0' - # ffmpeg options for h.264 from http://flowplayer.org/tutorials/ffmpeg.html but not working yet - ffmpeg_options='-vcodec xvid -b 300 -qmin 3 -qmax 5 -bufsize 4096 -g 300 -acodec libfaac' + #avconv_options='-level 41 crf 25 -bufsize 20000k -maxrate 25000k -g 250 -coder 1 -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -flags2 +brdo+dct8x8+bpyramid -me umh -subq 7 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -rc_eq '\''blurCplx^(1-qComp)'\'' -bf 16 -b_strategy 1 -bidir_refine 1 -refs 6 -deblockalpha 0 -deblockbeta 0' + # avconv options for h.264 from http://flowplayer.org/tutorials/avconv.html but not working yet + avconv_options='-vcodec xvid -b 300 -qmin 3 -qmax 5 -bufsize 4096 -g 300 -acodec libfaac' elif [ "$output_format" == 'ogv' ] ; then video_bitrate=1200000 if [ $high_quality -eq 1 ] ; then @@ -4284,10 +4284,10 @@ elif [ "$output_format" == 'ogv' ] ; the audio_sample_rate=44100 audio_bitrate=128 ac3=1 # force ac3 - ffmpeg_options='' + avconv_options='' else # assume mpeg2 video output (dvd, vcd, svcd or other) video_suffix='mpg' - ffmpeg_options='' + avconv_options='' if [ "$pal" -eq 1 ] ; then framerate='25' frames_per_ms=25000 # in ms @@ -4296,19 +4296,19 @@ else # assume mpeg2 video output (dvd, # see http://www.uwasa.fi/~f76998/video/conversion if [ "$vcd" -eq 1 ] ; then dvd_width='352' ; dvd_height='288' - ffmpeg_target='pal-vcd' + avconv_target='pal-vcd' elif [ "$svcd" -eq 1 ] ; then dvd_width='480' ; dvd_height='576' - ffmpeg_target='pal-svcd' + avconv_target='pal-svcd' elif [ "$high_quality" -eq 1 ] ; then dvd_width='720' ; dvd_height='576' - ffmpeg_target='pal-dvd' + avconv_target='pal-dvd' elif [ "$low_quality" -eq 1 ] ; then dvd_width='352' ; dvd_height='288' - ffmpeg_target='pal-dvd' + avconv_target='pal-dvd' else dvd_width='720' ; dvd_height='576' - ffmpeg_target='pal-dvd' + avconv_target='pal-dvd' fi else ## NTSC framerate='29.97' @@ -4318,19 +4318,19 @@ else # assume mpeg2 video output (dvd, # see http://www.uwasa.fi/~f76998/video/conversion if [ "$vcd" -eq 1 ] ; then dvd_width='352' ; dvd_height='240' - ffmpeg_target='ntsc-vcd' + avconv_target='ntsc-vcd' elif [ "$svcd" -eq 1 ] ; then dvd_width='480' ; dvd_height='480' - ffmpeg_target='ntsc-svcd' + avconv_target='ntsc-svcd' elif [ "$high_quality" -eq 1 ] ; then dvd_width='720' ; dvd_height='480' - ffmpeg_target='ntsc-dvd' + avconv_target='ntsc-dvd' elif [ "$low_quality" -eq 1 ] ; then dvd_width='352' ; dvd_height='240' - ffmpeg_target='ntsc-dvd' + avconv_target='ntsc-dvd' else dvd_width='720' ; dvd_height='480' - ffmpeg_target='ntsc-dvd' + avconv_target='ntsc-dvd' fi fi mplex_bitrate=9500 @@ -4692,9 +4692,9 @@ for file in "${image[@]}"; do if [ "$suffix" == "mp3" ] ; then # myecho "[dvd-slideshow] decoding mp3 audio file... be patient..." if [ "$audiosmp" -eq 1 ] ; then - ffmpeg -threads "$cores" -i "$file" -y -vn -ab "$audio_bitrate"k -f wav -ar $audio_sample_rate -ac 2 "$tmpdir/audio$track"_"$audio_index_padded.wav" >> "$ffmpeg_out" 2>&1 & + avconv -threads "$cores" -i "$file" -y -vn -ab "$audio_bitrate"k -f wav -ar $audio_sample_rate -ac 2 "$tmpdir/audio$track"_"$audio_index_padded.wav" >> "$avconv_out" 2>&1 & else - ffmpeg -threads "$cores" -i "$file" -y -vn -ab "$audio_bitrate"k -f wav -ar $audio_sample_rate -ac 2 "$tmpdir/audio$track"_"$audio_index_padded.wav" >> "$ffmpeg_out" 2>&1 + avconv -threads "$cores" -i "$file" -y -vn -ab "$audio_bitrate"k -f wav -ar $audio_sample_rate -ac 2 "$tmpdir/audio$track"_"$audio_index_padded.wav" >> "$avconv_out" 2>&1 fi elif [ "$suffix" == "m4a" ] || [ "$suffix" == "aac" ] ; then # myecho "[dvd-slideshow] decoding mp4 audio... be patient." @@ -4752,8 +4752,8 @@ if [ -n "${passed_audio[0]}" ] && [ $aud audio_index_padded=`addzeros "$i_audio"` if [ "$suffix" == "mp3" ] ; then myecho "[dvd-slideshow] Decoding mp3 audio: $file" - # use ffmpeg instead of lame! - ffmpeg -threads "$cores" -i "$file" -y -vn -ab "$audio_bitrate"k -f wav -ar $audio_sample_rate -ac 2 "$tmpdir/audio$track"_"$audio_index_padded.wav" >> "$ffmpeg_out" 2>&1 + # use avconv instead of lame! + avconv -threads "$cores" -i "$file" -y -vn -ab "$audio_bitrate"k -f wav -ar $audio_sample_rate -ac 2 "$tmpdir/audio$track"_"$audio_index_padded.wav" >> "$avconv_out" 2>&1 # lame --decode "$file" "$tmpdir/audio$track"_"$audio_index_padded.wav" 2> /dev/null elif [ "$suffix" == "ogg" ] ; then checkfor_oggdec @@ -4834,34 +4834,34 @@ myecho "[dvd-slideshow] Temp dir is $( t rm -f "$tmpdir/$yuvfifo" mkfifo "$tmpdir/$yuvfifo" -if [ "$mpeg_encoder" == 'ffmpeg' ] ; then +if [ "$mpeg_encoder" == 'avconv' ] ; then if [ "$output_format" == 'flv' ] ; then # do pass one first, then add audio at the end during pass 2? # don't do mplex, do second pass instead. - # it seems that specifying the aspect ratio makes ffmpeg fail, so keep it out. + # it seems that specifying the aspect ratio makes avconv fail, so keep it out. myecho "[dvd-slideshow] Exporting .flv file" - ffmpeg -f yuv4mpegpipe -i "$tmpdir"/$yuvfifo -r $framerate -b $video_bitrate -an -s "$dvd_width"x"$dvd_height" -y -f flv "$tmpdir/video.flv" >> "$ffmpeg_out" 2>&1 & + avconv -f yuv4mpegpipe -i "$tmpdir"/$yuvfifo -r $framerate -b $video_bitrate -an -s "$dvd_width"x"$dvd_height" -y -f flv "$tmpdir/video.flv" >> "$avconv_out" 2>&1 & elif [ "$output_format" == 'swf' ] ; then # do pass one first, then add audio at the end during pass 2? # don't do mplex, do second pass instead. myecho "[dvd-slideshow] Exporting .swf file" - ffmpeg -threads "$cores" -f yuv4mpegpipe -i "$tmpdir"/$yuvfifo -r $framerate $qscale -an -s "$dvd_width"x"$dvd_height" -y -f flv "$tmpdir/video.swf" 1> /dev/null 2>> "$ffmpeg_out" & + avconv -threads "$cores" -f yuv4mpegpipe -i "$tmpdir"/$yuvfifo -r $framerate $qscale -an -s "$dvd_width"x"$dvd_height" -y -f flv "$tmpdir/video.swf" 1> /dev/null 2>> "$avconv_out" & elif [ "$output_format" == 'mp4' ] ; then myecho '[dvd-slideshow] Exporting .mp4 file' - ffmpeg -threads "$cores" -f yuv4mpegpipe -i "$tmpdir"/$yuvfifo -r $framerate $qscale -an -s "$dvd_width"x"$dvd_height" -y -f mp4 -vcodec mpeg4 "$tmpdir/video.mp4" >> "$ffmpeg_out" 2>&1 & + avconv -threads "$cores" -f yuv4mpegpipe -i "$tmpdir"/$yuvfifo -r $framerate $qscale -an -s "$dvd_width"x"$dvd_height" -y -f mp4 -vcodec mpeg4 "$tmpdir/video.mp4" >> "$avconv_out" 2>&1 & elif [ "$output_format" == 'mp4_ipod' ] ; then myecho "[dvd-slideshow] Exporting ipod .mp4 file" - ffmpeg -y -f yuv4mpegpipe -i "$tmpdir"/$yuvfifo -an -threads 0 -vcodec libx264 -refs 5 -subq 5 -crf 30 -maxrate 768000 -bufsize 244 -r $framerate -level 13 -s "$dvd_width"x"$dvd_height" -f mp4 "$tmpdir/video.mp4" >> "$ffmpeg_out" 2>&1 & + avconv -y -f yuv4mpegpipe -i "$tmpdir"/$yuvfifo -an -threads 0 -vcodec libx264 -refs 5 -subq 5 -crf 30 -maxrate 768000 -bufsize 244 -r $framerate -level 13 -s "$dvd_width"x"$dvd_height" -f mp4 "$tmpdir/video.mp4" >> "$avconv_out" 2>&1 & elif [ "$output_format" == 'ogv' ] ; then myecho "[dvd-slideshow] Exporting .ogv file" - ffmpeg -threads "$cores" -f yuv4mpegpipe -i "$tmpdir"/$yuvfifo -r $framerate $qscale -an -s "$dvd_width"x"$dvd_height" -y -f ogg -vcodec libtheora "$tmpdir/video.ogv" >> "$ffmpeg_out" 2>&1 & + avconv -threads "$cores" -f yuv4mpegpipe -i "$tmpdir"/$yuvfifo -r $framerate $qscale -an -s "$dvd_width"x"$dvd_height" -y -f ogg -vcodec libtheora "$tmpdir/video.ogv" >> "$avconv_out" 2>&1 & elif [ "$output_format" == 'mpg' ] ; then # do pass one first, then add audio at the end during pass 2? # don't do mplex, do second pass instead. myecho "[dvd-slideshow] Exporting .mpg file" - ffmpeg -threads "$cores" -f yuv4mpegpipe -i "$tmpdir"/$yuvfifo -r $framerate -an -aspect $aspect_ratio -s "$dvd_width"x"$dvd_height" -y -f mpeg2video "$tmpdir/video.mpg" >> "$ffmpeg_out" 2>&1 & + avconv -threads "$cores" -f yuv4mpegpipe -i "$tmpdir"/$yuvfifo -r $framerate -an -aspect $aspect_ratio -s "$dvd_width"x"$dvd_height" -y -f mpeg2video "$tmpdir/video.mpg" >> "$avconv_out" 2>&1 & else # default mpeg2 video for dvd/vcd - ffmpeg -threads "$cores" -f yuv4mpegpipe -i "$tmpdir"/$yuvfifo -target $ffmpeg_target -r $framerate -an -aspect $aspect_ratio -s "$dvd_width"x"$dvd_height" -y -bf 2 -f mpeg2video "$tmpdir/video.mpg" >> "$ffmpeg_out" 2>&1 & + avconv -threads "$cores" -f yuv4mpegpipe -i "$tmpdir"/$yuvfifo -target $avconv_target -r $framerate -an -aspect $aspect_ratio -s "$dvd_width"x"$dvd_height" -y -bf 2 -f mpeg2video "$tmpdir/video.mpg" >> "$avconv_out" 2>&1 & fi else if [ "$output_format" == 'mpg' -o "$output_format" == 'mpeg2' ] ; then @@ -5157,7 +5157,7 @@ for file in "${image[@]}"; do [ $debug -ge 1 ] && myecho "[dvd-slideshow] end_frame_number=$slide_end_frame end_time=$slide_end_hms" myecho "[dvd-slideshow]############################################################" elif [ "${avi_file[$i]}" -eq 1 ] ; then ########## AVI - ## use ffmpeg to encode video. No audio. + ## use avconv to encode video. No audio. myecho "[dvd-slideshow] AVI file passed." [ "$manual_chapter_markers" -eq 0 ] && write_chap=1 # check for bad syntax: @@ -5178,9 +5178,9 @@ for file in "${image[@]}"; do # let's re-encode it just to make sure every video works: # this is really inefficient, but it should work. if [ "$pal" -eq 1 ] ; then - ffmpeg -threads "$cores" -i "${image[$i]}" -target pal-dvd "$tmpdir"/tmp.avi >> "$ffmpeg_out" 2>&1 + avconv -threads "$cores" -i "${image[$i]}" -target pal-dvd "$tmpdir"/tmp.avi >> "$avconv_out" 2>&1 else - ffmpeg -threads "$cores" -i "${image[$i]}" -target ntsc-dvd "$tmpdir"/tmp.avi >> "$ffmpeg_out" 2>&1 + avconv -threads "$cores" -i "${image[$i]}" -target ntsc-dvd "$tmpdir"/tmp.avi >> "$avconv_out" 2>&1 fi encode_video "$tmpdir"/tmp.avi # now remove the temporary file (thanks for fix by Marc Wäckerlin) @@ -5203,10 +5203,10 @@ for file in "${image[@]}"; do # echo "audio_1=${audio_1[$i_audio]}" i_audio=$(( $i_audio + 1 )) # increment for next file - ffmpeg -threads "$cores" -i "${image[$i]}" -y -vn -ar $audio_sample_rate -ac 2 "$tmpdir/audio1_$audio_index_padded".wav >> "$ffmpeg_out" 2>&1 + avconv -threads "$cores" -i "${image[$i]}" -y -vn -ar $audio_sample_rate -ac 2 "$tmpdir/audio1_$audio_index_padded".wav >> "$avconv_out" 2>&1 if [ $? -ne 0 ] ; then - ## ffmpeg errored - myecho "[dvd-slideshow] ERROR during ffmpeg execution!" + ## avconv errored + myecho "[dvd-slideshow] ERROR during avconv execution!" myecho "[dvd-slideshow] see $outdir/$logfile for details" cleanup; exit 1 fi @@ -6522,9 +6522,9 @@ for file in "${image[@]}"; do if [ "$suffix" == "mp3" ] ; then myecho "[dvd-slideshow] decoding mp3 audio file... be patient..." if [ "$audiosmp" -eq 1 ] ; then - ffmpeg -threads "$cores" -i "$file" -y -vn -ab "$audio_bitrate"k -f wav -ar $audio_sample_rate -ac 2 "$tmpdir/audio$track"_"$audio_index_padded.wav" >> "$ffmpeg_out" 2>&1 & + avconv -threads "$cores" -i "$file" -y -vn -ab "$audio_bitrate"k -f wav -ar $audio_sample_rate -ac 2 "$tmpdir/audio$track"_"$audio_index_padded.wav" >> "$avconv_out" 2>&1 & else - ffmpeg -threads "$cores" -i "$file" -y -vn -ab "$audio_bitrate"k -f wav -ar $audio_sample_rate -ac 2 "$tmpdir/audio$track"_"$audio_index_padded.wav" >> "$ffmpeg_out" 2>&1 + avconv -threads "$cores" -i "$file" -y -vn -ab "$audio_bitrate"k -f wav -ar $audio_sample_rate -ac 2 "$tmpdir/audio$track"_"$audio_index_padded.wav" >> "$avconv_out" 2>&1 fi elif [ "$suffix" == "m4a" ] || [ "$suffix" == "aac" ] ; then if [ "$audiosmp" -eq 1 ] ; then @@ -6794,7 +6794,7 @@ fi ############################### Wait for mpeg2enc to finish # just close the fifo and wait for the encoder to finish -logecho "[dvd-slideshow] mpeg2enc/ffmpeg process=$yuvpid" +logecho "[dvd-slideshow] mpeg2enc/avconv process=$yuvpid" logecho "[dvd-slideshow] output from ps:" logecho "`ps $yuvpid`" # close pipe to mpeg2enc @@ -6866,12 +6866,12 @@ if [ -n "${passed_audio[0]}" ] ; then # ## mpeg2 audio: ## AC3 audio may be more compatible: if [ "$ac3" -eq 1 ] && [ "$output_format" != 'flv' ] ; then - checkforprog ffmpeg + checkforprog avconv myecho "[dvd-slideshow] Creating ac3 audio for $file..." - ffmpeg -threads "$cores" -i "$tmpdir/audio1.wav" -y -vn -ab "$audio_bitrate"k -acodec ac3 -vol "100" -ar $audio_sample_rate -ac 6 "$tmpdir/audio1.ac3" >> "$ffmpeg_out" 2>&1 + avconv -threads "$cores" -i "$tmpdir/audio1.wav" -y -vn -ab "$audio_bitrate"k -acodec ac3 -vol "100" -ar $audio_sample_rate -ac 6 "$tmpdir/audio1.ac3" >> "$avconv_out" 2>&1 if [ $? -ne 0 ] ; then - ## ffmpeg errored - myecho "[dvd-slideshow] ERROR during ffmpeg execution!" + ## avconv errored + myecho "[dvd-slideshow] ERROR during avconv execution!" myecho "[dvd-slideshow] see $outdir/$logfile for details" cleanup; exit 1 fi @@ -7099,7 +7099,7 @@ if [ -n "${audio_1[0]}" ] ; then ## au ## AC3 audio may be more compatible: if [ "$ac3" -eq 1 ] && [ "$output_format" == 'mpeg2' ]; then myecho "[dvd-slideshow] Creating ac3 audio..." - checkforprog ffmpeg + checkforprog avconv rm -f "$tmpdir/audio1.ac3" cat "$tmpdir"/audio1_????.raw | sox -t raw $sox_word -s -c 2 -r $audio_sample_rate - -t wav - 2> /dev/null >"$tmpdir/audio1.wav" if [ $? -ne 0 ] ; then @@ -7108,11 +7108,11 @@ if [ -n "${audio_1[0]}" ] ; then ## au myecho "[dvd-slideshow] see $outdir/$logfile for details" cleanup; exit 1 fi - ffmpeg -threads "$cores" -i "$tmpdir/audio1.wav" -vn -ab "$audio_bitrate"k -acodec ac3 -vol "100" -ar $audio_sample_rate -ac 6 "$tmpdir/audio1.ac3" >> "$ffmpeg_out" 2>&1 -# ffmpeg -threads "$cores" -i "$tmpdir/audio1.wav" -vn -ab "$audio_bitrate"k -acodec ac3 -ar $audio_sample_rate -ac 6 "$tmpdir/audio1.ac3" >> "$outdir/$logfile" 2>&1 + avconv -threads "$cores" -i "$tmpdir/audio1.wav" -vn -ab "$audio_bitrate"k -acodec ac3 -vol "100" -ar $audio_sample_rate -ac 6 "$tmpdir/audio1.ac3" >> "$avconv_out" 2>&1 +# avconv -threads "$cores" -i "$tmpdir/audio1.wav" -vn -ab "$audio_bitrate"k -acodec ac3 -ar $audio_sample_rate -ac 6 "$tmpdir/audio1.ac3" >> "$outdir/$logfile" 2>&1 if [ $? -ne 0 ] ; then - ## ffmpeg errored - myecho "[dvd-slideshow] ERROR during ffmpeg execution!" + ## avconv errored + myecho "[dvd-slideshow] ERROR during avconv execution!" myecho "[dvd-slideshow] see $outdir/$logfile for details" cleanup; exit 1 fi @@ -7345,12 +7345,12 @@ if [ -n "${audio_2[0]}" ] ; then ## au ## AC3 audio may be more compatible: if [ "$ac3" -eq 1 ] && [ "$output_format" == 'mpeg2' ] ; then # only if dvd output myecho "[dvd-slideshow] Creating ac3 audio..." - checkforprog ffmpeg + checkforprog avconv rm -f "$tmpdir/audio2.ac3" - ffmpeg -threads "$cores" -i "$tmpdir"/audio2.wav -vn -ab "$audio_bitrate"k -acodec ac3 -vol "100" -ar $audio_sample_rate -ac 6 "$tmpdir/audio2.ac3" >> "$ffmpeg_out" 2>&1 + avconv -threads "$cores" -i "$tmpdir"/audio2.wav -vn -ab "$audio_bitrate"k -acodec ac3 -vol "100" -ar $audio_sample_rate -ac 6 "$tmpdir/audio2.ac3" >> "$avconv_out" 2>&1 if [ $? -ne 0 ] ; then - ## ffmpeg errored - myecho "[dvd-slideshow] ERROR during ffmpeg execution!" + ## avconv errored + myecho "[dvd-slideshow] ERROR during avconv execution!" myecho "[dvd-slideshow] see $outdir/$logfile for details" cleanup; exit 1 fi @@ -7382,7 +7382,7 @@ fi ## check to make sure the output files exist before running mplex: if [ ! -f "$tmpdir/video.$video_suffix" ] ; then myecho "[dvd-slideshow] ERROR: no output .$video_suffix file found!" - myecho "[dvd-slideshow] This usually happens when ffmpeg screws up something" + myecho "[dvd-slideshow] This usually happens when avconv screws up something" myecho "[dvd-slideshow] or one image is messed up and the resulting video can't be created" fi @@ -7402,33 +7402,33 @@ if [ "$output_format" == 'flv' ] ; then mv "$tmpdir/video.flv" "$outdir"/"$slideshow_name".flv else myecho "[dvd-slideshow] Adding audio to .flv file" - ffmpeg -threads "$cores" -y -i "$tmpdir/audio1.wav" -i "$tmpdir/video.flv" -vcodec copy -f flv -ar 22050 -ab 48 -ac 1 "$tmpdir/video1.flv" >> "$ffmpeg_out" 2>&1 + avconv -threads "$cores" -y -i "$tmpdir/audio1.wav" -i "$tmpdir/video.flv" -vcodec copy -f flv -ar 22050 -ab 48 -ac 1 "$tmpdir/video1.flv" >> "$avconv_out" 2>&1 mv "$tmpdir/video1.flv" "$outdir"/"$slideshow_name".flv fi # myecho "[dvd-slideshow] Generating video thumbnail..." -# ffmpeg -threads "$cores" -y -i "$outdir"/"$slideshow_name".flv -f mjpeg -t 0.001 "$outdir"/"$slideshow_name".jpg >> "$ffmpeg_out" 2>&1 +# avconv -threads "$cores" -y -i "$outdir"/"$slideshow_name".flv -f mjpeg -t 0.001 "$outdir"/"$slideshow_name".jpg >> "$avconv_out" 2>&1 if [ -f "/usr/bin/flvtool2" ] ; then myecho "[dvd-slideshow] Running flvtool2 -U $slideshow_name".flv /usr/bin/flvtool2 -U "$outdir"/"$slideshow_name".flv fi elif [ "$output_format" == 'swf' ] ; then myecho "[dvd-slideshow] Adding audio to .swf file" - ffmpeg -threads "$cores" -y -i "$tmpdir/audio1.wav" -i "$tmpdir"/video.swf -vcodec copy -f flv -ar 22050 -ab 48 -ac 1 "$tmpdir"/video1.swf >> "$ffmpeg_out" 2>&1 + avconv -threads "$cores" -y -i "$tmpdir/audio1.wav" -i "$tmpdir"/video.swf -vcodec copy -f flv -ar 22050 -ab 48 -ac 1 "$tmpdir"/video1.swf >> "$avconv_out" 2>&1 mv "$tmpdir"/video1.swf "$outdir"/"$slideshow_name".swf # myecho "[dvd-slideshow] Generating video thumbnail..." -# ffmpeg -threads "$cores" -y -i "$outdir"/"$slideshow_name".swf -f mjpeg -t 0.001 "$outdir"/"$slideshow_name".jpg >> "$ffmpeg_out" 2>&1 +# avconv -threads "$cores" -y -i "$outdir"/"$slideshow_name".swf -f mjpeg -t 0.001 "$outdir"/"$slideshow_name".jpg >> "$avconv_out" 2>&1 elif [ "$output_format" == 'mp4' ] ; then myecho "[dvd-slideshow] Adding audio to .mp4 file" -# myecho ffmpeg -threads "$cores" -y -i "$tmpdir/audio1.wav" -i "$tmpdir"/video.mp4 -vcodec copy -f mp4 -ar 22050 -ab 128k -ac 1 "$tmpdir"/video1.mp4 '>>' "$ffmpeg_out" '2>&1' - ffmpeg -threads "$cores" -y -i "$tmpdir"/audio1.wav -i "$tmpdir"/video.mp4 -vcodec copy -f mp4 -ar 22050 -ab 128k -ac 1 "$tmpdir"/video1.mp4 >> "$ffmpeg_out" 2>&1 +# myecho avconv -threads "$cores" -y -i "$tmpdir/audio1.wav" -i "$tmpdir"/video.mp4 -vcodec copy -f mp4 -ar 22050 -ab 128k -ac 1 "$tmpdir"/video1.mp4 '>>' "$avconv_out" '2>&1' + avconv -threads "$cores" -y -i "$tmpdir"/audio1.wav -i "$tmpdir"/video.mp4 -vcodec copy -f mp4 -ar 22050 -ab 128k -ac 1 "$tmpdir"/video1.mp4 >> "$avconv_out" 2>&1 mv "$tmpdir"/video1.mp4 "$outdir"/"$slideshow_name".mp4 elif [ "$output_format" == 'mp4_ipod' ] ; then myecho "[dvd-slideshow] Exporting ipod .mp4 file" - ffmpeg -threads "$cores" -y -i "$tmpdir/audio1.wav" -i "$tmpdir"/video.mp4 -vcodec copy -f mp4 -ar 22050 -ab 48 -ac 1 "$tmpdir"/video1.mp4 >> "$ffmpeg_out" 2>&1 + avconv -threads "$cores" -y -i "$tmpdir/audio1.wav" -i "$tmpdir"/video.mp4 -vcodec copy -f mp4 -ar 22050 -ab 48 -ac 1 "$tmpdir"/video1.mp4 >> "$avconv_out" 2>&1 mv "$tmpdir"/video1.mp4 "$outdir"/"$slideshow_name".mp4 elif [ "$output_format" == 'ogv' ] ; then myecho "[dvd-slideshow] Adding audio to .ogv file" - ffmpeg -threads "$cores" -y -i "$tmpdir/audio1.wav" -i "$tmpdir"/video.ogv -vcodec copy -f ogg -acodec libvorbis -ac 1 "$tmpdir"/video1.ogv >> "$ffmpeg_out" 2>&1 + avconv -threads "$cores" -y -i "$tmpdir/audio1.wav" -i "$tmpdir"/video.ogv -vcodec copy -f ogg -acodec libvorbis -ac 1 "$tmpdir"/video1.ogv >> "$avconv_out" 2>&1 mv "$tmpdir"/video1.ogv "$outdir"/"$slideshow_name".ogv elif [ -n "${audio_2[0]}" ] && [ "$vcd" -eq 0 -a "$svcd" -eq 0 ] ; then ## two audio tracks! debian/patches/02_dvd-menu.patch0000644000000000000000000000110112346305512013650 0ustar Description: Enable dvdauthor's -w option. --- dvd-menu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- dvd-slideshow.orig/dvd-menu +++ dvd-slideshow/dvd-menu @@ -836,7 +836,7 @@ do -c) shift; continuous=1 ; continuous_method=1 ;; -D) shift; no_dvdauthor=1 ;; # -W) shift; no_white=1 ;; -# -w) shift; widescreen=1 ;; # not supported in dvdauthor + -w) shift; widescreen=1 ;; # not supported in dvdauthor -L) shift; low_quality=1 ;; -H) shift; high_quality=1 ;; # not used yet... -M) shift; high_quality=0 ; low_quality=0 ;; # Force normal quality