Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- ffmpeg -i video_a.mp4 -ss 00:00 -to 01:40 -vcodec copy -acodec copy section1.mp4
- ffmpeg -i video_a.mp4 -ss 01:40 -to 17:06 -vcodec copy -acodec copy section2.mp4
- ffmpeg -i video_a.mp4 -ss 17:06 -to 18:04 -vcodec copy -acodec copy section3.mp4
- ffmpeg -i video_b.mp4 -vcodec copy -an section2_video.mp4
- ffmpeg -i section2.mp4 -acodec copy -vn section2_audio.mp4
- ffmpeg -i section2_audio.mp4 -i section2_video.mp4 -vcodec copy -af atempo=0.97885835 section2_new.mp4
- ffmpeg -i section1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
- ffmpeg -i section2_new.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
- ffmpeg -i section3.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate3.ts
- ffmpeg -i "concat:intermediate1.ts|intermediate2.ts|intermediate3.ts" -c copy -bsf:a aac_adtstoasc output.mp4
- rm section1.mp4 section2*.mp4 section3.mp4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement