Created
April 21, 2023 14:25
-
-
Save rscoopcur/11f4685b3bf07312f0c138541497caf3 to your computer and use it in GitHub Desktop.
MP4 to WebM using FFMPEG
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ffmpeg -i input.mp4 -b:v 0 -crf 30 -pass 1 -an -f webm -y | |
| ffmpeg: This is the command itself, calling the FFmpeg executable. | |
| -i input.mp4: This specifies the input file, which is a video file named "input.mp4". | |
| -b:v 0: This sets the video bitrate to 0, indicating that it should be automatically determined by the codec. | |
| -crf 30: This sets the Constant Rate Factor (CRF) value to 30. CRF is a quality control setting for video encoding. Lower values generally result in higher quality but larger files, while higher values produce smaller files with lower quality. A value of 30 is considered to be on the lower end of quality. | |
| -pass 1: This indicates that the encoding process will use a two-pass encoding method. The current command represents the first pass, which analyzes the video and generates a log file for the second pass to use for more efficient compression. | |
| -an: This flag disables audio in the output file, meaning the resulting file will have no audio. | |
| -f webm: This specifies the output format, which is the WebM container format. WebM files typically contain video streams compressed with the VP8 or VP9 video codecs and audio streams compressed with the Vorbis or Opus audio codecs. | |
| -y: This flag automatically overwrites the output file if it already exists, without prompting for confirmation. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment