FFmpeg issues with concat demux for videos with audio embedded

  aac, batch-file, ffmpeg, motionjpeg, windows

I try to make an assembly video of the WIP of a project, to detect the hook up issue and it works fine when there is no audio. I do an intermediate conversion because there are some elements (such as the status of the shot and the frame count, that I want to add to the video).

Here is the ffmpeg command I use for this :

ffmpeg -y -i s010.avi -vf "scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,setsar=1,drawtext=fontfile=Arial.ttf: text='%%{frame_num}': start_number=1: x=1: y=1017: fontcolor=white: fontsize=72: box=1: boxcolor=0x000000AA: boxborderw=5,drawtext=fontfile=Arial.ttf: text='s010': start_number=1: x=1760: y=1017: fontcolor=white: fontsize=72: box=1: boxcolor=0x000000AA: boxborderw=5" -vcodec mjpeg -qscale 1 -shortest 010.avi

(The double % is because I use it in a batch file, I’m on Windows 10)

So basically, the output is .avi with motionJPEG as video codec and AAC as audio codec.

The thing is, when I concatenate this, using this command :

ffmpeg -y -f concat -safe 0 -i liste.txt -vcodec libx264 -pix_fmt yuv420p Assembly.mp4

The audio begins before the input video it is affiliated to and some frames of the next files are not displayed because the timeline of the concatenated file seems to be broken overall (I know this last sentence isn’t very technical, but it’s 12AM and I’m tired haha).

It works fine when the audios are removed, but I need the audios to check on the lipsync.

Any ideas where it might come from?

Source: Windows Questions

LEAVE A COMMENT