Page 1 of 1

libvlc_media_player_set_time prblem

Posted: 02 Feb 2010 11:55
by frbaresi
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?

Re: libvlc_media_player_set_time prblem

Posted: 03 Feb 2010 10:29
by DieBagger
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)

Re: libvlc_media_player_set_time prblem

Posted: 04 Feb 2010 10:42
by frbaresi
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