google-code-export / tovid

Automatically exported from code.google.com/p/tovid
1 stars 0 forks source link

Invoking ffmpeg with /dev/zero for input causes it to die from SIGFPE #150

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It seems that, when a silent menu is requested, tovid attempts to generate a 
silent audio file by invoking ffmpeg as:

ffmpeg -f s16le -i /dev/zero -ac 2 -ar 48000 -ab 224k -t 4 -acodec ac3 -y 
audio.ac3

This causes ffmpeg (tested with both 0.7.7 and 0.8.6) to die on start-up from 
SIGFPE, because it attempts to divide by zero. I reported the issue to ffmpeg ( 
https://ffmpeg.org/trac/ffmpeg/ticket/666 ), but tovid may need a different 
approach to reliably generating silence...

Original issue reported on code.google.com by virtuale...@gmail.com on 18 Nov 2011 at 6:04

GoogleCodeExporter commented 9 years ago
FFMPEG 0.8  Floating point exception
line 779 in makemenu creating the 4 seconds of backgound audio the audio rate 
needs to be specified before the -f aswell as the current position in the 
command. eg 
CURRENT:

AUDIO_CMD="ffmpeg -f s16le -i /dev/zero -ac 2 -ar $SAMPRATE -ab 224k \
        $MENU_LENGTH -acodec $ASUF -y \"$AUDIO_STREAM\""

SHOULD BE:

AUDIO_CMD="ffmpeg -ar $SAMPRATE -f s16le -i /dev/zero -ac 2 -ar $SAMPRATE -ab 
224k \
        $MENU_LENGTH -acodec $ASUF -y \"$AUDIO_STREAM\""

this fixs the issue of the floating point execption that occurs currently.
See ffmpeg ticket below
http://ffmpeg.org/trac/ffmpeg/ticket/324#comment:4

Original comment by zzebs...@gmail.com on 18 Nov 2011 at 3:46

GoogleCodeExporter commented 9 years ago
Does `-ar $SAMPRATE' really needs to be specified twice for the work-around to 
work?

Original comment by virtuale...@gmail.com on 18 Nov 2011 at 4:45

GoogleCodeExporter commented 9 years ago
Here is the patch, which -- I think -- covers all occurrences, where ffmpeg is 
invoked with /dev/zero as argument.

Original comment by virtuale...@gmail.com on 18 Nov 2011 at 10:01

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thanks for the patch.  You should specify which version of tovid the patch is 
for - is it tovid-0.31 ?  I will be providing a patch for tovid-0.34 taken from 
SVN, where this workaround has already been implemented.  Thanks again for 
reporting, and please in future stick to current tovid version or SVN version 
for bug reports.  Patches for older versions can always be posted to the 
tovid-users mailing list.

Original comment by grepper@gmail.com on 28 Nov 2011 at 2:13

GoogleCodeExporter commented 9 years ago
For users of current tovid: 0.34.  Here is the patch for this issue, affecting 
makemenu and makempg.  It was already added to todisc in this release, but 
didn't make it into these 2 scripts.
http://code.google.com/p/tovid/downloads/detail?name=tovid-0.34_ffmpeg_silence.p
atch&can=2&q=

Original comment by grepper@gmail.com on 28 Nov 2011 at 6:52

GoogleCodeExporter commented 9 years ago
tovid-0.30 is the last version available on SourceForge (along with the 
patches-collection in tovid-0.30.2.patch.gz):

http://heanet.dl.sourceforge.net/project/tovid/tovid/

If you moved the project out of SourceForge, perhaps, a note should be posted 
on the old location(s)...

Original comment by virtuale...@gmail.com on 2 Dec 2011 at 12:27