tags:

views:

173

answers:

1

I wrote a little daemon in Perl that calls up FFMpeg to encode a video but the encoding stops after 5 or so seconds.

I use this piece of code to start it:

my $t = `echo '$ffmpeg_command' >>$self->{FFMPEG_OUTPUT}`;
my $log_data = `$ffmpeg_command 2>>$self->{FFMPEG_OUTPUT}`;

Any ideas?

If I start the FFMpeg command myself it works fine by the way.

+3  A: 

Ok, I found it myself

It was an IO lock, apparently you will have to add </dev/null at the end of the command

My above statement will look like this:

my $log_data = `$ffmpeg_command 2>>$self->{FFMPEG_OUTPUT} </dev/null`;
Bjorn Bailleul