[vlc-devel] Finer time resolution in VLC web interface (i.e. milliseconds)
tristan.lanfrey at gmail.com
Mon Feb 13 22:54:01 CET 2012
On Mon, Feb 13, 2012 at 6:31 AM, Arslan, Ali <ali_arslan at brown.edu> wrote:
> Hi everyone,
> I recently started using the http interface to sync vlc with matlab
> (which was a recent question that I asked in this list).
> Now I see that vlc sends out the time information in seconds. It's
> nice to see the time elapsed in the video but I need a lot higher time
> In other words, I would like to interact with vlc in millisecond
> resolution, or at least query the current playback time in
> This thread mentions that it was unimplemented at the time (in 2009):
> I was wondering if there's any change in that feature.
Not one of the regulars here, but I'm using status' length * position for that.
Never really cared about high precision so unsure whether it's accurate
enough (nor how this position feed gets populated), but may be worth
> I also suspect that start/stop commands given over http interface are
> not instantaneous and are quantized to seconds (although I haven't
> really tested that yet). Comments?
>From src/playlist/thread.c you can see a condition variable is used,
so there's no quantization. As soon as the query is received by the
http server, resolved and passed down the lua httprequest, and finally
to the playlist module in playlist_Control, the condition variable is
notified (in src/playlist/control.c), and the playlist thread will be woken
up. If that happens in more than 100ms, I'd say you might want to buy
a new computer :)
Your biggest latency is not inside VLC but the inter process communication
(in this case, the it takes for your matlab script to open a HTTP connection
and send the request). If you want "real time" you'd rather embed VLC in
your application altogether (and use libVLC).
Again, not a regular on this project, so don't take that as guru advice.
> I guess I could somehow make use of the "frames shown" field, but a)
> it increases cumulatively, b) I don't know how robust would that be to
> codecs, glitches and so on...
> Ali B Arslan, M.Sc.
> Cognitive, Linguistic and Psychological Sciences
> Brown University
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
More information about the vlc-devel