[Libav-user] How to use muxer with variable fps setting ?

Zong-Cing Lin jarvis0911 at gmail.com
Tue Nov 22 10:50:00 EET 2016

Hi all,

I'm using ffmpeg muxer api to save rtp h264 stream.
And each frame may come with variable interval, especially when something
wrong in network from tx side.

Although doc/examples/muxing.c looks like an example of muxing a local
stream from encoder with fix fps, I followed it to save encoded packet
extracted from rtp stream with avg_frame_rate 30 and tried to modify the
duration and pts of packet with a large value while tx slowed down.
But when I play the saved file, the frame which should show on screen with
longer time just flashes like other frames so that the total time is not
equal to the rtp stream presented on rx screen.
And from the information provided from player, the video is a constant 25
fps video.
I guess I had wrong configuration before calling avformat_write_header.

Please let me know whether ffmpeg muxer supports variable fps, any missing
steps from my usage, or any examples for reference.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20161122/27d2cd8a/attachment.html>

More information about the Libav-user mailing list