[FFmpeg-user] Sync troubles with input pipes from raw -> AAC/Scaling/H.264 -> live RTMP

Carl Eugen Hoyos cehoyos at ag.or.at
Wed Mar 27 12:19:44 CET 2013


Heinrich Fink <heinrich.fink <at> hfink.eu> writes:

> I have troubles with A/V sync for a live RTMP output stream 
> generated by ffmpeg.

Is your problem only reproducible with rtmp output or also if 
you output to a (flv) file?

[...]

> Here’s the story: In order to publish a live RTMP stream, I 
> use two named input pipes with raw video and raw audio, this 
> is coming from an application that is only able to output 
> raw formats (in “realtime” pace).

How is FFmpeg supposed to know the timestamps for the audio 
and the video stream?
(How would an ideal application know how to combine audio 
and video without desync?)

> However, unfortunately A/V seems to drift after running 
> for a couple of hours.

(I wrote the above before reading this sentence.)
Could this be a problem with the framerate?
Ie, are you missing a "000/1001" somewhere?

> Here’s the full command:

It is unfortunately missing the complete, uncut console 
output that is always needed if you want support on this 
mailing list.

Generally, if your problem is reproducible without external 
libraries (libx264), you should not use them as not using 
them often makes reproducing the problem easier.
(Is it reproducible with -vcodec flv1 ?)

Carl Eugen



More information about the ffmpeg-user mailing list