[FFmpeg-user] Audio slowly getting out of sync

Gabor Alsecz alseczg at gmail.com
Mon Nov 21 18:02:38 EET 2016


Dear All,

I have an issue when encoding HLS stream from an RTSP mjpeg video stream +
USB audio via dshow.
At the beginning audio & video are in sync but slowly but steadily the
sound drifting out of sync. Video seems faster, approximately each 10
minutes the audio late +1 second.

I am using the following command:
ffmpeg -y -loglevel info -f dshow -i audio="Microphone (Trust Gaming
Microphone)" -pix_fmt bgr24 -video_size 1280x720 -framerate 25 -f rawvideo
  -i "-" -b:a 160k -ar 44100 -pix_fmt yuv420p -profile:v baseline -r 25 -g
50 -hls_time 5 -hls_list_size 0 -hls_segment_filename file%03d.ts -f hls
out.m3u8


As you can see, this is rawvideo, feeding by memory bitmap "images" via
piping (from C#) + capture raw audio via dshow.

Any idea what/how to solve this issue? Thanks!


br,
Gabor


More information about the ffmpeg-user mailing list