agherzan / meta-raspberrypi

Yocto/OE BSP layer for the Raspberry Pi boards
https://www.yoctoproject.org/
MIT License
528 stars 407 forks source link

vlc can not display in yocto image within x11 #1170

Closed gitgonewithwind closed 1 year ago

gitgonewithwind commented 1 year ago

Hi all, sorry to bother you again. I use vlc to play web-camera. it can work well in raspbian image. but can not display in yocto image within x11 and vlc auto fall in commad lines:

see my debug info as below what is PulseAudio server connection failure: Connection refused ? the error is there , how to fix? Thank you so much.

oot@raspberrypi4-64:~# export DISPLAY=:0 root@raspberrypi4-64:~# vlc --x11-display :0
VLC media player 3.0.18 Vetinari (revision 3.0.18-0-ge9eceaed4d) [00000055994a52f0] vlcpulse audio output error: PulseAudio server connection failure: Connection refused [00000055992d1410] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface. [00000055992d3ab0] main playlist: playlist is empty [00000055994cd730] [cli] lua interface: Listening on host "*console". VLC media player 3.0.18 Vetinari Command Line Interface initialized. Type `help' for help.

q Shutting down. [00000055994cd730] [cli] lua interface: Requested shutdown. root@raspberrypi4-64:~# cvlc --x11-display :0
VLC media player 3.0.18 Vetinari (revision 3.0.18-0-ge9eceaed4d) [00000055c7b92400] vlcpulse audio output error: PulseAudio server connection failure: Connection refused [00000055c7b93c10] dummy interface: using the dummy interface module... [00000055c7a1e680] main playlist: playlist is empty

EasyIP2023 commented 1 year ago

@gitgonewithwind I normally only test via the way it's mentioned here. Try to see if passing a video will give you output.

https://meta-raspberrypi.readthedocs.io/en/latest/extra-build-config.html#raspberry-pi-distro-vlc

gitgonewithwind commented 1 year ago

@gitgonewithwind I normally only test via the way it's mentioned here. Try to see if passing a video will give you output.

https://meta-raspberrypi.readthedocs.io/en/latest/extra-build-config.html#raspberry-pi-distro-vlc

thank you very much. let me try

gitgonewithwind commented 1 year ago

Hi I tried you link, but not work. @EasyIP2023

I use command line : v4l2-ctl --list-devices, I can find the camara. bcm2835-codec-decode (platform:bcm2835-codec): /dev/video10 /dev/video11 /dev/video12 /dev/video18 /dev/media3

bcm2835-isp (platform:bcm2835-isp): /dev/video13 /dev/video14 /dev/video15 /dev/video16 /dev/video20 /dev/video21 /dev/video22 /dev/video23 /dev/media0 /dev/media2

Video Capture 5 (usb-0000:01:00.0-1.3): /dev/video0 /dev/video1 /dev/video2 /dev/video3 /dev/media1

but when use the link https://meta-raspberrypi.readthedocs.io/en/latest/extra-build-config.html#raspberry-pi-distro-vlc and tried the command: tvservice -l 0 attached device(s), display ID's are : that means can not find HDMI ? right? so I run all commands as below: DISPLAYNUM=$(tvservice -l | tail -c 2) MMAL_DISPLAY=$(expr $DISPLAYNUM + 1) VLC_SETTINGS="-I dummy --vout=mmal_vout --mmal-resize --mmal-display hdmi-$MMAL_DISPLAY --no-dbus" cvlc $VLC_SETTINGS sample-mp4-file-small.mp4

error output:
LC media player 3.0.18 Vetinari (revision 3.0.18-0-ge9eceaed4d) vlc: unknown option or missing mandatory argument --mmal-resize' Tryvlc --help' for more information.

but I tried:export DISPLAY=:0 (same as in raspbian image) I ran: cvlc sample-mp4-file-small.mp4 It CAN play the sample video. but I need to play streaming video in real time not video files. how can I do ? what cvlc command options?

any help?

Thank you very much.

gitgonewithwind commented 1 year ago

Hi all , I have got the streaming video with command: cvlc -vvv v4l2:///dev/video0

more idea? or I am going to search online to know more.

Thanks

gitgonewithwind commented 1 year ago

solved! close please