problem with using a lot of random memory access in python and vlc

This forum is about all development around libVLC.
mohammadhosein
New Cone
New Cone
Posts: 4
Joined: 23 Oct 2020 14:25

problem with using a lot of random memory access in python and vlc

Postby mohammadhosein » 23 Oct 2020 14:43

Hello. I want to play an IPTV playlist with vlc and python. Evrything is ok, but when I want to change the playlist or play an other file, cannot release the memory used by vlc for playing the playlist:
#importing vlc:
import vlc
#Creating Instance:
i=vlc.Instance("-q")
#Creating media player object:
#media_player=i.media_player_new()
#setting volume of media player to 50
media_player.audio_set_volume(50)
#creating media list from a file and media list player:
media_list=i.media_list_new(["playlist.m3u"])
media_list_player=i.media_list_player_new()
#setting media list and media player object to media list player
media_list_player.set_media_player(media_player)
media_list_player.set_media_list(media_list)
#Evrything is ok until here, but when i want to play the list, memory start to increase.
media_list_player.play()
#trying to release the memory.
#stopping playlist, doesn't work:
media_list_player.stop()
#release the media list player:
media_list_player.release()
#release the media list:
media_list.release()
But not any effect.

mfkl
Developer
Developer
Posts: 739
Joined: 13 Jun 2017 10:41

Re: problem with using a lot of random memory access in python and vlc

Postby mfkl » 26 Oct 2020 08:47

Hi,

Can you share full logs please?
https://mfkl.github.io

mohammadhosein
New Cone
New Cone
Posts: 4
Joined: 23 Oct 2020 14:25

Re: problem with using a lot of random memory access in python and vlc

Postby mohammadhosein » 26 Oct 2020 11:06

Hello. Here is the log.
I hope it helps.
https://gofile.io/d/Jm510s

mfkl
Developer
Developer
Posts: 739
Joined: 13 Jun 2017 10:41

Re: problem with using a lot of random memory access in python and vlc

Postby mfkl » 27 Oct 2020 04:21

main error: option sub-original-fps does not exist
access error: HTTP 404 error
main error: read error: Interrupted function call
http error: failed to read answer
https://mfkl.github.io

mohammadhosein
New Cone
New Cone
Posts: 4
Joined: 23 Oct 2020 14:25

Re: problem with using a lot of random memory access in python and vlc

Postby mohammadhosein » 27 Oct 2020 06:29

Well, You are true. But how can I release the memory when these errors are occurred? I'm writing a program like robot for a Messenger, if a user send a link to play and this link was an IPTV, and these errors occurred, memory goes up and don't come back down, and after some time, memory won't have enough space for storing informations and there wouldn't be any memory left for me to do other jobs
On the other hand, I think going up memory is related with size of playlist or iptv. Because I have tested with some other iptvs, the usage of memory is difrent for the other playlists

mfkl
Developer
Developer
Posts: 739
Joined: 13 Jun 2017 10:41

Re: problem with using a lot of random memory access in python and vlc

Postby mfkl » 27 Oct 2020 10:44

Can you please share some correct logs? With the ones you shared, playback doesn't even start so it's hard to tell what is going on.

If you want us to have a look further, we will need an MCVE through git https://stackoverflow.com/help/mcve I guess
https://mfkl.github.io

mohammadhosein
New Cone
New Cone
Posts: 4
Joined: 23 Oct 2020 14:25

Re: problem with using a lot of random memory access in python and vlc

Postby mohammadhosein » 31 Oct 2020 06:15

I didn't know where is the correct log you need, so I provided and example in python from the thing i do.
In this zip file, two files named test.py that is the code, and a playlist file that contains some tv channels exists. When I open the test.py, my memory go's up
https://gofile.io/d/e6UQyN


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 21 guests