-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathffmpeg.txt
36 lines (27 loc) · 1.35 KB
/
ffmpeg.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
input file video filter, short for -filter:v
/ /
ffmpeg -i video.mp4 -c:a copy -vf 'transpose=1, transpose=1' out.mp4 # 180° rotation
\
audio/video codec to use, copy meaning preserve
info:
ffprobe -v error -show_format video.mp4
ffprobe -v error -show_entries format=duration jumping.mov
cutting small sections:
ffmpeg -i video-in.mp4 -ss 11 -t duration -c copy cut.mp4
ffmpeg -i video-in.mp4 -ss 11 -to position -c copy cut.mp4
\
seek: start position
play video in a scaled down version and twice the speed:
ffplay jumping.mov -vf 'scale=220:-1,setpts=.5*PTS'
map:
a way to tell ffmpeg which streams you want to select/copy from input to output
Stream #0:0(eng): Video: h264 (High), yuv420p, 1920x800, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Stream #0:1(ger): Audio: dts (DTS), 48000 Hz, 5.1(side), s16, 1536 kb/s (default)
Stream #0:2(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), s16, 1536 kb/s
Stream #0:3(ger): Subtitle: text (default)
Ex: extract audio streams:
ffmpeg -i input.mkv -map 0:1 -map 0:2 -c copy output.mkv
## Import CD audio tracks
findmnt
cd /run/user/1000/gvfs/cdda:host=sr0
parallel ffmpeg -i {} -codec:a libmp3lame -qscale:a 0 ~/Dropbox/music/clarinet_abracadabra/cd_1/{.}.mp3 ::: *.wav