vicwomg / pikaraoke

Youtube-based Karaoke machine for Raspberry Pi, OSX, Windows, and Linux
511 stars 135 forks source link

VLC Error playing MP4 in Bullseye upgraded pikaroke image 1.1.0 -> 1.1.1 #191

Closed Romeo1984 closed 1 month ago

Romeo1984 commented 2 years ago

I tried multiple ways to get pikaraoke to run on Bullseye. I have 16,000 CDG files, so I need VLC working. They all result in a failure to play a video through VLC. The symptom is the video will queue, then skip. This last attempt, I started with the pikaraoke 1.1.0 image, upgraded to Bullsey, then upgraded pikaraoke to 1.1.1. Here is the latest error I get if I run in a tty session using "sudo python3 app.py". It looks like it is trying to play to the TTY session. I lost control of the TTY session, so I had to shut down pikaraoke from the UI.

[2022-02-07 08:39:09] INFO: 'Mark2' is adding song to queue: /usr/lib/pikaraoke/songs/Synchronicity II - The Police _ Karaoke Version _ KaraFun---L1irsqg8cZg.mp4
[2022-02-07 08:39:14] INFO: Playing video in VLC: Synchronicity II - The Police _ Karaoke Version _ KaraFun
[0174a230] vlcpulse audio output error: PulseAudio server connection failure: Connection refused
[01779030] dbus interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[01779030] main interface error: no suitable interface module
[016ccb98] main libvlc error: interface "dbus,none" initialization failed
[01779030] [http] lua interface: Lua HTTP interface
[0172d080] main interface error: no suitable interface module
[016ccb98] main libvlc error: interface "globalhotkeys,none" initialization failed
[016ccb98] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
error: XDG_RUNTIME_DIR not set in the environment.
[0172d080] skins2 interface error: cannot initialize OSFactory
[0172d080] [cli] lua interface: Listening on host "*console".
VLC media player 3.0.16 Vetinari
Command Line Interface initialized. Type `help' for help.
> error: XDG_RUNTIME_DIR not set in the environment.
error: XDG_RUNTIME_DIR not set in the environment.
[abc8b6c0] gl vout display error: parent window not available
[abc8b6c0] gles2 vout display error: parent window not available
[abc8b6c0] xcb vout display error: window not available
[abc8b6c0] xcb vout display error: window not available
)0[?7h[?25l[?1c[?1000h[swscaler @ 0xabcc1df0] No accelerated colorspace conversion found from yuv420p to bgra.
[2022-02-07 08:40:07] INFO: Clearing queue!
[2022-02-07 08:40:07] WARNING: Tried to skip, but no file is playing!
[07/Feb/2022:08:40:07] ENGINE Bus STOPPING
[2022-02-07 08:40:07] INFO: [07/Feb/2022:08:40:07] ENGINE Bus STOPPING
[07/Feb/2022:08:40:07] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('0.0.0.0', 5000)) shut down
[2022-02-07 08:40:07] INFO: [07/Feb/2022:08:40:07] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('0.0.0.0', 5000)) shut down
[07/Feb/2022:08:40:07] ENGINE Stopped thread '_TimeoutMonitor'.
[2022-02-07 08:40:07] INFO: [07/Feb/2022:08:40:07] ENGINE Stopped thread '_TimeoutMonitor'.
[07/Feb/2022:08:40:07] ENGINE Bus STOPPED
[2022-02-07 08:40:07] INFO: [07/Feb/2022:08:40:07] ENGINE Bus STOPPED
[07/Feb/2022:08:40:07] ENGINE Bus STOPPING
[2022-02-07 08:40:07] INFO: [07/Feb/2022:08:40:07] ENGINE Bus STOPPING
[07/Feb/2022:08:40:07] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('0.0.0.0', 5000)) already shut down
[2022-02-07 08:40:07] INFO: [07/Feb/2022:08:40:07] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('0.0.0.0', 5000)) already shut down
[07/Feb/2022:08:40:07] ENGINE No thread running for None.
[2022-02-07 08:40:07] INFO: [07/Feb/2022:08:40:07] ENGINE No thread running for None.
[07/Feb/2022:08:40:07] ENGINE Bus STOPPED
[2022-02-07 08:40:07] INFO: [07/Feb/2022:08:40:07] ENGINE Bus STOPPED
[07/Feb/2022:08:40:07] ENGINE Bus EXITING
[2022-02-07 08:40:07] INFO: [07/Feb/2022:08:40:07] ENGINE Bus EXITING
[07/Feb/2022:08:40:07] ENGINE Bus EXITED
[2022-02-07 08:40:07] INFO: [07/Feb/2022:08:40:07] ENGINE Bus EXITED
vicwomg commented 2 years ago

Did the dtoverlay fix described here work?

https://github.com/vicwomg/pikaraoke/issues/161

Romeo1984 commented 2 years ago

No. I tried both. I also tried adding “-pi4”. It’s like VLC is not finding any monitor to output to. I spent all night combing the net. A few people reported the same issue. I did get it to play with sound only, but VLC spews continuous error that vout can’t find a monitor. Also verified output is HDMI0.

-Mark Sent from my iPhone

On Feb 8, 2022, at 1:38 AM, Vicwomg @.***> wrote:

 Did the dtoverlay fix described here work?

161

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.

Romeo1984 commented 2 years ago

Update testing: Using the following VLC command: pi@raspberrypi:~ $ sudo /usr/bin/vlc -f --play-and-exit --extraintf http --http-port 5002 --http-password ETJn1H7yBg0rZiNr32u20SRmFhqpcz5z --no-embedded-video --no-keyboard-events --no-mouse-events --mouse-hide-timeout 0 --video-on-top --no-video-title --mouse-hide-timeout 0 /root/pikaraoke-songs/'Synchronicity II - The Police _ Karaoke Version _ KaraFun---L1irsqg8cZg.mp4' -vvv

  1. Directly on the Pi4 KVM it does spew errors, but does play to the monitor after trying several candidates.
  2. Via SSH, VLC spews continual errors, but does play only sound. No change to the monitor output.
  3. When selecting the same song through the UI, I get the same output as #2 above - sound, but the pikaraoke splash screen and QR code is still visible. The UI Home page shows the song executing in the player for the full extent.
Romeo1984 commented 2 years ago

Log from /var/log/pikaroke.log:

pi@raspberrypi:~ $ more /var/log/pikaraoke.log
[2022-02-08 20:49:40] INFO: Fetching available songs in: /root/pikaraoke-songs/
[2022-02-08 20:49:41] INFO: VLC command base: /usr/bin/vlc -f --play-and-exit --extraintf http --http-port 5002 --http-password fyxuRCKLNnl7ynil
qPE2RogeQAE5rPpM --no-embedded-video --no-keyboard-events --no-mouse-events --mouse-hide-timeout 0 --video-on-top --no-video-title --mouse-hide-
timeout 0
[08/Feb/2022:20:49:43] ENGINE Bus STARTING
[2022-02-08 20:49:43] INFO: [08/Feb/2022:20:49:43] ENGINE Bus STARTING
[08/Feb/2022:20:49:43] ENGINE Started monitor thread '_TimeoutMonitor'.
[2022-02-08 20:49:43] INFO: [08/Feb/2022:20:49:43] ENGINE Started monitor thread '_TimeoutMonitor'.
[08/Feb/2022:20:49:43] ENGINE Serving on http://0.0.0.0:5000
[2022-02-08 20:49:43] INFO: [08/Feb/2022:20:49:43] ENGINE Serving on http://0.0.0.0:5000
[08/Feb/2022:20:49:43] ENGINE Bus STARTED
[2022-02-08 20:49:43] INFO: [08/Feb/2022:20:49:43] ENGINE Bus STARTED
[2022-02-08 20:49:43] INFO: Starting PiKaraoke!
[2022-02-08 20:50:51] INFO: 'Mark' is adding song to queue: /root/pikaraoke-songs/Synchronicity II - The Police _ Karaoke Version _ KaraFun---L1
irsqg8cZg.mp4
[2022-02-08 20:50:56] INFO: Playing video in VLC: Synchronicity II - The Police _ Karaoke Version _ KaraFun
[00000055747ffa60] vlcpulse audio output error: PulseAudio server connection failure: Connection refused
[000000557484a810] dbus interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY fo
r X11
[000000557484a810] main interface error: no suitable interface module
[00000055747365c0] main libvlc error: interface "dbus,none" initialization failed
[000000557484a810] [http] lua interface: Lua HTTP interface
[0000005574809080] main interface error: no suitable interface module
[00000055747365c0] main libvlc error: interface "globalhotkeys,none" initialization failed
[00000055747365c0] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[0000005574809080] [cli] lua interface: Listening on host "*console".
VLC media player 3.0.16 Vetinari
Command Line Interface initialized. Type `help' for help.
> [0000007f74046ab0] main video output error: video output creation failed
[0000007f94cc94b0] main decoder error: failed to create video output
[0000007f74046ab0] main video output error: video output creation failed
[0000007f94cc94b0] main decoder error: failed to create video output
[0000007f740a8380] main video output error: video output creation failed
[0000007f94cc94b0] main decoder error: failed to create video output
[h264 @ 0x7f94cddc90] get_buffer() failed
[h264 @ 0x7f94cddc90] thread_get_buffer() failed
[h264 @ 0x7f94cddc90] decode_slice_header error
[h264 @ 0x7f94cddc90] no frame!
[0000007f70000d40] main video output error: video output creation failed
[0000007f94cc94b0] main decoder error: failed to create video output
[h264 @ 0x7f94cf94f0] get_buffer() failed
[h264 @ 0x7f94cf94f0] thread_get_buffer() failed
[h264 @ 0x7f94cf94f0] decode_slice_header error
[h264 @ 0x7f94cf94f0] no frame!
[0000007f64046fa0] main video output error: video output creation failed
[0000007f94cc94b0] main decoder error: failed to create video output
[h264 @ 0x7f94d40fa0] get_buffer() failed
[h264 @ 0x7f94d40fa0] thread_get_buffer() failed
[h264 @ 0x7f94d40fa0] decode_slice_header error
[h264 @ 0x7f94d40fa0] no frame!
[0000007f680464f0] main video output error: video output creation failed
[0000007f94cc94b0] main decoder error: failed to create video output
[h264 @ 0x7f94d5ca60] get_buffer() failed
[h264 @ 0x7f94d5ca60] thread_get_buffer() failed
[h264 @ 0x7f94d5ca60] decode_slice_header error
[h264 @ 0x7f94d5ca60] no frame!
[0000007f5c047860] main video output error: video output creation failed
[0000007f94cc94b0] main decoder error: failed to create video output
[h264 @ 0x7f94d78600] get_buffer() failed
[h264 @ 0x7f94d78600] thread_get_buffer() failed
[h264 @ 0x7f94d78600] decode_slice_header error
[h264 @ 0x7f94d78600] no frame!
[0000007f740a8380] main video output error: video output creation failed
[0000007f94cc94b0] main decoder error: failed to create video output
[h264 @ 0x7f94cddc90] get_buffer() failed
[h264 @ 0x7f94cddc90] thread_get_buffer() failed
[h264 @ 0x7f94cddc90] decode_slice_header error
[h264 @ 0x7f94cddc90] no frame!
[0000007f70061330] main video output error: video output creation failed
[0000007f94cc94b0] main decoder error: failed to create video output
[h264 @ 0x7f94cf94f0] get_buffer() failed
[h264 @ 0x7f94cf94f0] thread_get_buffer() failed
[h264 @ 0x7f94cf94f0] decode_slice_header error
[h264 @ 0x7f94cf94f0] no frame!

