transitive-bullshit / ffmpeg-concat

Concats a list of videos together using ffmpeg with sexy OpenGL transitions.
878 stars 115 forks source link

Merge two videos, the merged video will be stuck in the last few seconds #99

Closed jamesh23 closed 3 years ago

jamesh23 commented 3 years ago

the second video last few seconds image frame will lost, does anyone know why ?

zdying commented 3 years ago

I have the same issue. anyone can tell why?

jamesh23 commented 3 years ago

@transitive-bullshit Please help, thank you

morohit commented 3 years ago

Same to me. Tested with both CLI and API versions. The issue seems to be unrelated to different properties of audio/video clips. In fact, I have tried unsatisfactorily to concatenate the example clip in the repository: ffmpeg-concat -o test.mp4 0a.mp4 0a.mp4 In the other hand, videos without audio (like 0.mp4, 1.mp4, 2.mp4) have no problem. Runingffmpeg-concat 1.2.3 and ffmpeg 4.1.6-1 on debian 10.

morohit commented 3 years ago

This temporary solution works for me: In lib/transcode-video.js, deactivate the audio option -shortest (just comment out the line).

jamesh23 commented 3 years ago

This temporary solution works for me: In lib/transcode-video.js, deactivate the audio option -shortest (just comment out the line).

it works for me too

transitive-bullshit commented 3 years ago

@jamesh23 @morohit are you using audio? That option should only be included if audio is accompanying the videos.

It's been awhile since I've tested this, but I'm pretty sure that's in there so that longer audio tracks don't result in output videos where the video stream ends early and the audio stream keeps going.

Maybe something changed with FFmpeg related to this option since this library was first released?

transitive-bullshit commented 3 years ago

I just published a version 1.3.3 which should resolve this issue.

jamesh23 commented 3 years ago

I just published a version 1.3.3 which should resolve this issue.

thank you ~