<p>Hi there I googled for hours but no success to solve...</p>

<p>This code works for me</p>

<pre><code>exec("ffmpeg -i $SourcePath -ar 22050 -ab 32 -f wemp -vf scale=500x400,setdar=16:9  $uploadpath1 2&gt;&amp;1");
</code></pre>

<p>but the output video will be stretch or squish...I don't want it...what can I to do?<img src="https://i.sstatic.net/MBkf6.jpg" alt="enter image description here"></p>

CC BY-SA 3.0
2014-05-19T13:30:49.533Z
Why are you doubling the size in the first place?  You can't simply increase image quality.  This doesn't do anything other than increase the file size and decrease the overall quality.
AJ Henderson
CC BY-SA 3.0
2014-05-19T15:04:00.340Z
The quality is not my business...I want to define an standard size frame for my all videos...and each inputed video change to this size frame but without stretch or squish
user2726957
CC BY-SA 3.0
2014-05-19T15:22:06.957Z
Are all your videos the same aspect ratio to begin with?  If they are not, you will need to do cropping then?  If they are, is there a reason you can't scale at playback?  Display size is independent of actual pixels in the video.
AJ Henderson
CC BY-SA 3.0
2014-05-19T17:38:47.230Z
What is the reason for forcing videos into this frame size? If you want fixed dimensions you should only scale the video down to a fixed width, not both, and add the black borders in your application.
timonsku
CC BY-SA 3.0
2014-05-20T13:24:38.767Z
I want to do it as youtube...all youtube videos are same width and height to show...
user2726957
CC BY-SA 3.0
2014-09-25T07:44:04.377Z
Have you looked at this answer to a similar question? http://video.stackexchange.com/questions/9947/how-do-i-change-frame-size-preserving-width-using-ffmpeg?rq=1
denjello
<video><ffmpeg>
ffmpeg-php with fixed width and height and without stretch or squish
user2726957
# ffmpeg-php with fixed width and height and without stretch or squish

(Asked by: username_0 on 2014-05-19)

Hi there I googled for hours but no success to solve...
This code works for me
exec("ffmpeg -i $SourcePath -ar 22050 -ab 32 -f wemp -vf scale=500x400,setdar=16:9  $uploadpath1 2>&1");

but the output video will be stretch or squish...I don't want it...what can I to do?

**Tags:** video, ffmpeg

> **Comments:**
> **username_1**: Why are you doubling the size in the first place?  You can't simply increase image quality.  This doesn't do anything other than increase the file size and decrease the overall quality.  
> **username_0**: The quality is not my business...I want to define an standard size frame for my all videos...and each inputed video change to this size frame but without stretch or squish  
> **username_1**: Are all your videos the same aspect ratio to begin with?  If they are not, you will need to do cropping then?  If they are, is there a reason you can't scale at playback?  Display size is independent of actual pixels in the video.  
> **username_2**: What is the reason for forcing videos into this frame size? If you want fixed dimensions you should only scale the video down to a fixed width, not both, and add the black borders in your application.  
> **username_0**: I want to do it as youtube...all youtube videos are same width and height to show...  
> **username_3**: Have you looked at this answer to a similar question? http://video.stackexchange.com/questions/9947/how-do-i-change-frame-size-preserving-width-using-ffmpeg?rq=1  

---

## 0 answers