REPEATS OVER AND OVER
Romeo1984 commented 2 years ago

Output from /boot/config.txt:


pi@raspberrypi:~ $ cat /boot/config.txt
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
hdmi_group=1
hdmi_mode=16

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# Automatically load overlays for detected cameras
#camera_auto_detect=1

# Automatically load overlays for detected DSI displays
display_auto_detect=1

# Enable DRM VC4 V3D driver
#dtoverlay=vc4-kms-v3d
#max_framebuffers=2

# Run in 64-bit mode
arm_64bit=1

# Disable compensation for displays with overscan
disable_overscan=1

[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1

[pi4]
# Run as fast as firmware / board allows
arm_boost=1
max_framebuffers=2

[all]
gpu_mem=160
dtoverlay=vc4-fkms-v3d               #Also tried vc4-kms-v3d, vc4-fkms-v3d-pi4, and vc4-kms-v3d-pi4
cma=128
troy-lim commented 2 years ago

I think we're having the same issue.

188

I can also see XDG_RUNTIME_DIR error in your log. subscribing to this. :)

vicwomg commented 2 years ago

Are you on a pi4? This guide apparently gets everything working in Bullseye pi4 (not sure if you're on a pi4). https://github.com/vicwomg/pikaraoke/discussions/196

I believe I tried all of this on a pi3 and also could not get video to play. For pi3 I don't think i can recommend Bullseye at all at this point, and to just go with the packaged Buster image in the releases page.

Romeo1984 commented 2 years ago

Yes - Pi 4. I have reverted to Buster to have a stable build.

Romeo1984 commented 1 month ago

Bug is no longer relevant with the current build (2024).