Last active
December 20, 2018 16:03
-
-
Save saml/312f3a11b8db3a64c0ab1a17b4b6b6d4 to your computer and use it in GitHub Desktop.
carving video out
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
[0:v]select='between(t,9.795990,10.296860)+between(t,11.538400,14.988400)+between(t,16.614200,22.491310)+between(t,24.577700,26.490350)+between(t,27.752800,30.000000)',setpts=N/(FRAME_RATE*TB)[v]; | |
[0:a]aselect='between(t,9.795990,10.296860)+between(t,11.538400,14.988400)+between(t,16.614200,22.491310)+between(t,24.577700,26.490350)+between(t,27.752800,30.000000)',asetpts=N/(FRAME_RATE*TB)[a] |
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
[0]trim=start=9.8:end=10.283 ,setpts=PTS-STARTPTS[v1]; | |
[0]trim=start=11.55:end=14.983 ,setpts=PTS-STARTPTS[v2]; | |
[0]trim=start=16.617:end=22.484 ,setpts=PTS-STARTPTS[v3]; | |
[0]trim=start=24.584:end=26.483 ,setpts=PTS-STARTPTS[v4]; | |
[0]trim=start=27.766:end=29.983 ,setpts=PTS-STARTPTS[v5]; | |
[0]atrim=start=9.8:end=10.283 ,asetpts=PTS-STARTPTS[a1]; | |
[0]atrim=start=11.55:end=14.983 ,asetpts=PTS-STARTPTS[a2]; | |
[0]atrim=start=16.617:end=22.484 ,asetpts=PTS-STARTPTS[a3]; | |
[0]atrim=start=24.584:end=26.483 ,asetpts=PTS-STARTPTS[a4]; | |
[0]atrim=start=27.766:end=29.983 ,asetpts=PTS-STARTPTS[a5]; | |
[v1][a1][v2][a2][v3][a3][v4][a4][v5][a5]concat=n=5:v=1:a=1[v][a] |
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
#!/bin/bash | |
ffmpeg -i a.mkv -filter_complex_script filter-select.txt -map '[v]' -map '[a]' out.mkv | |
# ffmpeg -i a.mkv -filter_complex_script filter.txt -map '[v]' -map '[a]' out.mkv | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment