Answers.Body: <p>The scale filter will adjust the sample aspect ratio to maintain the original display aspect ratio, which is 16:9 for your input. Use the SAR filter to reset the SAR after scaling.</p>
  
  <pre><code>ffmpeg -i 1.mp4 -vf scale=2000:100,setsar=1 2.mp4
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-10T23:45:19.337Z
Answers.Text: @Abelisto, you may see [this answer](https://video.stackexchange.com/a/27792/18155), too, for detailed description of SAR, PAR, and DAR.
Answers.UserDisplayName: MarianD
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-02T08:42:52.533Z
Answers.LastActivityDate: 2019-11-02T08:42:52.533Z
Answers.UserDisplayName: Gyan
Body: <p>I am confused a bit. <code>scale</code> video filter does not scales the video to specified dimensions but doing something different.</p>
  
  <p>For example:</p>
  
  <pre>
  $ youtube-dl -f 134 https://youtu.be/aqz-KE-bpKQ -o 1.mp4 # download file 640x360    360p  723k , avc1.4d401e, 30fps, video only, 24.87MiB
  $ ffmpeg -i 1.mp4 -vf scale=2000:100 2.mp4
  $ ffplay 1.mp4 & ffplay 2.mp4 &
  </pre>
  
  <p>I am awaiting that the second video will be deformed as wide and narrow at height, but:</p>
  
  <p><a href="https://i.sstatic.net/QQ7YU.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/QQ7YU.png" alt="enter image description here"></a></p>
  
  <p>Here is output of <code>ffprobe</code> for both files:</p>
  
  <pre>
  $ ffprobe 1.mp4
  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4':
    Metadata:
      major_brand     : dash
      minor_version   : 0
      compatible_brands: iso6avc1mp41
      creation_time   : 2018-12-12T10:08:34.000000Z
    Duration: 00:10:34.57, start: 0.000000, bitrate: 328 kb/s
      Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 640x360 [SAR 1:1 DAR 16:9], 0 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
      Metadata:
        creation_time   : 2018-12-12T10:08:34.000000Z
        handler_name    : ISO Media file produced by Google Inc. Created on: 12/12/2018.
  $ ffprobe 2.mp4
  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2.mp4':
    Metadata:
      major_brand     : isom
      minor_version   : 512
      compatible_brands: isomiso2avc1mp41
      encoder         : Lavf57.83.100
    Duration: 00:10:34.57, start: 0.000000, bitrate: 443 kb/s
      Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 2000x100 [SAR 4:45 DAR 16:9], 440 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
      Metadata:
        handler_name    : VideoHandler
  </pre>
  
  <p>So, I missed something or video filter works in wrong way? How to fix this?</p>
  
  <p>PS:</p>
  
  <pre>
  $ ffmpeg -version
  ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
  configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
  </pre>
  
Tags: <ffmpeg><scale>
Title: FFmpeg scale video filter does not working as expected
UserDisplayName: Abelisto
ThreadText: # FFmpeg scale video filter does not working as expected
  
  (Asked by: username_0 on 2019-11-02)
  
  I am confused a bit. `scale` video filter does not scales the video to specified dimensions but doing something different.
  
  For example:
  
  ```
  
  $ youtube-dl -f 134 https://youtu.be/aqz-KE-bpKQ -o 1.mp4 # download file 640x360    360p  723k , avc1.4d401e, 30fps, video only, 24.87MiB
  $ ffmpeg -i 1.mp4 -vf scale=2000:100 2.mp4
  $ ffplay 1.mp4 & ffplay 2.mp4 &
  
  ```
  
  I am awaiting that the second video will be deformed as wide and narrow at height, but:
  
  [![enter image description here](https://i.sstatic.net/QQ7YU.png)](https://i.sstatic.net/QQ7YU.png)
  
  Here is output of `ffprobe` for both files:
  
  ```
  
  $ ffprobe 1.mp4
  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4':
    Metadata:
      major_brand     : dash
      minor_version   : 0
      compatible_brands: iso6avc1mp41
      creation_time   : 2018-12-12T10:08:34.000000Z
    Duration: 00:10:34.57, start: 0.000000, bitrate: 328 kb/s
      Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 640x360 [SAR 1:1 DAR 16:9], 0 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
      Metadata:
        creation_time   : 2018-12-12T10:08:34.000000Z
        handler_name    : ISO Media file produced by Google Inc. Created on: 12/12/2018.
  $ ffprobe 2.mp4
  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2.mp4':
    Metadata:
      major_brand     : isom
      minor_version   : 512
      compatible_brands: isomiso2avc1mp41
      encoder         : Lavf57.83.100
    Duration: 00:10:34.57, start: 0.000000, bitrate: 443 kb/s
      Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 2000x100 [SAR 4:45 DAR 16:9], 440 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
      Metadata:
        handler_name    : VideoHandler
  
  ```
  
  So, I missed something or video filter works in wrong way? How to fix this?
  
  PS:
  
  ```
  
  $ ffmpeg -version
  ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
  configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
  
  ```
  
  **Tags:** ffmpeg, scale
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-11-02. Score: 3 | Accepted answer
  
  The scale filter will adjust the sample aspect ratio to maintain the original display aspect ratio, which is 16:9 for your input. Use the SAR filter to reset the SAR after scaling.
  
  ```
  ffmpeg -i 1.mp4 -vf scale=2000:100,setsar=1 2.mp4
  
  ```
  
  > **Comments:**
  > **username_2**: @username_0, you may see [this answer](https://video.stackexchange.com/a/27792/18155), too, for detailed description of SAR, PAR, and DAR.  
  
  ---
  
  