1

I am trying to concatenate two videos with a blank section of video in between. The screenshots are captured from an Android device and I need to reconstitute them into a continuous run, however gaps appear in the middle because the video can only be three minutes when captured from the android device screen.

Here's how I am doing it:

I have created a PNG with size 1200x1920.

Then used it to create a small video on the command line:

ffmpeg -loop 1 -i screen-black.png -vcodec h264 -t 15 -pix_fmt yuv420p  screen-black.mp4

I have created this text file to pass to ffmpeg:

file 'vid1.mp4'
file 'screen-black.mp4'
file 'vid2.mp4'

And finally executed:

ffmpeg -f concat -i mylist.txt -c copy concat_output.mp4

When I watch the newly created video, the first and second videos from the android device are put together, however the blank video in the middle is missing.

Does anybody know why this is happening?

I thought it might be something to do with the codec, however all videos are in H264. One noticeable thing is the blank video has a resolution of 3072 × 1920, whereas the other two videos have a resolution of 1200 x 1920

(Just in case it is relevant, I'm doing this on a Mac so the file has to be compatible with Quicktime).

  • Show the output of ffmpeg -i for all three files. – Gyan Oct 6 '17 at 6:17
  • vid1.mp4: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'vid1.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2017-10-06T02:00:23.000000Z com.android.version: 6.0.1 Duration: 00:03:08.84, start: 0.000000, bitrate: 13 kb/s Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 1200x1920, 12 kb/s, 0.51 fps, 3.25 tbr, 90k tbn, 180k tbc (default) Metadata: creation_time : 2017-10-06T02:00:23.000000Z handler_name : VideoHandle At least one output file must be specified – radiobrain77 Oct 6 '17 at 6:27
  • vid2.mp4: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'vid2.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2017-10-06T02:29:20.000000Z com.android.version: 6.0.1 Duration: 00:02:55.04, start: 0.000000, bitrate: 23 kb/s Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 1200x1920, 23 kb/s, 2.55 fps, 90k tbr, 90k tbn, 180k tbc (default) Metadata: creation_time : 2017-10-06T02:29:20.000000Z handler_name : VideoHandle At least one output file must be specified – radiobrain77 Oct 6 '17 at 6:28
  • out.mp4: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'screen-black.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf57.71.100 Duration: 00:00:15.00, start: 0.000000, bitrate: 18 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1200x1920 [SAR 1:1 DAR 5:8], 16 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler At least one output file must be specified – radiobrain77 Oct 6 '17 at 6:29
  • 2
    Instead of putting this in the comments, please edit your post and add the info there. Please show the complete output of the last command you ran, too. – slhck Oct 6 '17 at 7:03

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.