Answers.Body: <p>Your output is 3K video at 60fps. That's going to be tough for most average machines to play on its own (without whatever overhead powerpoint imposes). Do you really need such a high res video at that frame rate?</p>
  <p>First thing I would do is drop the frame rate to 30fps, and if it's acceptable, maybe scale the resolution back closer to 1080p.</p>
  <p>Last thing I would do is drop the AVI container and msmpeg4v2 codec. Use h.264/mp4, it's more compatible with more devices, and can leverage hardware decoding on many machines.</p>
  <p>Putting it all together you'd have</p>
  <pre><code>ffmpeg -i input.avi -r 30 -vf scale=1920:1478 output.mp4
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-07-05T05:43:10.440Z
Answers.LastActivityDate: 2020-07-05T05:43:10.440Z
Answers.UserDisplayName: stib
Body: <p>I have a few AVI videos of very high bit-rate ( 6.0 Second video is 72 MB in size ). I want to put these videos in a Microsoft PowerPoint presentation, and since there are a few 10 such videos the size of the presentation file is getting too high.</p>
  <p>I  want to compress these videos to have a reasonable size. I used <code>ffmpeg</code> to compress these videos. I used the command
  <code>ffmpeg -i input.avi -vcodec msmpeg4v2 output.avi</code>
  and it gave me a compressed video of size 9.0 MB. But these new videos are not playing smoothly in Powerpoint (they are playing in other media players though).</p>
  <p>it is playing with hiccups. I assume I compressed the video with wrong parameter/encoding making it difficult to play.</p>
  <p>Can anyone suggest me the optimum parameter/arguments to use with FFmpeg in compressing these videos? The output of <code>ffmpeg -i input.avi</code> is given here.</p>
  <pre><code>ffmpeg version 2.8.15-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg developers
    built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
    configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --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-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --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-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
    libavutil      54. 31.100 / 54. 31.100
    libavcodec     56. 60.100 / 56. 60.100
    libavformat    56. 40.101 / 56. 40.101
    libavdevice    56.  4.100 / 56.  4.100
    libavfilter     5. 40.101 /  5. 40.101
    libavresample   2.  1.  0 /  2.  1.  0
    libswscale      3.  1.101 /  3.  1.101
    libswresample   1.  2.101 /  1.  2.101
    libpostproc    53.  3.100 / 53.  3.100
  [mjpeg @ 0x23154c0] Changeing bps to 8
  Input #0, avi, from '11_stte_frst_mode.avi':
    Metadata:
      encoder         : Lavf56.40.101
    Duration: 00:00:05.02, start: 0.000000, bitrate: 120249 kb/s
      Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg/unknown/unknown), 3200x2464, 120629 kb/s, 60 fps, 60 tbr, 60 tbn, 60 tbc
  
  
  
  </code></pre>
  <p>I'm using Ubuntu 16.0, I have also a Windows machine. But it will be easier if I can fix in Ubuntu.</p>
  <p>The details of the output file is this,</p>
  <pre><code>ffmpeg version 2.8.15-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg developers
    built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
    configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --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-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --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-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
    libavutil      54. 31.100 / 54. 31.100
    libavcodec     56. 60.100 / 56. 60.100
    libavformat    56. 40.101 / 56. 40.101
    libavdevice    56.  4.100 / 56.  4.100
    libavfilter     5. 40.101 /  5. 40.101
    libavresample   2.  1.  0 /  2.  1.  0
    libswscale      3.  1.101 /  3.  1.101
    libswresample   1.  2.101 /  1.  2.101
    libpostproc    53.  3.100 / 53.  3.100
  Input #0, avi, from '../11_stte_frst.avi':
    Metadata:
      encoder         : Lavf56.40.101
    Duration: 00:00:05.02, start: 0.000000, bitrate: 14859 kb/s
      Stream #0:0: Video: msmpeg4v2 (MP42 / 0x3234504D), yuv420p, 3200x2464, 14887 kb/s, 60 fps, 60 tbr, 60 tbn, 60 tbc
  
  
  </code></pre>
  
Tags: <ffmpeg><avi>
Title: Efficiently compressing an AVI video
UserDisplayName: brownser
ThreadText: # Efficiently compressing an AVI video
  
  (Asked by: username_0 on 2020-07-02)
  
  I have a few AVI videos of very high bit-rate ( 6.0 Second video is 72 MB in size ). I want to put these videos in a Microsoft PowerPoint presentation, and since there are a few 10 such videos the size of the presentation file is getting too high.
  
  I want to compress these videos to have a reasonable size. I used `ffmpeg` to compress these videos. I used the command
  `ffmpeg -i input.avi -vcodec msmpeg4v2 output.avi`
  and it gave me a compressed video of size 9.0 MB. But these new videos are not playing smoothly in Powerpoint (they are playing in other media players though).
  
  it is playing with hiccups. I assume I compressed the video with wrong parameter/encoding making it difficult to play.
  
  Can anyone suggest me the optimum parameter/arguments to use with FFmpeg in compressing these videos? The output of `ffmpeg -i input.avi` is given here.
  
  ```
  ffmpeg version 2.8.15-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg developers
    built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
    configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --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-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --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-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
    libavutil      54. 31.100 / 54. 31.100
    libavcodec     56. 60.100 / 56. 60.100
    libavformat    56. 40.101 / 56. 40.101
    libavdevice    56.  4.100 / 56.  4.100
    libavfilter     5. 40.101 /  5. 40.101
    libavresample   2.  1.  0 /  2.  1.  0
    libswscale      3.  1.101 /  3.  1.101
    libswresample   1.  2.101 /  1.  2.101
    libpostproc    53.  3.100 / 53.  3.100
  [mjpeg @ 0x23154c0] Changeing bps to 8
  Input #0, avi, from '11_stte_frst_mode.avi':
    Metadata:
      encoder         : Lavf56.40.101
    Duration: 00:00:05.02, start: 0.000000, bitrate: 120249 kb/s
      Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg/unknown/unknown), 3200x2464, 120629 kb/s, 60 fps, 60 tbr, 60 tbn, 60 tbc
  
  ```
  
  I'm using Ubuntu 16.0, I have also a Windows machine. But it will be easier if I can fix in Ubuntu.
  
  The details of the output file is this,
  
  ```
  ffmpeg version 2.8.15-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg developers
    built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
    configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --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-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --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-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
    libavutil      54. 31.100 / 54. 31.100
    libavcodec     56. 60.100 / 56. 60.100
    libavformat    56. 40.101 / 56. 40.101
    libavdevice    56.  4.100 / 56.  4.100
    libavfilter     5. 40.101 /  5. 40.101
    libavresample   2.  1.  0 /  2.  1.  0
    libswscale      3.  1.101 /  3.  1.101
    libswresample   1.  2.101 /  1.  2.101
    libpostproc    53.  3.100 / 53.  3.100
  Input #0, avi, from '../11_stte_frst.avi':
    Metadata:
      encoder         : Lavf56.40.101
    Duration: 00:00:05.02, start: 0.000000, bitrate: 14859 kb/s
      Stream #0:0: Video: msmpeg4v2 (MP42 / 0x3234504D), yuv420p, 3200x2464, 14887 kb/s, 60 fps, 60 tbr, 60 tbn, 60 tbc
  
  ```
  
  **Tags:** ffmpeg, avi
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-07-05. Score: 0 | Accepted answer
  
  Your output is 3K video at 60fps. That's going to be tough for most average machines to play on its own (without whatever overhead powerpoint imposes). Do you really need such a high res video at that frame rate?
  
  First thing I would do is drop the frame rate to 30fps, and if it's acceptable, maybe scale the resolution back closer to 1080p.
  
  Last thing I would do is drop the AVI container and msmpeg4v2 codec. Use h.264/mp4, it's more compatible with more devices, and can leverage hardware decoding on many machines.
  
  Putting it all together you'd have
  
  ```
  ffmpeg -i input.avi -r 30 -vf scale=1920:1478 output.mp4
  
  ```
  
  
  ---
  
  