[Libav-user] Libavformat/FFMPEG: Muxing into mp4 with AVFormatContext drops the final frame, depending on the number of frames
Galen Lynch
glynch at mit.edu
Tue Oct 27 17:38:41 EET 2020
Hello everyone,
I am trying to use libavformat to create a .mp4 video with a single h.264
video stream, but the final frame in the resulting file often has a
duration of zero and is effectively dropped from the video. Strangely
enough, whether the final frame is dropped or not depends on how many
frames I try to add to the file. Some simple testing that I outline in the
Stack Overflow link below makes me think that I am somehow misconfiguring
either the AVFormatContext or the h.264 encoder, resulting in two edit
lists that sometimes chop off the final frame. I have also put a simplified
version of the code I am using (MWE) on the Stack Overflow question, in
case I'm making some obvious mistake. Any help would be greatly
appreciated: I've been struggling with this issue for the past few days and
have made little progress.
I have put more details, including the edit list box information, as well
as a MWE, on my Stack Overflow question
<https://stackoverflow.com/questions/64547604/libavformat-ffmpeg-muxing-into-mp4-with-avformatcontext-drops-the-final-frame>.
Any help would really be appreciated, I've been banging my head against the
wall with this.
Thank you in advance for your time!
Best,
Galen Lynch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20201027/d11df42f/attachment.html>
More information about the Libav-user
mailing list