Last active
January 2, 2025 22:36
-
-
Save zonca/c13da23155e3451329746772187a2016 to your computer and use it in GitHub Desktop.
FFMPEG scripts to speedup and concatenate videos, useful for prerecording videos for conferences
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
ffmpeg -safe 0 -f concat -i <(find . -type f -name '*.mp4' -printf "file '$PWD/%p'\n" | sort) -c copy output.mp4 |
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
ffmpeg -i $1 -filter_complex "[0:v]setpts=0.87*PTS[v];[0:a]atempo=1.15[a]" -map "[v]" -map "[a]" speedup_$1 |
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
# ffmpeg_trim.sh input.mp4 00:14 03:24 | |
ffmpeg -i $1 -ss 00:${2} -to 00:${3} -c:v copy -c:a copy ${1}_trim.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
on macos find does not have printf, so list should be build with something like:
So on macOS it can be like this:
ffmpeg -safe 0 -f concat -i <(find . -type f -name '*.mp4' -print0 | xargs -I {} -0 stat -f "file '$PWD/{}'" | sort) -c copy output.mp4
Or just install another find
and then create alias:
alias find=gfind