# FFmpeg

Muldimedia manipulation made easy

- I’d like to tell you about…
- You might not know it

## What is FFmpeg?

- You might ask yourself:
- Why do I have to know something about ffmpeg?
- Very popular video sites like YouTube use it
- I’m going to start with a quick introduction to ffmpeg

### A/V manipulation

- one format to another
- reduce the file size (and quality)
- draw text on some fancy graphics while playing music

- main purpose: Manipulation
- manipulation is not bad!
- can be as simple as: one format to another
- no time to explain, why format does not fit well
- more compex case: reduce the file size and obviously the quality
- another compex case: draw text on some fancy graphics while playing music

### practical examples

                  ffmpeg -i foo.mp4 bar.mp4

                  ffmpeg -i foo.mp4 -c:v libx264 -crf 28 \
                         -vf "scale=-2:720" -c:a aac -b:a 128k bar.mp4

                  ffmpeg -i in.mp4 -b:v 1800k -minrate 900k -maxrate 2160k \
                         -tile-columns 2 -g 240 -threads 8 -deadline good \
                         -crf 31 -c:v libvpx-vp9 -c:a libopus -ac 2 -vbr on \
                         -b:a 96k -c:s copy -map 0 -pass 1 -cpu-used 1 out.mkv

                  ffmpeg -i in.mp4 -b:v 1800k -minrate 900k -maxrate 2160k \
                         -tile-columns 4 -g 240 -threads 8 -deadline good \
                         -crf 31 -c:v libvpx-vp9 -c:a libopus -ac 2 -vbr on \
                         -b:a 96k -c:s copy -map 0 -pass 2 -cpu-used 1 out.mkv

- so let’s get our hands dirty
- the first is mostly quite useless
- the second one basically reduces the file size
- the big ones are used in my production setup
- they change the format of the video and optimize it to achieve smaller sizes with only little quality loss

### End

- so finally, we are at the end
- You’ll most likely say: “I’ll never use ffmpeg”