Media List in Python VLC
<p>I need to write a program in Python that will play video files from a folder in the VLC player, using the Linux OS. These files must be in the playlist. Code:</p>

<pre><code>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()
</code></pre>

<p>The problem is that after running the first video, the player closes. I think that it does not add the second video to the list.</p>

<ol>
<li>How to add a video to a playlist in Python's binding for LibVLC?</li>
<li>Is there a utility function that plays all the videos in a folder?
UPD: I've created a playlist, and ran it to test in VLC player. Playing only the first video. After VLC is also closed. What is rhe problem?</li>
</ol>