Author Topic: aspect ratios  (Read 3975 times)

jpbazinet

  • Newbie
  • *
  • Posts: 10
aspect ratios
« on: August 23, 2007, 10:39:26 AM »
Realized something today that I find peculiar...

The converter.php script had mencoder encoding movies at 450:400... which is an aspect ratio of 1.125 (?)

The player has movies playing at 450:347... a (correct) aspect ratio of 4:3
It has overstretch true which is 'squishing' the 400 down to it's correct 347.

Why aren't videos being encoded at 450:347 and set overstretch to false?

mrvideo

  • Newbie
  • *
  • Posts: 4
Re: aspect ratios
« Reply #1 on: January 14, 2008, 11:58:31 PM »
I am interested in this too. What does the 450:400 setting do? I read that someione suggested changing to 500:400. But that's not 4:3. Shouldn't it be 450:338 for a true 4:3 ?

Thanks
Perry

sationus

  • Newbie
  • *
  • Posts: 94
Re: aspect ratios
« Reply #2 on: January 15, 2008, 12:24:45 AM »
that would be nice to know... also, since people are going to take a look at mencoder, any idea on how to put a watermark in w/ it?

mrvideo

  • Newbie
  • *
  • Posts: 4
Re: aspect ratios
« Reply #3 on: January 15, 2008, 01:16:47 AM »
According to this help file:
http://www.mplayerhq.hu/DOCS/HTML/en/mencoder.html

13.6 -

-vf scale=width:hight

So, according to my calculations 4:3 would be 450:338

Perry

Elbo

  • Guest
Re: aspect ratios
« Reply #4 on: January 15, 2008, 01:51:32 AM »
you can change it on your own... so why don't do it and tell us, if its better than?

sbcjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6247
    • PHPmotion Mods
Re: aspect ratios
« Reply #5 on: July 03, 2008, 10:51:03 PM »
Yes- many have changed the overstretch.  Here's some help:
http://phpmotion.com/forum/index.php/topic,5228.msg29533.html#msg29533

X-Rayden

  • Guest
Re: aspect ratios
« Reply #6 on: August 03, 2008, 10:13:13 PM »
I was checking for a fix so i remember that we have ffmpeg suposedly include on our server.

so i've figured out i could use some code like this in converter.php :

Code: [Select]
extension_loaded('ffmpeg') or die('Error in loading ffmpeg');

$video_width_we_want = 450;

$moviecheckup = new ffmpeg_movie($avi_file);
$v_hauteur = $moviecheckup->getFrameHeight();
$v_largeur = $moviecheckup->getFrameWidth();
$v_ratio = $moviecheckup->getPixelFormat();
if($v_ratio != "1:1") {
# it in another ratio BY DESIGN
$asptect_detected = explode(':',$v_ratio);
$video_height_we_want = floor( ( 450 * $asptect_detected[1] ) / $asptect_detected[0] );
} else {
#we'll get its ratio by filesize...
$video_height_we_want = floor( ( 450 * $v_largeur ) / $v_hauteur );
}

but my test file cought something like :

"Error in loading ffmpeg"

so i'm back to square 1.

X-Rayden

  • Guest
Re: aspect ratios
« Reply #7 on: September 12, 2008, 10:10:21 AM »
anybody?

who's done the converter.php code ?