Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4964

Troubleshooting • Pi Zero 2W, XDG_RUNTIME_DIR error using vlc

$
0
0
I am using a Pi Zero 2W running Raspberry Pi OS Lite-32 BIT (Bullseye)

I am attempting to play an h264 video using vlc (python-vlc).

The following is the relevant code:

Code:

        video_file = '/var/tmp/video.h264'        instance = vlc.Instance("--verbose=0","--no-xlib","--vout=mmal_vout","--aout=adummy")        media_player = instance.media_player_new()        media = instance.media_new(video_file)        media_player.set_media(media)        media_player.play()        time.sleep( 0.3 )        media_player.pause()        time.sleep( 0.3 )        media_player.play()        time.sleep(TriggerOnTime.seconds + (TriggerOnTime.microseconds / 1000000) + 2)        media_player.stop()
From my log file:
  • Video loaded ...
    Play
    Pause
    error: XDG_RUNTIME_DIR not set in the environment.
    error: XDG_RUNTIME_DIR not set in the environment.
    [5ed7d768] avcodec decoder: Using DRM Video Accel for hardware decoding
    Play
    Stop
    End of Video
The video will play, most of the time. The example log file listing is an example of when it plays successfully.

However, if the errors occur after the second "Play", the video either does not play or plays only a short clip.

How do I get rid of these errors?

Thank you

Statistics: Posted by lmitcham — Mon Feb 26, 2024 2:17 pm — Replies 0 — Views 24



Viewing all articles
Browse latest Browse all 4964

Trending Articles