2

I have three videos which I want to concat together the problem it works fine for some videos but when I test a specific video it gives me an error and cause the resulting video to show in a strange way and everything is moving very fast in the video like I was forward up the video
this the code I used to add the video together from a file this the out.txt

file 'D:/Build/start.mp4' file 'D:/Build/a.mp4' file 'D:/Build/Song & Lyrics/2f.mp4' 

the command i used with ffmpeg

ffmpeg -f concat -safe 0 -i out.txt -c copy -y go.mp4 

i faced this error

 [mov,mp4,m4a,3gp,3g2,mj2 @ 05c0dbc0] Auto-inserting h264_mp4toannexb bitstream filter Input #0, concat, from 'out.txt': Duration: N/A, start: 0.000000, bitrate: 280 kb/s Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 155 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc Metadata: creation_time : 2018-02-08T13:25:49.000000Z handler_name : ISO Media file produced by Google Inc. Created on: 02/08/2018. Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s Metadata: creation_time : 2018-02-08T13:25:49.000000Z handler_name : ISO Media file produced by Google Inc. Created on: 02/08/2018. Output #0, mp4, to 'go.mp4': Metadata: encoder : Lavf58.7.100 Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 155 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc Metadata: creation_time : 2018-02-08T13:25:49.000000Z handler_name : ISO Media file produced by Google Inc. Created on: 02/08/2018. Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s Metadata: creation_time : 2018-02-08T13:25:49.000000Z handler_name : ISO Media file produced by Google Inc. Created on: 02/08/2018. Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help [mov,mp4,m4a,3gp,3g2,mj2 @ 05c38840] Auto-inserting h264_mp4toannexb bitstream filter [mp4 @ 061b8f00] Non-monotonous DTS in output stream 0:0; previous: 624624, current: 88735; changing to 624625. This may result in incorrect timestamps in the output file. [mp4 @ 061b8f00] Non-monotonous DTS in output stream 0:0; previous: 624625, current: 89247; changing to 624626. This may result in incorrect timestamps in the output file. [mp4 @ 061b8f00] Non-monotonous DTS in output stream 0:0; previous: 624626, current: 89759; changing to 624627. This may result in incorrect timestamps in the output file. ..... [mov,mp4,m4a,3gp,3g2,mj2 @ 05c38840] Auto-inserting h264_mp4toannexb bitstream filtereed=69.7x frame= 8991 fps=2903 q=-1.0 Lsize= 8378kB time=00:05:58.22 bitrate= 191.6kbits/s speed= 116x video:2469kB audio:5625kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 3.500685% 

so what the problem make this error. the problem appear when i use this new start.mp4 to be merge with my videos i tried on other ones and it worked fine.
Update
i tested to convert the videos to MTS formate then concate them as an answer to similar problem but the problem is when i convert the mp4 videos to this formate the size of the file be too large from 6 MB to 42 MB!! so if there is a better answer. or a way to make the file still same size or less the linke of the answer is here but it worked fine Thanks in advance

2
  • I realize this is old, and already has an answer (who is the same as OP). This isn't a programming question at all. Commented Aug 8, 2018 at 1:51
  • i know it is not :), and i tag video and ffmpeg and i think the question is clear a ffmpeg question yea close it, it's long time :D Commented Aug 8, 2018 at 1:56

1 Answer 1

4

on this time I tried to solve the problem and make some searches and I notice that the first video does not have the same frame/second as the other videos I tested before and I use this command to make them all have the 25 frames/sec

FFmpeg -y -i source.mp4 -r 25 -s 160x90 -c:v libx264 -b:v 3M -strict -2 -movflags fast start destination.mp4 

this command I make all video with same frame/sec and resolution when I start adding the outputted videos it output without any problem so I need a confirmation if this information is right as iam not sure. but it worked for me

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.