1

I have a Video lets say LargeVideo.mp4 and I have 2 other small videos as SmallVideo_1.mp4 and SmallVideo_2.mp4. I want to insert the full SmallVideo_1.mp4 and SmallVideo_2.mp4 at 10th sec and 40th sec of LargeVideo respectively.

I'm using

ffmpeg -f concat -i concat.txt -c:v libx264 -crf 23 -fflags +genpts output.mp4

contact.txt is

file 'LargeVideo.mp4'
inpoint 0.0
outpoint 10
file 'SmallVideo_1.mp4'
inpoint 0
file 'LargeVideo.mp4'
inpoint 10
outpoint 40
file 'SmallVideo_2.mp4'
inpoint 0
file 'LargeVideo.mp4'
inpoint 40

The above code works perfectly fine in Windows, But I want to implement this in Android I have added -safe 0 also in android command but still it is not working

Android is as follows with the same contact.txt

String[] cmdConcatVideo = new String[]{"-f", "concat", "-safe", "0", "-i", inpCmdFile, "-c:v", "libx264", "-crf", "23", "-fflags", "+genpts", outVideo};

I don't know what I'm missing, Any help would be thankful.

--In android It is not failing it works but I'm not getting the desired output. The SmallVideos are not present in the output.

  • Share full log of failed command. – Gyan Apr 23 '18 at 8:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.