I'm busting my head against the wall trying to add a splash screen. Here's what I'm doing:
- Convert the still image to "ts" file with silenced audio stream
ffmpeg -loop 1 -i image.png -c:v libx264 -t 10 -c:a libvo_aacenc -b:a 160k -bsf:v h264_mp4toannexb -f mpegts -crf 32 image.ts
- Now, take the original video and convert it to "ts" file too
ffmpeg -i video.mp4 -c:v libx264 -c:a aac -b:a 160k -bsf:v h264_mp4toannexb -f mpegts -crf 32 video.ts
- Now, combine the 2 "ts" files
ffmpeg -i "concat:image.ts|video.ts" -c:v libx264 -c:a aac -b:a 160k -bsf:v -y output.mp4
Problems:
The output file is generated just fine, but audio is totally missing. The "output.mp4" video generated in step # 3 actually has an audio track, but splash screen video has silenced audio.
I'm also not able to add a transition. I have researched much on that but unable to add it, please help in that.
I would really appreciate your thoughts! Thank you