2021-06-09

ffmpeg Options

 筆記一下 ffmpeg 時常用參數:

  • -i url: Set the file URL of input. When capture video from X11, the url is comprised of [hostname]:display_number.screen_number. The hostname is localhost by default, and the display_number.screen_number is as known as display_name and could be found by the command xdpyinfo.
  • -f format: Force input or output file format. The format could be x11grab to grab video from the X11 display.
  • -s size: Set the frame size.
  • -r fps: Set the frame-per-second.
  • -filter[:stream_specifier] filtergraph: Define a filtergraph for the stream.
  • -crf value: Set the constant-rate-factor quantizer scale.
  • -preset name: Set the collection name of compression ratio options.
  • -vcodec codec: Set the codec for output video.
  • -g size: Set the size of group-of-pictures.
  • -y: Overwrite output files without asking.

References:

[1] https://ffmpeg.org/ffmpeg.html
[2] https://trac.ffmpeg.org/wiki/Encode/H.264