Page 1 of 1

Stream current timestamp/position

Posted: 29 Mar 2016 12:28
by rhegner
I need an external application to be synchronized with a video being played. Therefore the external application needs to know the current timestamp/position in the file.

Is it possible using the streaming capabilities of VLC to set up a stream which does not contain actual audio and video data, but only the current timestamp/position?
This information should preferably be sent via UDP and preferably in a format which is easy to parse (ideal would be just a raw timestamp per UDP packet).

Re: Stream current timestamp/position

Posted: 29 Mar 2016 12:51
by rhegner
What I tried so far is clicking together a stream output using the GUI with an UDP destination, RAW encapsulation and no video or audio codec, resulting in the following stream output string:

Code: Select all

:sout=#duplicate{dst=udp{dst=127.0.0.1:55438},dst=display} :sout-keep
But with these settings VLC does not seem to send anything.

This doesn't seem to work as well:

Code: Select all

:sout=#duplicate{dst=rtp{dst=127.0.0.1,port=5004,sap,name=test},dst=display} :sout-keep

Re: Stream current timestamp/position

Posted: 29 Mar 2016 15:14
by Rémi Denis-Courmont
Not really so far.

Re: Stream current timestamp/position

Posted: 29 Mar 2016 15:16
by rhegner
Thank you for your response!
Do you know if I can use the Network Sync feature for this purpose? Does it send UDP packets? I couldn't find any documentation describing how it actually works.

Re: Stream current timestamp/position

Posted: 29 Mar 2016 15:58
by Rémi Denis-Courmont
Yeah it is supposed to work though it is largelly unmaintained and poorly documented.