Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: Ripley on July 20, 2022, 04:31:12 PM
-
I'm creating a Mp3 player and I have been using Pygame to load and play the music, but due to some technical issues with Pygame I am trying other things.
I have found Python-vlc and want to give it a try. I am able to pip install Python-vlc onto tinycore successfully and import vlc, but when I attempt to create an instance of vlc I am given an error.
My code is:
import vlc as v
# creating vlc media player object
media = v.MediaPlayer("cats.mp4")
# start playing video
media.play()
And the final line of the error is: (I have to type it out by hand so I only put the final line, but If anyone needs the whole error, please say so)
NameError: no function 'libvlc_new'
This same error occurs if I write the line "v.Instance()" (which works fine on my pc)
I assume I don't have all the libraries required for VLC to work properly, though I assumed the pip install would give me everything I need.
If anyone could help me that would be great, thanks
-
Hi Ripley
According to this:
https://stackoverflow.com/questions/41394040/unable-to-run-the-following-code-using-python-bindings-for-vlc
you also need to have VLC Media Player installed.
-
That actually makes a lot of sense, thanks Rich.
I was looking through the fourms and saw that in the past VLC was not available for the raspberry pi on tinycore, and from what I can tell that still remains true.
Is there a way to install vlc (somewhat easily?).
Otherwise I will have to find an alternative, If there isn't a way to get vlc, does anyone have suggestions about what I should use instead? I need to be able to play audio files using python 3.10
-
The problem with vlc is that it uses qt5 for the gui and qt5 is very large.
I believe rhythmbox has a python interface and it uses gtk3 for the gui, which is available for piCore.
-
Okay then I will refrain from using vlc.
The problem with rhythmbox is the python interface is very limited, the specific parts its missing (from what I could find researching) that I need it to do is 'get current song position' and 'set current song position'
And I have created my own GUI, so I can't use rhythmbox's
-
Hi Ripley
Maybe mpg123.tcz or ffmpeg.tcz would be suitable. Google returns results for both with respect to Python.
-
Looking at the latest vlc, it seems it will build without qt5, but I'm not sure I see a python interface?
-
within python you can pip install python's binding for vlc with the following code:
pip install python-vlc
That package has everything I need, but I need to get vlc on my PiCore
How would one go about getting vlc on PiCore without the qt5?
Also thanks Rich for the suggestions, but mpg123 and ffmpeg doesn't have all the python bindng I need for this project
-
(coincidentally) cli version of vlc posted.