how can you force a stream to sync?

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
shadowspawn
Blank Cone
Blank Cone
Posts: 17
Joined: 28 Jan 2004 18:38
Contact:

how can you force a stream to sync?

Postby shadowspawn » 30 Jul 2005 11:49

I have a nice, phat comp for serving the stream and encoding whatever. I have different computers (most laptops), different OS's.

I want to perfectly sync the video, even if it means pre-buffering allot. They always seem to slip a bit between computers, is there a way to stop that?

i'm using http, and i've tried every combination (at least I think I have, if you think of it there's allot of combinations possible) of encapsulation and audio and video, and different servers to test.

some are over a wlan (good signal), some are on a 100mbit switch. it's not loss, nothing skips, just things never sync up perfectly, or one or two drifts from time to time.

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Postby dionoea » 30 Jul 2005 14:48

you should have a look at the "netsync" module. One VLC (the server) acts as a sync "source" and all the others poll it to stay in sync. I've never used it myself but it is known to work.
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

shadowspawn
Blank Cone
Blank Cone
Posts: 17
Joined: 28 Jan 2004 18:38
Contact:

Postby shadowspawn » 02 Aug 2005 03:23

where's that module?

i saw a checkbox in streamout_transcode with "synchronize on audio track" but that didn't do it.

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Postby dionoea » 02 Aug 2005 13:37

Hehe ... i just answered that question in detail yesterday. Have a look here :

viewtopic.php?t=11134
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

shadowspawn
Blank Cone
Blank Cone
Posts: 17
Joined: 28 Jan 2004 18:38
Contact:

Postby shadowspawn » 02 Aug 2005 17:39

this is great, thanks! (never knew this was in there.)

let me make sure i get this right, because i'm not sure how this module works inside vlc or how to verify that it's working right

i fire up the streaming server
i fire up another instance of vlc on the same server with nothing but --netsync-master, which will then just be a "listen" server
all clients just add in -netsync-master-ip 10.1.1.50 (presuming that's the server)

here's the question tho, does the vlc listen/netsync master need to connect to the stream (the other instance of itself) at all, or is it's only purpose to just sync clients? if all it does is just sync traffic and doesn't need access to the stream, i can stick it on an old p2 233 or something and forever let it idle.

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Postby dionoea » 02 Aug 2005 22:19

the master and streamer are supposed to be one and the same VLC instance.

hth
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

shadowspawn
Blank Cone
Blank Cone
Posts: 17
Joined: 28 Jan 2004 18:38
Contact:

Postby shadowspawn » 02 Aug 2005 22:55

You need to use another instance of VLC acting as client in order to use the syncing mechanism

that's what threw me off.

thanks!

shadowspawn
Blank Cone
Blank Cone
Posts: 17
Joined: 28 Jan 2004 18:38
Contact:

Postby shadowspawn » 11 Aug 2005 06:08

i've tried everything.

it's not working right. it'll connect, but i get these weird VOB errors in the messages display. without the --extraintf it's fine, but totally no sync.

is it because it's a multi-homed server? i fire up a win32 server with the extra switches, then load a file and set streams. i figured if it can connect, it can connect on everything. do all clients need to be the same version? the server is a "nightly", not sure if things changed in this module.

i'd really like this just for mp3 playback as well, but it seems to still miss.

does it have to be command-line? some of these are linux clients, i don't understand why this wouldn't be a "trigger" or similar set in the master to automatically force clients to sync.

maybe i'm borking the clients? it's hard to tell, is there a --logfile switch to see messages before the gui fires up?

believe me i understand client/server synchs from doing video game network development, but i can't figure out why it's not working... without starting to build it.

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Postby dionoea » 11 Aug 2005 09:35

for the logfile : --extraintf logger --logfile vlc.log --logmode text
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

shadowspawn
Blank Cone
Blank Cone
Posts: 17
Joined: 28 Jan 2004 18:38
Contact:

Postby shadowspawn » 13 Aug 2005 20:31

i decided to go back to simple, with an mp3 before going to troubleshoot video. the netsync module is definitely loading on the clients and the server, server's commandline has the ip address (it's a multi-homed machine) for the netsync master.

Code: Select all

:sout=#transcode{acodec=mpga,ab=192,channels=2}:duplicate{dst=std{access=http,mux=ts,url=10.1.2.69:1234}}
Now that's the only way I can even get it to work, but it still doesn't work. what happens is a "blip" is heard, like a partial split second connect, then tons of

"main warning: received buffer in the future (whatever)"

if I pick any other encoding method the client doesn't even produce the audio "blip" (it is a part of the song, amazing what the ear can pick up with just a frame). This happens with machines connected directly over a switch (server's on a switch), or over a wlan. "shadow" is the server, 10.1.2.69. It does the same thing if I specify everything as the ip instead of the name or reverse roles or use a different server/client altogether. all servers are dual processor xeons, dunno if that makes any difference.

Code: Select all

