m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/ffmpeg.md
diff options
context:
space:
mode:
Diffstat (limited to 'ffmpeg.md')
-rw-r--r--ffmpeg.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/ffmpeg.md b/ffmpeg.md
index 6abed19..28a5730 100644
--- a/ffmpeg.md
+++ b/ffmpeg.md
@@ -1,5 +1,16 @@
# 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