2021-10-11 03:22:53 +00:00
|
|
|
= FFmpeg =
|
|
|
|
|
2022-01-10 17:45:01 +00:00
|
|
|
Command line tool for working with video. Also a library
|
2021-10-11 03:22:53 +00:00
|
|
|
This is just a collection of common tasks
|
|
|
|
|
|
|
|
== Rencode as another video ==
|
|
|
|
|
|
|
|
{{{
|
|
|
|
ffmpeg -i in.mkv out.mp4
|
|
|
|
}}}
|
|
|
|
|
|
|
|
== Export clip from video ==
|
|
|
|
|
|
|
|
This will grab a clip starting at 30s that lasts for 10s
|
|
|
|
|
|
|
|
All timestamps must be of format HH:MM:SS.xxx
|
|
|
|
|
|
|
|
{{{
|
|
|
|
ffmpeg -i in.mp4 -ss 00:00:30.0 -c copy -t 00:00:10.0 out.mp4
|
|
|
|
}}}
|
|
|
|
|
2022-01-10 17:45:01 +00:00
|
|
|
== Library ==
|
|
|
|
|
2022-01-10 18:15:01 +00:00
|
|
|
The C library for ffmpeg has poor documentation. It is also known as
|
|
|
|
*libav*
|
2022-01-10 17:45:01 +00:00
|
|
|
|
|
|
|
Movie files consist of several components in the FFMPEG model.
|
|
|
|
|
|
|
|
- Container
|
|
|
|
- The file itself
|
|
|
|
- MKV, AVI, etc
|
|
|
|
- Streams
|
|
|
|
- Several streams in a container
|
|
|
|
- IE audio stream, video stream, subtitle stream, etc
|
|
|
|
- Frames
|
|
|
|
- Elements or samples of a stream
|
|
|
|
- Codec
|
|
|
|
- Define how data is encoded and decoded
|
|
|
|
- MP3, DivX, x264, etc
|
|
|
|
- Packets
|
|
|
|
- Bits of data in a stream that are decoded into raw frames
|
|
|
|
|
2021-10-11 03:22:53 +00:00
|
|
|
[[index]]
|