Forum Replies Created

  • Aaron Mcconnell

    July 13, 2012 at 4:47 pm in reply to: Width and Height reversed

    Hey,

    Again, thanks for all your suggestions and help. I’ve downloaded my own version of FFMPEG and run some of the other utilities (ffprobe, ffplay).

    It is definitely ffmpeg that is interpreting the video wrong. Basically what is happening is that in QuickTime, the video plays as it should vertically as 720×1280. But, using ffplay or the ffprobe command you suggested before, the video is being read horizontally as 1280×720.

    The file is MOV recorded on an iPhone. Not sure why this should make any difference, but maybe it does.

    Any ideas at all what might cause this? And also any ideas for a fix?

    Thanks.

    -Aaron

  • Aaron Mcconnell

    July 5, 2012 at 7:41 pm in reply to: Width and Height reversed

    I appreciate your help. However, I am working on a hosted site. It looks like ffprobe was not installed with ffmpeg. Anyway, these commands do not work. Any ideas on how to returnn the width and height using just ffmpeg command? Thanks.

  • Aaron Mcconnell

    July 2, 2012 at 4:36 am in reply to: Width and Height reversed

    I borrowed some PHP code that uses ffmpeg to get the video info. Here it is:

    $command = ‘/usr/bin/ffmpeg’ . ‘ -i ‘ . $video . ‘ -vstats 2>&1’;
    $output = shell_exec ( $command );

    $result = ereg ( ‘[0-9]?[0-9][0-9][0-9]x[0-9][0-9][0-9][0-9]?’, $output, $regs );

    if (isset ( $regs [0] )) {
    $vals = (explode ( ‘x’, $regs [0] ));
    $width = $vals [0] ? $vals [0] : null;
    $height = $vals [1] ? $vals [1] : null;
    }

    echo $width . ” x ” . $height;

    I don’t see anything wrong with this. I think it’s actually ffmpeg that is assuming the larger value is the width. How do I correct this? Any ideas? Thanks.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy