[Libav-user] How to implement "-re" option with avformat?

Oleg mybrokenbeat at gmail.com
Fri Jul 19 19:23:06 CEST 2013


If you're sure, then trouble exists in player, because it should do synchronizing of audio and video, and for this thing it needs PTS values. Otherwise player can't play smoothly. If you don't have these values playback will not be synchronized as CPU burst\network trouble or OS lag would suddenly make streams unsynchronized. 
 
If you don't have PTS values then player(depends on implementation) either respect video and audio codec constants such as frame rate and sample rate, or assumes that it should play frames\samples as fast as possible (just your case) as all PTSs are zeros.

So you should look at your player. Also try it with ffplay.

19.07.2013, в 20:09, Gyula Hatalyák написал(а):

> I am quite sure.
> BTW: If I omit the "-re" flag from the command line, it also runs and finishes as quick as it can - processing and sending the packets regardless PTS/DTS. On the server side (Wowza) there is no slow-down to make it real-time.
> It is strange for me.
> 
> 
> On Fri, Jul 19, 2013 at 6:54 PM, Oleg <mybrokenbeat at gmail.com> wrote:
> Player should use PTS value anyway for correct and smooth playback. Are you sure that you're filling PTS correct?
> 19.07.2013, в 19:20, Gyula Hatalyák написал(а):
> 
> > Hi,
> >
> > I am streaming out packets with RTMP output format to Wowza media server.
> > I have a packet buffer as the input of the RTMP muxer.
> > I can send the packets faster than their duration - by av_interleaved_write_frame calls.
> > I send all the packets in the buffer until it is empty, and then wait for new packets to come.
> > The problem is:
> > During playback from Wowza the frames are displayed in the same timing as they were sent with av_interleaved_write_frame calls resulting fast playback and pause/still until the next bunch of packets.
> >
> > With command line ffmpeg I can use "-re" option to make the flow real-time.
> > Is there a lib counterpart of this option?
> > Or must I implement manually this "real-time" option?
> > Why aren't PTS/DTS used by muxer/wowza/player?
> >
> > Thanks for any help in advance.
> > Gyula
> > _______________________________________________
> > Libav-user mailing list
> > Libav-user at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/libav-user
> 
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
> 
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user

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


More information about the Libav-user mailing list