Body: <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>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-05-19T13:30:49.533Z
Comments.Text: 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.
Comments.UserDisplayName: AJ Henderson
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-05-19T15:04:00.340Z
Comments.Text: 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
Comments.UserDisplayName: user2726957
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-05-19T15:22:06.957Z
Comments.Text: 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.
Comments.UserDisplayName: AJ Henderson
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-05-19T17:38:47.230Z
Comments.Text: 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.
Comments.UserDisplayName: timonsku
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-05-20T13:24:38.767Z
Comments.Text: I want to do it as youtube...all youtube videos are same width and height to show...
Comments.UserDisplayName: user2726957
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-09-25T07:44:04.377Z
Comments.Text: 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
Comments.UserDisplayName: denjello
Tags: <video><ffmpeg>
Title: ffmpeg-php with fixed width and height and without stretch or squish
UserDisplayName: user2726957
ThreadText: # 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?![enter image description here](https://i.sstatic.net/MBkf6.jpg)
  
  **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
  
  