Skip to content

Instantly share code, notes, and snippets.

@mort3za
Last active December 2, 2023 01:45
Show Gist options
  • Save mort3za/12e5561870af35307f62280cf70a1dd9 to your computer and use it in GitHub Desktop.
Save mort3za/12e5561870af35307f62280cf70a1dd9 to your computer and use it in GitHub Desktop.
Convert video to mp4 acc with ffmpeg, https://bit.ly/m3ffmpeg
# install ffmpeg on windows machines: http://www.wikihow.com/Install-FFmpeg-on-Windows
ffmpeg -i inputfile.mp4 -r 24 -crf 18 -vcodec h264 -acodec aac outputfile.mp4
@mort3za
Copy link
Author

mort3za commented Aug 13, 2017

You can change -crf 18 to -crf 25 for lossy convertion.
A lower crf means a higher bit rate.

@mort3za
Copy link
Author

mort3za commented Aug 13, 2017

To extract frames of video as jpg file:

ffmpeg -i inputfile.mp4 -r 1/1 $filename%03d.jpg

You can use another extensions, e.g. bmp or png

@mort3za
Copy link
Author

mort3za commented Sep 6, 2019

ffmpeg tutorial: https://itsfoss.com/ffmpeg/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment