libvlc_media_player_set_time prblem

This forum is about all development around libVLC.
frbaresi
New Cone
New Cone
Posts: 9
Joined: 25 Feb 2009 13:47

libvlc_media_player_set_time prblem

Postby frbaresi » 02 Feb 2010 11:55

Hy,
I am using the libvlc to create a vod player but I am having some problems. I can play the videos hosted on my server (using the rtsp protocol) but i'm having 2 problems setting/getting video time.

My problems are:
.The first time I use libvlc_media_player_get_time, it allways returns 0 ( even if the video is playing for a minute).
.After setting the time to 30000 using libvlc_media_player_set_time, libvlc_media_player_get_time returns 12044

Any idea?

DieBagger
New Cone
New Cone
Posts: 7
Joined: 20 Jan 2010 23:55

Re: libvlc_media_player_set_time prblem

Postby DieBagger » 03 Feb 2010 10:29

I have no idea on why this is or how to fix it but I had the same problem. For me the solution was to get the stream length from an external source and calculate the position out of the time I want to set. I then use libvlc_media_player_set_position to jump to the time I want.

What RTSP server are you using? I wasn't sure if the problem was within VLC or with the rtsp server not broadcasting the correct stream length. (I'm using MediaPortal tv server which is using the Live555 rtsp component)

frbaresi
New Cone
New Cone
Posts: 9
Joined: 25 Feb 2009 13:47

Re: libvlc_media_player_set_time prblem

Postby frbaresi » 04 Feb 2010 10:42

Hy,
DieBagger, I'm using a VOD server from Anevia.
Whenever I move forward the video I do a series of operations:
.get media length (mediaTime)
.get current video time (CurTime)
.set video time = (current time + 30 seconds) (setTime)
.get current time (CurTime)

This is the output that I'm getting:
mediaTime116737
CurTime0 //should be higher than 0
setTime30000
CurTime30000
libdvbpsi error (PSI decoder): TS discontinuity (received 5, expected 0) for PID 0
libdvbpsi error (PSI decoder): TS discontinuity (received 5, expected 0) for PID 66
mediaTime116737
CurTime9493 //should be, at least 30000
setTime39493
CurTime39493
libdvbpsi error (PSI decoder): TS discontinuity (received 3, expected 14) for PID 0
libdvbpsi error (PSI decoder): TS discontinuity (received 3, expected 14) for PID 66
mediaTime116737
CurTime37563 //should be, at least 39493
setTime67563
CurTime67563

Any idea?
Thankx


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 6 guests