I have inherited a C++ project that uses FFMpeg to capture audio and video from
JitsiMeet, what we have found is after about 10 minutes it stops writing to the
output file. It's random anywhere from 5 to 10 minutes.
I was able to narrow down to a problem with the following line:
avcodec_encode_video2(videoStream->codec, &video_pkt, &videoFrame, &got_input);
So I decided to add in some logging with the following:
av_log_set_level(AV_LOG_DEBUG);
av_log_set_callback(my_log_callback);
void FFRecorder::my_log_callback(void *ptr, int level, const char *fmt, va_list
vargs)
{
static char message[8192];
vsprintf(message, fmt, vargs);
cout << " FFMPEG LOG: " << message << endl;
}
Now for the bizarre, with the above logging enabled everything works fine.
I have been able to record several 45+ minute meetings. If I comment out the
logging it goes back to failing. Does anyone know why adding this logging
might fix the problem?
Some of the entries from the log:
FFMPEG LOG: intra_quant_bias = 0 inter_quant_bias = -64
D:FFMPEG LOG: Setting default whitelist 'file,crypto'
D:FFMPEG LOG: Using AVStream.codec.time_base as a timebase hint to the muxer is
deprecated. Set AVStream.time_base instead.
FFMPEG LOG: Using AVStream.codec to pass codec parameters to muxers is
deprecated, use AVStream.codecpar instead.
FFMPEG LOG: Using AVStream.codec.time_base as a timebase hint to the muxer is
deprecated. Set AVStream.time_base instead.
FFMPEG LOG: Using AVStream.codec to pass codec parameters to muxers is
deprecated, use AVStream.codecpar instead.
FFMPEG LOG: reserve_index_space:0 master_index_max_size:256
D:FFMPEG LOG: duration_est:36000.000, filesize_est:6.4GiB,
master_index_max_size:256
FFMPEG LOG: Application provided invalid, non monotonically increasing dts to
muxer in stream 0: 1954 >= 1954
FFMPEG LOG: Application provided invalid, non monotonically increasing dts to
muxer in stream 0: 2524 >= 2524
FFMPEG LOG: Invalid pts (3199) <= last (3199)
CONFIDENTIAL MATERIAL. This communication and any files or attachments
transmitted with it may contain information that is confidential, privileged
and exempt from disclosure under applicable law. It is intended solely for the
use of the individual or the entity to which it is addressed. Disclosure of any
information in this communication to other than intended parties may do great
harm to BVS Performance Solutions and/or the intended party. If you are not the
addressee indicated in this message (or responsible for delivery of the message
to such person), any disclosure, copy, distribution, or use of the contents of
this message is prohibited. If this is the case, please destroy this message,
and any attachments, and notify us by sending a reply email. Thank you.
_______________________________________________
ffmpeg-devel mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel