Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Dvd-slideshow error
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
wbrokow1
Guru
Guru


Joined: 03 Jan 2005
Posts: 372

PostPosted: Sat May 12, 2007 4:30 pm    Post subject: Dvd-slideshow error Reply with quote

It seems that when dvd-slideshow passes parameters to ffmpeg to multiplex the audio and video together it is not in the correct format.
kmedia factory also generates the same error in ffmpeg.

I believe the issue is when the bitrate for the audio is set as -b 224 it must now be -b 224k or some thing like that.
Anyone know how to approach solving this problem.
THanks
Back to top
View user's profile Send private message
pteppic
l33t
l33t


Joined: 28 Nov 2005
Posts: 781

PostPosted: Sat May 12, 2007 5:29 pm    Post subject: Reply with quote

The following pulls any instance of ffmpeg that uses -b in the dvd-slideshow files and dumps it to screen.
Code:
grep "ffmpeg.* \-b " `equery files dvd-slideshow`
From there you can work out what the sed replace syntax would be to add the "k" after the video bitrate
Code:
grep ffmpeg /usr/bin/dvd-slideshow|grep "\-b "|sed 's/-b $video_bitrate/-b ${video_bitrate}k/g'
grep ffmpeg /usr/bin/dvd-slideshow|grep "\-b "|sed 's/-b 700 -qm/-b 700k -qm/g'
Check the only instances of what you are going to replace are the ones you want to (they should be but...)
Code:
grep "\-b 700 -qm\|\-b \$video_bitrate" /usr/bin/dvd-slideshow


All OK? Now, you can add the two sed expressions together and make
Code:
sed -i 's/-b 700 -qm/-b 700k -qm/g; s/-b $video_bitrate/-b ${video_bitrate}k/g' /usr/bin/dvd-slideshow
which should fix it. Once it's done (assuming it works) save the expressions somewhere, so next time you emerge dvd-slideshow you don't have to do it all again from scratch.

EDIT:You may have to repeat for -maxrate too, I'm not too sure.
Code:
sed -i 's/ -maxrate\( [0-9]*\) / -maxrate \1k /' /usr/bin/dvd-slideshow


No warranty is offered with this post.
Back to top
View user's profile Send private message
wbrokow1
Guru
Guru


Joined: 03 Jan 2005
Posts: 372

PostPosted: Sun May 13, 2007 3:24 am    Post subject: Reply with quote

I was wrong about the -b it was -ab; anyway. I am a little lost with your help.
here is the output of the command you recommended.

Code:
mythtv@wbrokow1 ~ $ grep "ffmpeg.* \-ab " `equery files dvd-slideshow`
/usr/bin/dvd-encode:    nice ffmpeg -i "audio.wav" -y -vn -ab 192 -acodec ac3 -ar 48000 -ac 6 audio.ac3
/usr/bin/dvd-encode:#   ffmpeg -i "$filename" -y -vn -ab 192 -acodec ac3 -ar 48000 -ac 6 audio.ac3
/usr/bin/dvd-encode:    ffmpeg -i "audio.wav" -y -vn -ab 192 -acodec ac3 -ar 48000 -ac 6 audio.ac3
/usr/bin/dvd-menu:              ffmpeg -i "$tmpdir/audio.wav" -vn -y -ab 192 -acodec ac3 -ar 48000 -ac 6 "$tmpdir/audio.ac3" >> "$logfile" 2>&1
/usr/bin/dvd-slideshow:         ffmpeg -i "$tmpdir/audio1.wav" -y -vn -ab 192 -acodec ac3 -ar 48000 -ac 6 "$tmpdir/audio1.ac3" >> "$outdir/$logfile" 2>&1
/usr/bin/dvd-slideshow:         ffmpeg -i "$tmpdir/audio1.wav" -vn -ab 192 -acodec ac3 -ar 48000 -ac 6 "$tmpdir/audio1.ac3" >> "$outdir/$logfile" 2>&1
/usr/bin/dvd-slideshow:         ffmpeg -i "$tmpdir/audio2.wav" -vn -ab 192 -acodec ac3 -ar 48000 -ac 6 "$tmpdir/audio2.ac3" >> "$outdir/$logfile" 2>&1
mythtv@wbrokow1 ~ $

Now exactly what do I type to get the "k" next to the bitrate ?
Thanks so much.
Back to top
View user's profile Send private message
pteppic
l33t
l33t


Joined: 28 Nov 2005
Posts: 781

PostPosted: Sun May 13, 2007 9:11 am    Post subject: Reply with quote

Code:
sed -i 's/-ab 192 -acodec/-ab 192k -acodec/g' /usr/bin/dvd-encode
sed -i 's/-ab 192 -acodec/-ab 192k -acodec/g' /usr/bin/dvd-menu
sed -i 's/-ab 192 -acodec/-ab 192k -acodec/g' /usr/bin/dvd-slideshow



I'll see if I can make human readable enough to understand
Quote:
sed(stream editor) -i(edit file in place) 's(substitute)/find this text/replace with this text/g(every occurence)' /file/to/edit


I don't know what dvd-slideshow version you are using, but mine has a bunch of '$audio_bitrate' used with ffmpeg too.
Back to top
View user's profile Send private message
shazam75
Guru
Guru


Joined: 18 Mar 2006
Posts: 563
Location: Brisbane, Australia

PostPosted: Sat Jul 07, 2007 2:51 am    Post subject: Reply with quote

Hi pteppic

Thank you so much for your help - I came across this same error and after using your sed command, ffmeg now works!!!

Again thanks alot!!!

Regards
Shelton.
_________________
answer an unanswered post:
https://forums.gentoo.org/search.php?search_id=unanswered
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum