0
0
I have a YouTube video that I would like to add 30 second intros and outtros to. The three files are saved as MP4s. I am using macOS.
Following instructions on this offical FFmpeg page I used these commands to convert the files to ts files and tested them. They all worked.
ffmpeg -i intro.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts in.ts
However when I used the command:
/opt/local/bin/ffmpeg -f mpegts -i "concat:intro.ts|episode1.ts|out.ts" -c copy -bsf:a aac_adtstoasc output.mp4
output.mp4
is broken: The first video appears correctly, but there seems to be no visual information from there (audio is working and output.mp4
is expected length). This approach works when I do it using videos created in the same application, so I suspect that that's the problem: one file was created in iMovie, one with OBS and the other was first created in OBS and then downloaded from youTube.
Note that all .TS files and output.mp4
are here on my website for review.
What I really want is this.
- I want a command that converts the intro and outro files so that they match the attributes of the episode and thus the concat works.
- I then want to convert the intro file so it matches the attributes of outro for future recordings.
2All corresponding streams from the input files must match in their attributes. – Gyan – 2019-06-10T04:35:58.780