grabbing timecode or getTime question

This forum is about all development around libVLC.
fxmech
New Cone
New Cone
Posts: 6
Joined: 05 Feb 2015 22:09

grabbing timecode or getTime question

Postby fxmech » 05 Feb 2015 22:45

Hi all, Im new to the forum.
I am trying to see if it is possible to embed timecode in a video to be retrieved as the video plays.
I saw the vlcj.player.MediaPlayer.getTime() function which returns the video play time in millis
My goal is to get any type of time data from a video so that I can use it to synch up a separate data to it. The sequence in the data file would run the exact length as the video so all I would need to do is to slow keep it flowing by matching timemarkers to the time retrieved from the video.
Im working in java. Is it possible to take the simple example#2 in vlcj and add this functionality?
Would that data be accurate in the case of a streaming video that maybe stalls temporarily due to bad network speeds?

I have been struggling just to understand the libraries and barely got it working playing a simple video. Even knowing how to pull time data from the video into a variable would be a great start. I am hoping to be able to retrieve data in 1/2 second increments or better.... a frame count could probably work just as well for me.

Any help is greatly appreciated...

fxmech
New Cone
New Cone
Posts: 6
Joined: 05 Feb 2015 22:09

Re: grabbing timecode or getTime question

Postby fxmech » 05 Feb 2015 22:48

I'm working with mp4 video files... thnx
The data file will be MIDI or OSC data

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: grabbing timecode or getTime question

Postby sherington » 05 Feb 2015 23:15

There is no API in LibVLC to extract any timecode data.

fxmech
New Cone
New Cone
Posts: 6
Joined: 05 Feb 2015 22:09

Re: grabbing timecode or getTime question

Postby fxmech » 06 Feb 2015 00:16

The only way I can think of doing this is to get the movie length and start an internal clock to synchronize to but I would need to be able to know every time the video stalls and for how long.... would that be a better approach?
I always figured grabbing time data or current frame data would be feasible...any other options to deal with slow Internet connections or user pausing of video?

fxmech
New Cone
New Cone
Posts: 6
Joined: 05 Feb 2015 22:09

Re: grabbing timecode or getTime question

Postby fxmech » 06 Feb 2015 00:21

What about embedding markers every 15 frames and using them as synch points?

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: grabbing timecode or getTime question

Postby sherington » 07 Feb 2015 09:32

There is no API in LibVLC to extract the type of data your're suggesting.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 9 guests