android – FFmpeg synthesizes multiple videos, the final result is only sound, no picture display
1、I first converted mp4 to ts:
-i MyVideo.mp4 -vcodec copy -acodec aac -b:v 10000k MyVideo.ts
2、Then scale the ts and fill the empty space:
-i MyVideo.ts -vf pad=width=iw:height=ih:x=-1:y=0:color="White" -b:v 10000k MyVideo_transform.ts
3、Finally use concat to merge into mp4 files:
-i "concat:MyVideo_transform1.ts|MyVideo_transform2.ts" -acodec copy -vcodec copy -absf aac_adtstoasc -b:v 10000k $outputFilePath"
Finally use concat to merge into mp4 files。
I hope that the final merged result can see the video picture。
Read more here: Source link