Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am converting each type video to .flv video using FFmpeg but for some videos I got

"Segmentation fault" error why this error was occurred?

my code to convert .flv file is

function convert_flv($vidtime,$infile, $outfile, $w = 0, $h = 0, $extra_infile = '', $extra_outfile = '') { $parms = ''; if($w == 0 && $h == 0) { //$parms .= '-sameq '; } else { $parms = '-s {$w}x{$h} '; }

if($vidtime==60)
{
    $cmd = ffmpeg($infile, $outfile, $parms.' '.$extra_infile, '-t 00:01:00 -ar 22050 -r 15 -f flv  '.$extra_outfile);

}
else
{
    $cmd = ffmpeg($infile, $outfile, $parms.' '.$extra_infile, '-t 00:04:00 -ar 22050 -r 15 -f flv  '.$extra_outfile);
}

print_r($cmd);
return $cmd;

}

and I am trying to convert .mp4 file.

share|improve this question

migrated from stackoverflow.com Jun 25 '10 at 18:55

This question came from our site for professional and enthusiast programmers.

    
Please elaborate. What are the parameters you are passing to ffmpeg, type of original videos etc... –  Jan Hančič Jun 24 '10 at 9:21
    
my function for convert to .flv is function convert_flv($vidtime,$infile, $outfile, $w = 0, $h = 0, $extra_infile = '', $extra_outfile = '') { $parms = ''; if($w == 0 && $h == 0) { //$parms .= '-sameq '; } else { $parms = '-s {$w}x{$h} '; } if($vidtime==60) { $cmd = ffmpeg($infile, $outfile, $parms.' '.$extra_infile, '-t 00:01:00 -ar 22050 -r 15 -f flv '.$extra_outfile); } else { $cmd = ffmpeg($infile, $outfile, $parms.' '.$extra_infile, '-t 00:04:00 -ar 22050 -r 15 -f flv '.$extra_outfile); } print_r($cmd); return $cmd; } and I am trying to convert .mp4 file. –  Anonymous Jun 25 '10 at 6:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.