[FFmpeg-devel] Ffmpeg, UDP input source from satellite audio sync issues

Devin Heitmueller dheitmueller at kernellabs.com
Wed Jun 20 16:56:56 EEST 2018


Hello Ibrahim,

> I do have another issue with Audio sync when segmenting live content coming
> from satellite but without encoding (stream copying only). And since you
> cannot use aresample when copying I am unsure how you would go about to
> solve that issue.

I can make a few general suggestions, and some observations you may
not have considered.  Handling stream errors can be hard to do
properly, and over the years I've seen a host of cases on both the
encoder and the decoding side where it didn't do the right thing
resulting in A/V sync issues (and ffmpeg is certainly no exception).

You may be well served to simultaneously write out a copy of the
original TS to disk prior to transcoding.  This will allow you to
debug cases where A/V sync was lost and reproduce the issue.  Also,
it's much easier to be able to hand a sample to the developers and say
"Try this 100MB sample and you can see for yourself" as opposed to not
being able to provide any detail as to specifically what the source of
the A/V sync issue was.

Also, bear in mind that the issue could be on the transcoding or the
resulting decoder you are using to view the stream, and restarting the
transcoder may cause the issue to "go away" in the decoder just
because the stream is reset.  When dealing with A/V sync issues I
commonly find two classes of issues:

1.  There was a transient glitch and there was a gap in the resulting
stream but after the glitch timing was correct.
2.  There was a transient glitch and the timing in the resulting
stream was off from that point forward.

For #1 I've definitely seen cases where popular decoders would hit the
glitch and fall out off sync and then never recover  (I reported a
couple of such issues when VLC 3.0 was released).  Even worse, you can
be mislead and blame the encoder because the problem went away after
being restarted, when in fact the issue would have also disappeared if
you had simply restarted the decoder.

My best suggestion would be to come up with a couple of concrete
examples, including the sample TS and the ffmpeg transcode command
line, which are 100% reproducible and can be used to debug the issue.
It's much more likely you'll get a fix if the developer can "make this
stream play properly" versus "fix every possible cause of A/V sync
issues that we can't readily reproduce and don't even know exist".

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com


More information about the ffmpeg-devel mailing list