bytedeco / javacv

Java interface to OpenCV, FFmpeg, and more
Other
7.39k stars 1.56k forks source link

How to set shortest when using FFmpegFrameRecorder to record and merge two video files ? #2237

Open DearTan opened 1 month ago

DearTan commented 1 month ago

When I merged two videos, I found that the last few seconds of the previous video were lost, with only the audio part, which caused the audio to remain the same as the previous video when switching to the second video ?!! Um...How should I solve this problem?

steeveen commented 4 weeks ago

I meet the same question. Ummmm. To bee honest , I haven't find the elegant solution. My method is to set the audio fps and video fps as its origin carefully, and stop recording audio frame as the timestamp is reached.