Open Mhuang77 opened 1 year ago
@saudet What can I do to help track down this issue?
It sounds like FFmpegFrameRecorder.flush() isn't working properly. Someone needs to debug that.
It sounds like FFmpegFrameRecorder.flush() isn't working properly. Someone needs to debug that.
I set the log level to debug and got log messages
......
[SWR @ 0x7ff275307140] Using s16p internally between filters
[mp3 @ 0x7ff2751fedc0] av_interleaved_write_frame FLUSH
[libmp3lame @ 0x7ff275206e80] 4 frames left in the queue on closing
[AVIOContext @ 0x7ff2752eeb80] Statistics: 119579 bytes written, 0 seeks, 1 writeouts
Based on the provided log, it can be observed that "av_interleaved_write_frame FLUSH" occurs before "4 frames left in the queue on closing". Now there is a suspicion that av_interleaved_write_frame has a problem.
How to debug the native method "org.bytedeco.ffmpeg.global.avformat#av_interleaved_write_frame"?
It sounds to me like the problem lies in libmp3lame. We need to figure out how to properly flush that specific codec.
Get the exception in javacv "[libmp3lame @ 0x7f91cd0ce3c0] 4 frames left in the queue on closing"
test file: input_case.zip
1 The ffmpeg command does not have this exception.
2 javacv code encounter this exception
2.1 lib version:
2.2 jdk version
2.3 os version
2.4 reproduce code:
3 exception log