[FFmpeg-devel] Fix ffmpeg -re behaviour
Stefano Sabatini
stefano.sabatini-lala
Thu Nov 27 23:15:23 CET 2008
On date Tuesday 2008-11-25 23:48:59 +0100, Michael Niedermayer encoded:
> On Tue, Nov 25, 2008 at 10:37:52PM +0100, Stefano Sabatini wrote:
> > On date Tuesday 2008-11-25 13:43:33 +0100, Stefano Sabatini encoded:
> > > On date Tuesday 2008-11-25 01:02:22 +0100, Michael Niedermayer encoded:
> > > > On Mon, Nov 24, 2008 at 06:37:12PM +0000, Luca Abeni wrote:
[...]
> > > > > Yes, I can agree with most of this. But (I think) the point of this
> > > > > patch is not to provide a "correct" streaming support. I think the point
> > > > > of this patch is to fix "-re", which currently works only in some
> > > > > special cases (it does not work for audio only-files, and it does not
> > > > > work for some input containers/codecs - flv, if I remember well).
> > > > > In this sense, I think the patch is actually fixing a bug (then, it can
> > > > > be questioned if "-re" is the right thing for streaming, etc... But I
> > > > > think it's a different issue ;-). And I think the code after applying
> > > > > this patch is more compliant with the definition of "-re" given by
> > > > > ffmpeg (but this is just my opinion).
> > > >
> > > > ohh well, fine, lets fix the -re hack but please use pts instead of next_pts
> > > > unless that works less well.
> > >
> > > As long as I've tested it, they seem to work the same, there is an
> > > initial delay on the receiving end, with RTP streaming all the first
> > > packets seem to be sent too lately so ffplay first hangs then runs
> > > until the frames are again in synch (all this lasts for few seconds, I
> > > think it was the same without the fix).
> > >
> > > I'll send an updated patch this night.
> >
> > Attached patches.
> >
> > Patch #3 make -re global, that is it will affect every stream in input
> > rather than set it only for the first video stream encountered.
>
> iam fine with the patches assuming they have been tested
Applied them all, thanks Michael and Luca for the review!
As for the problem I experienced I think it depends more on the
receiving end (ffplay in this case), also the problem doesn't seem to
depend on the propesed change, and it likely depends on some
synchronization issue (tried ffplay, vlc, and mplayer, only mplayer
worked smoothely but curiosly it couldn't decode audio!).
Anyway -re is not meant to be the proper way to implement streaming,
nonetheless I think its behaviour with this patchset has nicely
improved.
Regards.
--
FFmpeg = Furious Fiendish Mastering Power Extreme Geek
More information about the ffmpeg-devel
mailing list