Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thiagopnts/ffmpeg-recipes
https://github.com/thiagopnts/ffmpeg-recipes
Last synced: 28 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/thiagopnts/ffmpeg-recipes
- Owner: thiagopnts
- Created: 2014-09-03T20:28:42.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-01-23T00:24:00.000Z (almost 10 years ago)
- Last Synced: 2024-10-14T14:11:16.445Z (2 months ago)
- Size: 129 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FFmpeg Recipes
### Remove audio from video
```bash
$ ffmpeg -i [input file] -vcodec copy -an [output file]
```### Extract part of a video
This will cut 5 seconds starting at 00:30 from the original video:
```bash
$ ffmpeg -i [input file] -ss 00:00:30 -t 00:00:05 -vcodec copy -acodec copy \
-movflags faststart [output file]
```### Convert a video to GIF
Ffmpeg 2.0 has improved support for GIFs. To convert a .mp4 to a .gif:
```bash
$ ffmpeg -i [input file] -vf scale=320:-1 -t 10 -r 10 output.gif
```
Where `-t 10` limits the output to 10 seconds. `-r 10` forces a frame rate of 10 fps.
The `scale=320:-1` is to set the width and height, here we pass -1 so ffmpeg picks the
best height for us.### Convert MP4 to WebM
To convert you need to install ffmpeg with support for these codecs
On OSX:
```bash
$ brew install ffmpeg --with-libvpx --with-libvorbis
```
then you can use `libvorbis` and `libvpx` to convert your mp4 to webm:
```bash
$ ffmpeg -i [input file] -acodec libvorbis -vcodec libvpx [output file]
```