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

Ibrahim Tachijian barhom at netsat.se
Wed Jun 20 10:55:46 EEST 2018


Hey,

So this is a problem that has been bugging me for years.

1. The source is udp and the actual source is satellite.
2. Knowing its satellite we also know the stream won't be 100% perfect,
there will be losses.
3. Tranacoding with h264 and fdk-aac and outputting to hls.

The problem is that after a while, and a while can be hours or days. When
there's a period of let's say bad weather on the satellite dish and there
are losses on the input UDP mpeg2 stream then audio can go out of sync.

It never corrects itself. The only way to correct it restarting the
transcoder.

What way can we programmatically fix the audio sync issues (patch is
probably needed for ffmpeg) to fix this occurrence ?


I currently have a solution, that isn't super reliable but it works most of
the time. Please correct me if this is a bad way to look for sync issues.

I am running ffprobe on the hls files and are looking at start_time values
of video and audio. I run this every minute.

If the diff is > 1 then I am considering the audio to be out of sync and
restart the process. Is this correct ? Is it not? Why?


Of course the best way is to implement something directly into ffmpeg.


Thoughts ?


More information about the ffmpeg-devel mailing list