libvlc_media_player_set_rate doesn't work

This forum is about all development around libVLC.
spider58
Blank Cone
Blank Cone
Posts: 91
Joined: 28 Jun 2011 14:39

libvlc_media_player_set_rate doesn't work

Postby spider58 » 21 Jul 2014 10:31

Hello. Im using 2.2.0 nighty building. I want to change video rate while play.

Public Sub libvlc_media_player_set_rate(Byval player as Intptr, Byval Speed as Double)
End Sub

In i can call this sub such as

Player.libvlc_media_player_set_rate(playerhandle, 1.5F)

This code must be set rate to 1.5 But doesn't work. Player continuing play normally. Doesn't gives any error.

Can someone have an any idea?

Best regards

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: libvlc_media_player_set_rate doesn't work

Postby sherington » 21 Jul 2014 13:45

Hmm... that LibVLC API function still works just fine for me with latest VLC 2.2.0-git.

spider58
Blank Cone
Blank Cone
Posts: 91
Joined: 28 Jun 2011 14:39

Re: libvlc_media_player_set_rate doesn't work

Postby spider58 » 21 Jul 2014 15:15

Hmm... that LibVLC API function still works just fine for me with latest VLC 2.2.0-git.
thanks for reply. can you share function defining and usage code please? I want to check my code for differences.

Best regards.

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: libvlc_media_player_set_rate doesn't work

Postby sherington » 21 Jul 2014 16:52

Hmm... that LibVLC API function still works just fine for me with latest VLC 2.2.0-git.
thanks for reply. can you share function defining and usage code please? I want to check my code for differences.

Best regards.
Well, I don't know what language you're using so I don't think I can help you with that, I simply use the "C" function declared in the header file and an equivalent function mapped in Java. A parameter value of 2.0f doubles the speed, 0.5f halves it, just as you'd expect.

spider58
Blank Cone
Blank Cone
Posts: 91
Joined: 28 Jun 2011 14:39

Re: libvlc_media_player_set_rate doesn't work

Postby spider58 » 21 Jul 2014 17:02

Hmm... that LibVLC API function still works just fine for me with latest VLC 2.2.0-git.
thanks for reply. can you share function defining and usage code please? I want to check my code for differences.

Best regards.
Well, I don't know what language you're using so I don't think I can help you with that, I simply use the "C" function declared in the header file and an equivalent function mapped in Java. A parameter value of 2.0f doubles the speed, 0.5f halves it, just as you'd expect.
using vb.net. anyway thanks.

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: libvlc_media_player_set_rate doesn't work

Postby Rémi Denis-Courmont » 21 Jul 2014 17:45

Not all inputs can have their rate changed. For instance, it obviously cannot work for live streams.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

spider58
Blank Cone
Blank Cone
Posts: 91
Joined: 28 Jun 2011 14:39

Re: libvlc_media_player_set_rate doesn't work

Postby spider58 » 22 Jul 2014 10:25

Not all inputs can have their rate changed. For instance, it obviously cannot work for live streams.
yes you're right. but i dont work with live streams. Recording live streams to disk as TS format. And playing from disk.

spider58
Blank Cone
Blank Cone
Posts: 91
Joined: 28 Jun 2011 14:39

Re: libvlc_media_player_set_rate doesn't work

Postby spider58 » 23 Jul 2014 07:53

An interesting situation, how it worked i don't know but

tried to set rate value as 1.9f it's working but such as 20f , too fast. not like 1.9f, my video has 2 minutes length. It finishing to play in 3-4 seconds with 1.9f speed.

tried to set rate 1.89f it's working too, but such as 0.03f, so slow, my video finishing to play in ~20 minutes with 1.89f speed

tried to set rate 0.5f or 5f, not working, no speed changing, play as normal speed

sometimes get_Rate returns 4.17f, or 3,68f sometimes returns 0f, but video plays normal speed

i can't understand anything, weird

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: libvlc_media_player_set_rate doesn't work

Postby sherington » 23 Jul 2014 09:26

What about Float vs Double in vb.net, is that a thing?

Code: Select all

Public Sub libvlc_media_player_set_rate(Byval player as Intptr, Byval Speed as Float) End Sub

spider58
Blank Cone
Blank Cone
Posts: 91
Joined: 28 Jun 2011 14:39

Re: libvlc_media_player_set_rate doesn't work

Postby spider58 » 23 Jul 2014 09:38

What about Float vs Double in vb.net, is that a thing?

Code: Select all

Public Sub libvlc_media_player_set_rate(Byval player as Intptr, Byval Speed as Float) End Sub
in vb.net we use double instead of float. its same. No float type can define in vb.net

spider58
Blank Cone
Blank Cone
Posts: 91
Joined: 28 Jun 2011 14:39

Re: libvlc_media_player_set_rate doesn't work

Postby spider58 » 23 Jul 2014 09:46

What about Float vs Double in vb.net, is that a thing?

Code: Select all

Public Sub libvlc_media_player_set_rate(Byval player as Intptr, Byval Speed as Float) End Sub
oh man. thanks for the tip. In google i found single variable type. and i tried to use SINGLE instead of DOUBLE. This is working perfect!! Thanks for idea :)


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 13 guests