Created
April 12, 2021 06:54
-
-
Save niski84/22b9d191ae3a7953c23fa76ff36258d4 to your computer and use it in GitHub Desktop.
ffmpeg cut clip from middle of video - supports mp4
This file contains 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
# start and beginning and only go to -t time | |
ffmpeg -y -i "song.mp4" -t 00:03:10.00 -c copy dystopiaStart.mp4 | |
# start at -ss and go to the end | |
ffmpeg -y -ss 00:19:27.00 -i "song.mp4" -c copy dystopiaEnd.mp4 | |
# concat both clips :: update: does not work for mp4 files | |
#ffmpeg -i "concat:dystopiaStart.mp4|dystopiaEnd.mp4" -c copy Ffmpeg_test2.mp4 | |
# concat demuxer method without re-encode | |
# create manifest with file paths and pass that in: | |
echo "file ./dystopiaStart.mp4" > ffmpeg_tmp_lst.txt | |
echo "file ./dystopiaEnd.mp4" >> ffmpeg_tmp_lst.txt | |
ffmpeg -f concat -safe 0 -i ffmpeg_tmp_lst.txt -c copy ffmpegtest3.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment