tags:

views:

38

answers:

1

Hello,

When I record a video(.mov) through my iPhone it display vertically which 

is right

but after converting .mov to .flv(using ffmpeg) it dispaly horizontally. can you please suggest a solution

how can I convert a video Vertically and not horizontally.

my code 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;

}

A: 

The orientation is a meta-data field in the video file - the actual file is not recorded in an alternate orientation. You would need to apply a transform in ffmpeg to rotate the video.

Yann Ramin
Hello,Thanks for quick reply, how can i apply transform in ffmpeg?