FFMpeg concat demuxer corrupted output (freezed video on some concatenated parts) I have big videos with different types of properties and trying to collect some part of these videos by ffmpeg.

I use this command to cut specific parts:

scale video &gt;&gt; scale png &gt;&gt; pad scaled_video &gt;&gt; add icon to padded_scaled_video &gt;&gt; encode.


  ffmpeg.StartInfo.Arguments = @"/c ffmpeg.exe -i " + VideoIn + " -i " +
  imageIn + " -filter_complex \"[0:v]
  scale='if(gt(a,6/4),480,-2)':'if(gt(a,6/4),-2,320)' [scaledv], [1:v]
  scale=iw*.5:ih*.5 [scaledicon], [scaledv]
  pad=480:320:(ow-iw)/2:(oh-ih)/2:black [scaledpaddedv],
  [scaledpaddedv][scaledicon] overlay=25:25,setsar=1:1 [finalv]\" -map
  \"[finalv]\" -map 0:a" + " -ss " + startCut.ToString() + " -c:v
  libx264 -preset slow -crf 20 -c:a aac -t " + duration.ToString() + " "
  + VideoOut + " -y -report";


Which works perfectly.

and then try to merge these videos with this command:


  ffmpeg.StartInfo.Arguments = "/c ffmpeg.exe -f concat -safe 0 -i \"" +
  concatTextDirectory + "\" -c copy -vf \"subtitles=\\'" + videoInSrt +
  "\\':force_style='FontName=DejaVu Serif,FontSize=26'\" -c:v libx264
  -preset slow -crf 20 -c:a aac " + videoOut + " -y -report";


Which again works ok if cutted video parts are from the same type of video, and if they aren't there will be no video and only audio or jittery video on non-similar video parts.
The first cutted video part is dominant on other parts.

Question is most of the time video parts are not from the same video type and output is not playable. How could I cut video parts to be similar in properties to work without problem on concatenation part?

This is -report log output:
https://drive.google.com/open?id=0B_kWzdnSIxuQY09QWWZGVTBPdHM
Glad you fixed your problem. For anyone else coming across the question...

The problem is that concat demuxer only works when multimedia streams are the same.

As described here, all files must have the same streams (same codecs, same time base, etc.).

So you have to use a filter, forcing a re-encode. See this reference.