Desynchronization issue with FLV stream

About encoding, codec settings, muxers and filter usage
elesouef
Blank Cone
Blank Cone
Posts: 20
Joined: 14 Apr 2010 10:34

Desynchronization issue with FLV stream

Postby elesouef » 08 Feb 2011 15:11

Hi,

My goal is to stream from a bt878 acquisition card.

For testing purpose, I streamed really great a XVID file without desynchronization at all with the following command-line :

Code: Select all

--sout '#transcode{vcodec=FLV1,acodec=mp3,vb=2000,samplerate=44100,ab=96}:standard{access=http,mux=ffmpeg{mux=flv},dst=server.fqdn:8080/stream.flv}' --sout-keep
Now, I would like to stream from a bt878 card with the following command-line :

Code: Select all

cvlc -I dummy $VLC_DEV --sout '#transcode{vcodec=FLV1,acodec=mp3,vb=1000,samplerate=44100,ab=96,scale=0.5,vfilter={croppadd{cropbottom=10,cropleft=10,cropright=10}}}:standard{access=http,mux=ffmpeg{mux=flv},dst=server.fqdn:8080/stream.flv}' --sout-keep
with $VLC_DEV :

Code: Select all

VLC_DEV="v4l2:// :v4l2-dev='/dev/video0' :input-slave=alsa://hw:1,0 :v4l2-standard=0:v4l2-standard=0 :v4l2-chroma= :v4l2-input=3 :v4l2-audio-input=0 :v4l2-io=0 :v4l2-width=-1 :v4l2-height=-1 :v4l2-aspect-ratio=4\:3 :v4l2-fps=0 :v4l2-caching=1000 :v4l2-tuner=0 :v4l2-tuner-frequency=-1 :v4l2-tuner-audio-mode=0 :no-v4l2-controls-reset :v4l2-brightness=-1 :v4l2-contrast=-1 :v4l2-saturation=-1 :v4l2-hue=-1 :v4l2-black-level=-1 :v4l2-auto-white-balance=-1 :v4l2-do-white-balance=-1 :v4l2-red-balance=-1 :v4l2-blue-balance=-1 :v4l2-gamma=-1 :v4l2-exposure=-1 :v4l2-autogain=-1 :v4l2-gain=-1 :v4l2-hflip=-1 :v4l2-vflip=-1 :v4l2-hcenter=-1 :v4l2-vcenter=-1 :v4l2-audio-volume=-1 :v4l2-audio-balance=-1 :no-v4l2-audio-mute :v4l2-audio-bass=-1 :v4l2-audio-treble=-1 :v4l2-audio-loudness=-1 :v4l2-set-ctrls= :file-caching=300"
After almost half an hour, sound is in advance from 1 second to the image...

Do you know what can cause this ?

Thank you very much for your help.

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Desynchronization issue with FLV stream

Postby Rémi Denis-Courmont » 08 Feb 2011 18:50

"Normally", if the desync comes from within VLC, the slowest of the two elementary stream will completely drop out of the mux. In this case, it looks more like you audio hardware is drifting away from system clock :-( Then I have no ideas how to fix it.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

elesouef
Blank Cone
Blank Cone
Posts: 20
Joined: 14 Apr 2010 10:34

Re: Desynchronization issue with FLV stream

Postby elesouef » 09 Feb 2011 08:50

Thanks for replying.

An idea : is it possible, if I enable the rc interface, to tell vlc to "resync" or to "make the audio stream" be N seconds in advance, therefore getting a "false resync" ?

elesouef
Blank Cone
Blank Cone
Posts: 20
Joined: 14 Apr 2010 10:34

Re: Desynchronization issue with FLV stream

Postby elesouef » 09 Feb 2011 14:36

Ok, did some more tests :

Common basis : VLC 1.1.7 compiled under debian 6.0 with ffmpeg 0.6.1 source tree as PKG_PATH_AVCODEC.

Configuration 1 : Dell Precision T3500 with Asus MyCinema PCTV Acquisition Card. The FLV stream is desynchronized after 2 hours of streaming. Audio is late by 3 seconds.

Configuration 2 : Dell Precision T3500 with Hauppauge Acquisition Card and Motherboard Sound Card as sound acquisition. Almost the same latency.

What can I do to solve this issue ? Any idea would be greatly appreciated.

Greg
Cone that earned his stripes
Cone that earned his stripes
Posts: 316
Joined: 24 Feb 2009 00:37

Re: Desynchronization issue with FLV stream

Postby Greg » 09 Feb 2011 15:25

There are several posts relating to audio sync (or desync )
Eg. This one
viewtopic.php?f=4&t=87254

Follow the threads and sub links in the above link for others. Might save you some time experimenting?
I don't think there is a solution at the moment


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 10 guests