I have a Raspberry Pi Zero with a GPIO-attached LCD. I have a Python program that incorporates the vlc library to play a video.
- If I launch the program from a ~/.profile file, the video will play on the GPIO-attached LCD.
- If I launch the program from a systemd service, it appears to write the actual video as blobs to the Journal.
- If I launch the program from an SSH session, it will do the awful ASCII artwork.
Code:
try:player = instance.media_player_new()media = instance.media_new(videoFullPath)console.info('Playing' + videoFullPath)player.set_media(media)player.audio_set_volume(volume)isPaused = Falsebacklight.fadeOn()player.play()sleep(1.5)duration = player.get_length() / 1000sleep(duration)backlight.fadeOff()except Exception as ex:console.error(str(ex))
Statistics: Posted by eat-sleep-code — Mon Feb 26, 2024 4:26 am