Skip to content

Instantly share code, notes, and snippets.

View arrahhal's full-sized avatar
Stuck in a university

arrahhal arrahhal

Stuck in a university
View GitHub Profile
@maximebories
maximebories / convert.md
Last active November 15, 2024 09:29
FFmpeg command to convert webm to mp4 video files

WebM to MP4 using FFmpeg

This FFmpeg command converts a .webm video file to a standard .mp4 file using the libx264 codec for video, aac codec for audio, and a CRF value of 22. The preset is set to 'slow' for higher quality encoding, and the audio bitrate is set to 128 kbps.

If the input and output filenames don't contain spaces, quotation marks or other special characters:

ffmpeg -i input.webm -c:v libx264 -preset slow -crf 22 -c:a aac -b:a 128k output.mp4
@lukehedger
lukehedger / ffmpeg-compress-mp4
Last active November 15, 2024 21:28
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4