[FFmpeg-devel] rtp streaming x264+audio issues (and some ideas to fix them)

Ronald S. Bultje rsbultje
Mon Feb 8 16:32:53 CET 2010


On Mon, Feb 8, 2010 at 9:17 AM, Luca Abeni <lucabe72 at email.it> wrote:
> I had a look at the patch and at the current code. After thinking a little
> bit about it, I think the patch is good and should be committed. After all,
> requiring that rtp_write_header() calls for the various streams are happen
> in a short time seems reasonable. And should (IMHO) work in 99% of the
> cases.

any ideas how to fix the same issue in the demuxer?

In the demuxer, relative timestamps are calculated (see
rtp_packet_finalize() in rtpdec.c) with pts = timestamp + last_ntp -
first_ntp, each in their own timebase. For different streams within
the same session, the ntp might have come in at a different point in
time (and this happens for h264 streams from e.g. Axis cameras, where
they are up to several seconds apart), causing async (up to the same
amount, so that can be >=2 seconds under some conditions). Setting it
to zero in read_header() fixes this (which is my curernt quickfix).
Any ideas on a better fix for this?


More information about the ffmpeg-devel mailing list