main debug: CPU has capabilities 486 586 MMX MMXEXT FPU main debug: looking for memcpy module: 3 candidates main debug: using memcpy module "memcpymmxext" main debug: waiting for thread completion main debug: thread 3404 (playlist) created at priority 0 (src/playlist/playlist.c:152) main debug: waiting for thread completion main debug: thread 3420 (preparser) created at priority 0 (src/playlist/playlist.c:174) main debug: looking for interface module: 1 candidate netsync: Using the netsync interface module... main debug: using interface module "netsync" main debug: interface initialized main debug: thread 3436 (interface) created at priority 0 (src/interface/interface.c:211) main debug: looking for interface module: 1 candidate main debug: using interface module "hotkeys" main debug: interface initialized main debug: thread 3464 (interface) created at priority 0 (src/interface/interface.c:211) main debug: looking for interface module: 3 candidates main debug: using interface module "wxwindows" main debug: interface initialized main debug: thread 3480 (manager) created at priority 0 (src/interface/interface.c:196) main debug: net: connecting to '10.1.2.69:9875@:9876' main debug: looking for network module: 2 candidates wxwindows debug: Using last windows config '(-1,0,0,1400,1050)(0,66,66,338,94)(2,242,242,418,580)' wxwindows debug: id=0 p=(66,66) s=(338,94) wxwindows debug: id=2 p=(242,242) s=(418,580) main debug: using network module "ipv4" main debug: unlocking module "ipv4" main debug: adding playlist item `http://shadow:1234' ( http://shadow:1234 ) main debug: creating new input thread main debug: waiting for thread completion main debug: `http://shadow:1234' gives access `http' demux `' path `shadow:1234' main debug: creating demux: access='http' demux='' path='shadow:1234' main debug: looking for access_demux module: 0 candidates main debug: thread 3660 (input) created at priority 1 (src/input/input.c:230) main warning: no access_demux module matched "http" main debug: creating access 'http' path='shadow:1234' main debug: looking for access2 module: 6 candidates access_http debug: http: server='shadow' port=1234 file='(null) main debug: net: connecting to 'shadow:1234' main debug: looking for network module: 2 candidates ipv4 debug: connection in progress main debug: using network module "ipv4" main debug: unlocking module "ipv4" access_http debug: protocol 'HTTP' answer code 200 access_http debug: Content-Type: application/octet-stream main debug: using access2 module "access_http" main debug: pre buffering main debug: received first data for our buffer main debug: prebuffering done 5768 bytes in 0s - 25 kbytes/s main debug: creating demux: access='http' demux='' path='shadow:1234' main debug: looking for demux2 module: 38 candidates main debug: using demux2 module "ps" access_http debug: GET META (null) (null) (null) main debug: `http://shadow:1234' successfully opened main debug: selecting program id=0 main debug: looking for decoder module: 24 candidates main debug: using decoder module "mpeg_audio" main debug: thread 3940 (decoder) created at priority 2 (src/input/decoder.c:159) mpeg_audio debug: MPGA channels:2 samplerate:44100 bitrate:192 main debug: no aout present, spawning one main debug: looking for audio output module: 3 candidates aout_directx debug: OpenAudio aout_directx debug: found device: Primary Sound Driver aout_directx debug: found device: Crystal WDM Audio aout_directx debug: device supports 2 channels aout_directx debug: device supports 1 channel aout_directx debug: creating DirectSoundThread main debug: thread 4436 (DirectSound Notification Thread) created at priority 15 (directx.c:386) aout_directx debug: DirectSoundThread ready main debug: using audio output module "aout_directx" main debug: output 'fl32' 44100 Hz Stereo frame=1 samples/8 bytes main debug: mixer 'fl32' 44100 Hz Stereo frame=1 samples/8 bytes main debug: no need for any filter main debug: looking for audio mixer module: 3 candidates main debug: using audio mixer module "float32_mixer" main debug: input 'mpga' 44100 Hz Stereo frame=1152 samples/1053 bytes main debug: filter(s) 'mpga'->'fl32' 44100 Hz->44100 Hz Stereo->Stereo main debug: looking for audio filter module: 22 candidates main debug: using audio filter module "mpgatofixed32" main debug: found a filter for the whole conversion main debug: filter(s) 'fl32'->'fl32' 48510 Hz->44100 Hz Stereo->Stereo main debug: looking for audio filter module: 22 candidates main debug: using audio filter module "bandlimited_resampler" main debug: found a filter for the whole conversion
then the audible "blip", then tons of the futuristic messages.

not sure if this helps or not, but the clocks are all synced. :) and is this the sync port, btw?

Code: Select all

main debug: net: connecting to '10.1.2.69:9875@:9876'
(just wanted to know in case i actually get this working and want to try it on a public interface)


keep in mind it will connect normally without the --extraintf netsync and play fine on the clients, just out of sync.

all vlc clients are the same as the server, 0.8.2, started fresh with settings.

kinda stumped.

shadowspawn
Blank Cone
Blank Cone
Posts: 17
Joined: 28 Jan 2004 18:38
Contact:

Postby shadowspawn » 22 Aug 2005 02:42

i'm gonna guess that true sync with videolan isn't possible.

damn friggin shame, lemme tell ya.

even for my own private reasons.

if i can do it with quake3/quake2, it should be damn possible with vlc.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 11 guests