Created
February 18, 2022 13:59
-
-
Save le-dawg/357a9e7249aabfbf166a3d2c1f130e53 to your computer and use it in GitHub Desktop.
ffmpeg to quickly cut video from start to specific time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Not many mention this (I'm no expert so maybe there is a catch), but if your file has other streams like subtitles and other metadata like chapters and so on, it's possible to cut/trim and keep all streams with the following command | |
ffmpeg -to 60 -i input.mkv -map 0 -c copy output.mkv | |
// With -map 0 you take all the streams in the file, and with -c copy you copy all them as they are. | |
// Using -to omitting the start via -ss will cut the input video from start to **second 60.** | |
// Fiddling with map is useful also if you want only specific streams to be kept in the cut (maybe you don't need all the audio sources in the file, or only some subtitles). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment