Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
07-14-2008, 01:49 PM
|
#1
|
Member
Registered: Oct 2006
Location: india
Distribution: fedora 8, ubuntu 10.10
Posts: 318
Rep:
|
dvd-slideshow gives problem with ffmpeg encoder
I am using fedora8 and would like to try out a program called dvd-slideshow. It generates slideshows from .jpgs with audio and ken burns effect.
Everything is working alright till the audio conversion starts - the program aborts with an error:-
[dvd-slideshow] Creating ac3 audio...
FFmpeg version SVN-r11070, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --prefix=/usr --incdir=/usr/include/ffmpeg --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --arch=i386 --extra-cflags=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables --enable-liba52 --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libxvid --enable-libx264 --enable-pp --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-optimizations --disable-strip
libavutil version: 49.5.0
libavcodec version: 51.48.0
libavformat version: 51.19.0
built on Jun 25 2008 09:25:21, gcc: 4.1.2 20070925 (Red Hat 4.1.2-33)
Input #0, wav, from 'pipe:':
Duration: N/A, bitrate: 1536 kb/s
Stream #0.0: Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s
WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s
Output #0, ac3, to '/opt/dvd-slideshow-0.8.0-1/dvd-slideshow_temp_10206/audio1.ac3':
Stream #0.0: Audio: ac3, 48000 Hz, 5:1, 0 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Error while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
[dvd-slideshow] ERROR during ffmpeg execution!
[dvd-slideshow] see /opt/dvd-slideshow-0.8.0-1/dvd-slideshow.log for details
[dvd-slideshow] cleanup...
can someone help me out....
thanks in advance
nishith
|
|
|
07-15-2008, 01:34 AM
|
#2
|
Bash Guru
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852
|
What version of dvd-slideshow are you using? A year or so ago ffmpeg changed the way it reads the bitrate options, and now it needs the setting to be in bits per second instead of kilobits per second*. If your version of dvd-slideshow is too old, it might be passing the wrong bitrate to the program.
It could also be just a bug in the script. dvd-slideshow is really just a collection of shell scripts for automating things, so you might even be able to open the thing up and fix it yourself if you know anything about scripting.
Have you tried using mp2 output instead of ac3?
* The ffmpeg command line flags -b and -ab now need to be set either with the number in bits, e.g. '-ab 192000', or with a 'k' at the end, e.g. '-ab 192k. It used to use kilobytes per second, so many old scripts and examples will break.
|
|
|
07-15-2008, 04:45 AM
|
#3
|
Member
Registered: Oct 2006
Location: india
Distribution: fedora 8, ubuntu 10.10
Posts: 318
Original Poster
Rep:
|
thanks for your response.
I am using dvd-slideshow 0.8.0-1 from the sourceforge website.
I have indeed tried to use mp2 output instead of ac3 and I specified in the .dvd-slideshowrc file as the directives :-
#ac3=1 # ac3 audio commented out
ac3=0 # use mpeg2 audio by default
Now I did google around a bit on my own and understood that there is something about the bit rate setting I have to do maybe ?!? and I did open up the shell script dvd-slideshow, but I was totally overwhelmed by the code and got lost.
So could you tell me what to do and where to fix that ?
thanks in advance
nishith
|
|
|
10-27-2008, 09:15 PM
|
#4
|
LQ Newbie
Registered: Oct 2008
Posts: 2
Rep:
|
dvd-slideshow patch to fix ffmpeg bitrate error
David the H. - thank you mucho - you saved me a lot of time.
I just edited the script and got it to work - thanks for the tip on the bitrate. Here are the changes I made. (This is a diff -u output and could be fed to patch if you like.)
--- /usr/bin/dvd-slideshow 2006-12-26 21:42:24.000000000 -0500
+++ dvd-slideshow 2008-10-27 21:47:54.000000000 -0400
@@ -3987,6 +3990,7 @@
if [ "$vcd" -eq 1 ] ; then
ac3=0 # force mp2
audio_bitrate=224
+ faudio_bitrate=224000
video_bitrate='1152'
audio_sample_rate=44100
mplex_type=1
@@ -3995,6 +3999,7 @@
elif [ "$svcd" -eq 1 ] ; then
ac3=0 # force mp2
audio_bitrate=128
+ faudio_bitrate=128000
video_bitrate='4500'
audio_sample_rate=44100
mplex_type=4
@@ -4002,6 +4007,7 @@
mpeg2enc_params="-v 0 -4 2 -2 1 -H -b 2500 -n n -s -f $mplex_type"
else
audio_bitrate=192
+ faudio_bitrate=192000
video_bitrate='3800'
audio_sample_rate=48000
mplex_type=8
@@ -4174,7 +4180,7 @@
# checkfor_lame
myecho "[dvd-slideshow] Decoding mp3 audio: $file"
# use ffmpeg instead of lame!
- ffmpeg -i "$file" -y -vn -ab $audio_bitrate -f wav -ar $audio_sample_rate -ac 2 "$tmpdir/audio$track"_"$audio_index_padded.wav" >> "$outdir/$logfile" 2>&1
+ ffmpeg -i "$file" -y -vn -ab $faudio_bitrate -f wav -ar $audio_sample_rate -ac 2 "$tmpdir/audio$track"_"$audio_index_padded.wav" >> "$outdir/$logfile" 2>&1
# lame --decode "$file" "$tmpdir/audio$track"_"$audio_index_padded.wav" 2> /dev/null
elif [ "$suffix" == "ogg" ] ; then
checkfor_oggdec
@@ -5815,11 +5821,11 @@
checkfor_lame
myecho "[dvd-slideshow] decoding mp3 audio file... be patient..."
if [ "$audiosmp" -eq 1 ] ; then
- ffmpeg -i "$file" -y -vn -ab $audio_bitrate -f wav -ar $audio_sample_rate -ac 2 "$tmpdir/audio$track"_"$audio_index_padded.wav" >> "$outdir/$logfile" 2>&1 &
+ ffmpeg -i "$file" -y -vn -ab $faudio_bitrate -f wav -ar $audio_sample_rate -ac 2 "$tmpdir/audio$track"_"$audio_index_padded.wav" >> "$outdir/$logfile" 2>&1 &
# lame --decode "${file}" "$tmpdir/audio$track"_"$audio_index_padded.wav" 2> /dev/null &
# ffmpeg -i "$file" -y -vn -ab $audio_bitrate -acodec pcm_s16be -f s16be -ar $audio_sample_rate -ac 2 "$tmpdir/audio$track"_"$audio_index_padded.raw" >> "$outdir/$logfile" 2>&1 &
else
- ffmpeg -i "$file" -y -vn -ab $audio_bitrate -f wav -ar $audio_sample_rate -ac 2 "$tmpdir/audio$track"_"$audio_index_padded.wav" >> "$outdir/$logfile" 2>&1
+ ffmpeg -i "$file" -y -vn -ab $faudio_bitrate -f wav -ar $audio_sample_rate -ac 2 "$tmpdir/audio$track"_"$audio_index_padded.wav" >> "$outdir/$logfile" 2>&1
# lame --decode "${file}" "$tmpdir/audio$track"_"$audio_index_padded.wav" 2> /dev/null
# ffmpeg -i "$file" -y -vn -ab $audio_bitrate -acodec pcm_s16be -f s16be -ar $audio_sample_rate -ac 2 "$tmpdir/audio$track"_"$audio_index_padded.raw" >> "$outdir/$logfile" 2>&1
fi
@@ -6103,7 +6109,7 @@
if [ "$ac3" -eq 1 ] && [ "$output_format" != 'flv' ] ; then
checkforprog ffmpeg
myecho "[dvd-slideshow] Creating ac3 audio for $file..."
- ffmpeg -i "$tmpdir/audio1.wav" -y -vn -ab $audio_bitrate -acodec ac3 -ar $audio_sample_rate -ac 6 "$tmpdir/audio1.ac3" >> "$outdir/$logfile" 2>&1
+ ffmpeg -i "$tmpdir/audio1.wav" -y -vn -ab $faudio_bitrate -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!"
@@ -6317,11 +6323,13 @@
## AC3 audio may be more compatible:
if [ "$ac3" -eq 1 ] && [ "$output_format" != 'flv' ]; then
- myecho "[dvd-slideshow] Creating ac3 audio..."
+ myecho "[dvd-slideshow] Creating ac3 audio 1 ..."
checkforprog ffmpeg
check_rm "$tmpdir/audio1.ac3"
# find "$tmpdir" -name audio1_\?\?\?\?.raw -print0 | xargs -0 sox -t raw -w -s -c 2 -r $audio_sample_rate - "$tmpdir/audio1.wav"
- cat "$tmpdir"/audio1_????.raw | sox -t raw -w -s -c 2 -r $audio_sample_rate - -t wav - 2> /dev/null | ffmpeg -i - -vn -ab $audio_bitrate -acodec ac3 -ar $audio_sample_rate -ac 6 "$tmpdir/audio1.ac3" >> "$outdir/$logfile" 2>&1
+ echo "cat $tmpdir/audio1_????.raw | sox -t raw -w -s -c 2 -r $audio_sample_rate - -t wav - 2> /dev/null | ffmpeg -i - -vn -ab $faudio_bitrate -acodec ac3 -ar $audio_sample_rate -ac 6 $tmpdir/audio1.ac3 >> $outdir/$logfile"
+
+ cat "$tmpdir"/audio1_????.raw | sox -t raw -w -s -c 2 -r $audio_sample_rate - -t wav - 2> /dev/null | ffmpeg -i - -vn -ab $faudio_bitrate -acodec ac3 -ar $audio_sample_rate -ac 6 "$tmpdir/audio1.ac3" >> "$outdir/$logfile" 2>&1
# ffmpeg -i "$tmpdir/audio1.wav" -vn -ab $audio_bitrate -acodec ac3 -ar $audio_sample_rate -ac 6 "$tmpdir/audio1.ac3" >> "$outdir/$logfile" 2>&1
if [ $? -ne 0 ] ; then
## ffmpeg errored
@@ -6329,6 +6337,7 @@
myecho "[dvd-slideshow] see $outdir/$logfile for details"
cleanup; exit 1
fi
+ echo "=== Done 1 ==="
else
myecho "[dvd-slideshow] Concatenating all audio files..."
## cat all the audio files together:
@@ -6547,16 +6556,18 @@
fi
## AC3 audio may be more compatible:
if [ "$ac3" -eq 1 ] && [ "$output_format" != 'flv' ] ; then
- myecho "[dvd-slideshow] Creating ac3 audio..."
+ myecho "[dvd-slideshow] Creating ac3 audio 2 ..."
checkforprog ffmpeg
check_rm "$tmpdir/audio2.ac3"
- ffmpeg -i "$tmpdir/audio2.wav" -vn -ab $audio_bitrate -acodec ac3 -ar $audio_sample_rate -ac 6 "$tmpdir/audio2.ac3" >> "$outdir/$logfile" 2>&1
+ echo "ffmpeg -i $tmpdir/audio2.wav -vn -ab $faudio_bitrate -acodec ac3 -ar $audio_sample_rate -ac 6 $tmpdir/audio2.ac3 >> $outdir/$logfile 2>&1"
+ ffmpeg -i "$tmpdir/audio2.wav" -vn -ab $faudio_bitrate -acodec ac3 -ar $audio_sample_rate -ac 6 "$tmpdir/audio2.ac3" >> "$outdir/$logfile" 2>&1
if [ $? -ne 0 ] ; then
## ffmpeg errored
myecho "[dvd-slideshow] ERROR during ffmpeg execution!"
myecho "[dvd-slideshow] see $outdir/$logfile for details"
cleanup; exit 1
fi
+ echo "==== Done ===="
else
## toolame is way faster! (3x in my test)
it=`which toolame`
|
|
|
11-09-2008, 09:47 PM
|
#5
|
Member
Registered: Feb 2006
Location: Costa Rica
Distribution: GalliumOS, Lubuntu
Posts: 84
Rep:
|
yea that works, just edit the bitrate part
|
|
|
All times are GMT -5. The time now is 04:08 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|