kkDav1337

[ffmpeg] Extract part of a video with a one-line command

Feb 9th, 2021 (edited)
3,515
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.54 KB | None | 0 0
  1. ffmpeg
  2. Say that you want to cut out a part starting at 00:00:30 into the original file with a 5 seconds length and that it shouldn't be re-encoded (if you want to re-encode it you'll have to replace copy with audio and video codecs, for a list of available codecs issue ffmpeg -formats -E), then you issue:
  3.  
  4. Code: ffmpeg -ss 00:00:30 -i orginalfile -t 00:00:05 -vcodec copy -acodec copy folder/newfile
  5.  
  6. You'll have to replace orginalfile and newfile with actual file names, the later is the name of the file that is created to hold the cut out part.
Add Comment
Please, Sign In to add comment