blob: 28a5730c84cc74339545173353d46f3090ccdec3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# ffmpeg tricks
## Cut
ffmpeg -i in.mp4 -codec:v copy -codec:a copy -ss START_TIME -t DURATION out.mp4
ffmpeg -ss START_TIME -t DURATION -i in.mp4 -codec:v copy -codec:a copy out.mp4
## Resize
ffmpeg -i in.mp4 -s 720x480 out.mp4
# -1 means to automatically preserve aspect ratio
ffmpeg -i in.mp4 -filter:v scale=720:-1 out.mp4
## Record screen
ffmpeg -f x11grab -s 1920x1080 -i :0.0 out.mkv
## Record from webcam
ffmpeg -i /dev/video0 out.mkv
## Record sound
ffmpeg -f alsa -i default out.flac
|