Skip to content

Instantly share code, notes, and snippets.

@lbbedendo
Last active December 7, 2021 00:37
Show Gist options
  • Save lbbedendo/c4b15372fd5fc490d46d2cb9e7cf533b to your computer and use it in GitHub Desktop.
Save lbbedendo/c4b15372fd5fc490d46d2cb9e7cf533b to your computer and use it in GitHub Desktop.
ffmpeg and ffprobe commands
----------------------------------------------------------------------------------------------------------------------------------
Converting a series of jpeg images to a mp4 video:
ffmpeg.exe -f image2 -r 3 -i %06d.jpeg -r 15 -vcodec mpeg4 -s 352x240 Camera-0.avi
-f image2 => input format
-r 3 => input framerate
-i %06d.jpeg => input mask (files must be named sequencially, with 6 digits. Ex: "000000.jpeg", "000001.jpeg", "000002.jpeg", etc)
-vcodec mpeg4 => video output codec
-s 352x240 => resolution
Camera-0.avi => output file
----------------------------------------------------------------------------------------------------------------------------------
Reading video with ffprobe and print the information in json format
ffprobe.exe -print_format json -show_format -show_streams -count_frames -i Camera-0.avi
Optional parameters:
-v quiet =: loglevel: quiet shows nothing, only the output information
-show_frames => show information about each frame of the video
----------------------------------------------------------------------------------------------------------------------------------
For more information: https://www.ffmpeg.org/documentation.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment