C FFMPEG Program to Scale the Dimensions or Aspect Ratio of Video File on Command Line Full Project For Beginners

  • Post author:
  • Post category:c++
  • Post comments:0 Comments









Quick demo for ffmpeg swscale using C

Install and compile ffmpeg (On Mac)

  1. Follow the official documentation to compile and install ffmpeg in your system
  2. After installation (i.e. executing make && sudo make install), please quickly check the path /usr/local/lib/pkgconfig to make sure that all ffmpeg libs are presented
  3. Execute the following command line to set env variable:

After the above three steps, you should be able to run the demo

Running demo

  1. Compile the demo by running make under this dir
  2. Configure parameters passed to the demo program in run.sh, as explained below:

NOTE: the sample file in this repository has width = 176 and height = 144, and framenum == 8 3. Execute the demo by running ./run.sh.

Verifying result

Download YUView, and run it to open the source and the destination file. Then you could verify that the resolution has been changed.


Leave a Reply