Skip to content

Instantly share code, notes, and snippets.

@JoeArauzo
Last active January 19, 2023 23:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoeArauzo/950a38c7b434eccdc3c51217261be2f5 to your computer and use it in GitHub Desktop.
Save JoeArauzo/950a38c7b434eccdc3c51217261be2f5 to your computer and use it in GitHub Desktop.
Useful commands when using FFMPEG

Useful FFMPEG Commands

The following command will convert WEBM to FLAC at 16 bit and 48000 hertz.

ffmpeg -i in.webm -af aresample=resampler=soxr:out_sample_fmt=s16:out_sample_rate=48000 out.flac

The following command will extract audio from WEBM and copy it to OGG container without transcoding.

ffmpeg -i in.webm -vn -c:a copy out.ogg

How to cut a video by copying a specific section, without re-encoding.

ffmpeg -i input.mp4 -c copy -ss 00:04:25.000 -to 00:09:25.000 output.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment