Good day to all! You need to write a program in python that will play video files from a folder in the vlc player. And they should be in the playlist, that is, one after the other. This code is written here:
import vlc mrl1 = '....1.3gp' mrl2 = '....2.3gp' Instance = vlc.Instance('--input-repeat=-1', '--fullscreen', '--mouse-hide-timeout=0') MediaList = Instance.media_list_new() MediaList.add_media(Instance.media_new(mrl2)) MediaList.add_media(Instance.media_new(mrl1)) list_player = Instance.media_list_player_new() list_player.set_media_list(MediaList) list_player.next() player.play()
The problem is that after starting the first video is spinning and then the player closes. That is the feeling that he does not add the second video to the sheet. With 1 video, everything works (repeat, etc.), but how to make sure that all videos are correctly added to the playlist? I rummaged through the Internet, alas, I did not find examples for this function :( Thanks in advance. PS Maybe there is a function that just plays all the videos and a specific folder in a row? That would be even better.