I have managed to set the initial volume with a dirty hack of creating a sub_player that uses media_player_new()
and setting audio_set_volume(volume) but once media_list_player_new() is activated, no amount of monkeying around with the sub_player will adjust the volume.
Some stripped down python code:
Code: Select all
import vlc
import time
playlist=['/home/rolf/vp1.mp3','/home/rolf/vp.mp3']
inst = vlc.Instance()
sub_player = inst.media_player_new()
player = inst.media_list_player_new()
mediaList = inst.media_list_new(playlist)
player.set_media_list(mediaList)
volume = 60
sub_player.audio_set_volume(volume)
sub_player.play()
playing = set([1,2,3,4])
player.play()
while player.get_state() in playing:
time.sleep(1)