What is the property named "Position" in the http request

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
Miguel L Barco
New Cone
New Cone
Posts: 3
Joined: 25 Oct 2017 13:35

What is the property named "Position" in the http request

Postby Miguel L Barco » 25 Oct 2017 13:52

Hi,
I need to extract the current time (or position) from a video using http request with json.

- I can use the property "time", that woks well, but its not accurate enough. I would like frames, or milliseconds.
- I have seen another property "position" that shows a very big decimal number, and I suppose its also "time", or the real position in the video.

But I cant find the relationship between "position" and "time".

For example, I have "time":399, and "position":0.23910315334797,

Any help will be appreciated
Regards:
Migue

User avatar
InTheWings
Developer
Developer
Posts: 1275
Joined: 07 Aug 2013 13:15
VLC version: crashing
Operating System: Linux
Contact:

Re: What is the property named "Position" in the http request

Postby InTheWings » 25 Oct 2017 16:29

time is time in seconds. unsure if you can set a floating point number.
position is ratio on length.
:!: If you want your problem to be solved :
* First read troubleshooting guide VSG:Main
* Always provide verbose LOGS ! (command line or from gui)
* Always check your issue against a developer build from Nightly Build of VLC
* Tell us when your problem is solved !

Miguel L Barco
New Cone
New Cone
Posts: 3
Joined: 25 Oct 2017 13:35

Re: What is the property named "Position" in the http request

Postby Miguel L Barco » 25 Oct 2017 19:17

Thank you! Now I can do the math!
Using the ratio I can get a more precise value of each moment, not just rounded seconds. And using the difference between an exact "position" and the previous "second" expressed as exact "position", I can calculate the frames.
Maybe there are too much decimals, and too much rounded values, but its better than nothing.

Regards:
Migue

Miguel L Barco
New Cone
New Cone
Posts: 3
Joined: 25 Oct 2017 13:35

Re: What is the property named "Position" in the http request

Postby Miguel L Barco » 26 Oct 2017 10:11

Oh! Unfortunately the "seek" command value only accepts an integer. I can't jump to an specific frame, or millisecond or percentage. The telnet interface seems to have the same limitation.

It's sad that i can obtain the precise value of the current point but I can't use it to jump to that point again :-(

Any workaround or extension?

Regards:
Migue


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 71 guests