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:
From my log file:
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
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()
- 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
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