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.

  • So Duc. Create a playlist as a file. Put it in a directory of temporary files. And feed him vlc - gecube
  • Does not fit. The video will change after a certain time and come to the outside, so to speak. If it were possible, there would be no problems :) - player
  • Now created a playlist. To check, they just launched the player itself. Only 1 video is played and that's it. When rewinding to the next player also closes. How is that?)) - player
  • @player Check after each file playback for new files to play, for example. - approximatenumber

1 answer 1

In general, the problem was really in vlc. Wry set or OS wry set. Reinstalled the OS, installed vlc, made the update and everything is fine :)