JuliusCode / MP4MUSEUM

MP4MUSEUM.org Media Player
GNU General Public License v3.0
32 stars 8 forks source link

V5.5 - MP4's play inconsistently #22

Closed andysa2 closed 1 year ago

andysa2 commented 1 year ago

I have downloaded the V5.5 Image and installed with Pi Imager on a V3B, however am having limited success in the playing of short MP4 clips.

90% of any MP4's encounter a black screen, then MP4Museum transitions to the next playable file (usually a still image)

I have made a point of passing my files through Handbrake, ensuring they are encoded to H.264 with a HQ preset. Additionally trying various other settings, with no success.

The same files will also not display with VLC on a standard Raspian installation, Each time VLC throws an error "main decoder error: buffer deadlock prevented"

I then tried the files on the alternative player, 'Mplayer' and they play without issue.

The MP4museum log file show the following:

mmal_component_create_core: could not find component 'vc.ril.video_decode' error xdg_runtime_dir not set in the environment

Upon researching this further there appears to be an known issue with VLC and Raspberry Pi, with the problems existing for the last couple of years.

[https://forums.raspberrypi.com/viewtopic.php?t=272977]

[https://forums.raspberrypi.com/viewtopic.php?f=66&t=272835]

On a Pi with a full raspian installation I have tried reinstalling VLC and several of the suggestions in the forums referenced above, with no success.

Has anybody any suggestions or encountered similar experiences with the buffer "deadlock prevented" error ?

JuliusCode commented 1 year ago

Hello, unfortunatly, there is not much i can do about the problems with vlc. one hint that i have, the xdg_runtime thing happens all the time, so my guess is there is some problem decoding the video file you have. i rely on the vlc package that comes from the raspbian repository, if you find a more current version working, please let me know.

if you can play the files with mplayer, maybe give this a try:

# play media with mplayer
# todo: add sound option like -ao alsa:device=hw=
# also, no gpio, player will get stuck in loop

def mplayer_play(source):
    if("loop." in source):
        mplayer_instance = "mplayer -loop 0 -quiet "
    else:
        mplayer_instance = "mplayer -quiet "

    os.system(mplayer_instance + source)

it's pretty basic running the binary from within python but it might work?

best, Julius.