Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- rem === input ===
- set input="in.mp4"
- set output="out.mp4"
- set start=10
- set end=20
- set overlay="[0:v][1:v]overlay=10:10"
- rem === get video duration ===
- ffprobe -v error -show_entries format=duration -of "default=nw=1:nk=1" %input% > temp.txt
- set /p duration=<temp.txt
- set /p tduration=<temp.txt
- set /A "tduration-=%start%+%end%"
- ffmpeg -i %input% -i logo.png -t %start% -filter_complex %overlay% -y part_start.mp4
- ffmpeg -sseof -%end% -i %input% -i logo.png -filter_complex %overlay% -y part_end.mp4
- ffmpeg -i %input% -ss %start% -t %tduration% -c copy -y part_middle.mp4
- echo file 'part_start.mp4' > temp.txt
- echo file 'part_middle.mp4' >> temp.txt
- echo file 'part_end.mp4' >> temp.txt
- ffmpeg -f concat -safe 0 -i temp.txt -c copy -y %output%
- del temp.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement