通过 VLC 实现 Raspberry Pi(Raspbian)桌面的 RTSP 流?

通过 VLC 实现 Raspberry Pi(Raspbian)桌面的 RTSP 流?

有人能够通过 RTSP 传输运行 Raspbian 的 Raspberry Pi 的桌面吗?

我一直在尝试使用以下代码的变体:

cvlc screen:// :screen-fps=30 :sout="#transcode{vcodec=h264,vb=1024,scale=1,acodec=none}:rtp{sdp=rtsp://:8554/desktop}" -I dummy

但是我不断收到错误代码“VLC 无法打开 MRL‘screen://’”。我尝试过更新 Raspbian、卸载/重新安装 VLC 以及上述脚本的上千种变体。任何帮助都将不胜感激。

错误的完整日志如下:

pi@raspberrypi:~ $ cvlc screen:// :screen-fps=30 :sout="#transcode{vcodec=h264,vb=1024,scale=1,acodec=none}:rtp{sdp=rtsp://:8554/desktop}" -I dummy -vvv
VLC media player 3.0.17.4 Vetinari (revision 3.0.13-8-g41878ff4f2)
[017a3b58] main libvlc debug: VLC media player - 3.0.17.4 Vetinari
[017a3b58] main libvlc debug: Copyright © 1996-2022 the VideoLAN team
[017a3b58] main libvlc debug: revision 3.0.13-8-g41878ff4f2
[017a3b58] main libvlc debug: configured with ./configure  '--build=arm-linux-gnueabihf' '--prefix=/usr' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--disable-option-checking' '--disable-silent-rules' '--libdir=${prefix}/lib/arm-linux-gnueabihf' '--runstatedir=/run' '--disable-maintainer-mode' '--disable-dependency-tracking' '--disable-debug' '--config-cache' '--disable-update-check' '--enable-fast-install' '--docdir=/usr/share/doc/vlc' '--with-binary-version=3.0.17.4-0+deb10u2+rpt1' '--enable-a52' '--enable-aa' '--enable-aribsub' '--enable-avahi' '--enable-bluray' '--enable-caca' '--enable-chromaprint' '--enable-chromecast' '--enable-dbus' '--enable-dca' '--enable-dvbpsi' '--enable-dvdnav' '--enable-faad' '--enable-flac' '--enable-fluidsynth' '--enable-freetype' '--enable-fribidi' '--enable-gles2' '--enable-gnutls' '--enable-harfbuzz' '--enable-jack' '--enable-kate' '--enable-libass' '--enable-libmpeg2' '--enable-libxml2' '--enable-lirc' '--enable-live555' '--enable-mad' '--enable-matroska' '--enable-mod' '--enable-mpc' '--enable-mpg123' '--enable-mtp' '--enable-ncurses' '--enable-notify' '--enable-ogg' '--enable-opus' '--enable-pulse' '--enable-qt' '--enable-realrtsp' '--enable-samplerate' '--enable-sdl-image' '--enable-sftp' '--enable-shine' '--enable-shout' '--enable-skins2' '--enable-sndio' '--enable-soxr' '--enable-spatialaudio' '--enable-speex' '--enable-svg' '--enable-svgdec' '--enable-taglib' '--enable-theora' '--enable-twolame' '--enable-upnp' '--enable-vnc' '--enable-vorbis' '--enable-x264' '--enable-x265' '--enable-zvbi' '--with-kde-solid=/usr/share/solid/actions/' '--disable-d3d11va' '--disable-decklink' '--disable-directx' '--disable-dsm' '--disable-dxva2' '--disable-fdkaac' '--disable-fluidlite' '--disable-freerdp' '--disable-goom' '--disable-gst-decode' '--disable-libtar' '--disable-macosx' '--disable-macosx-avfoundation' '--disable-macosx-qtkit' '--disable-microdns' '--disable-mfx' '--disable-opencv' '--disable-projectm' '--disable-schroedinger' '--disable-sparkle' '--disable-srt' '--disable-telx' '--disable-vpx' '--disable-vsxu' '--disable-wasapi' '--enable-alsa' '--enable-dc1394' '--enable-dv1394' '--enable-libplacebo' '--enable-linsys' '--enable-nfs' '--enable-omxil' '--enable-udev' '--enable-v4l2' '--enable-wayland' '--enable-vcd' '--enable-smbclient' '--disable-oss' '--disable-crystalhd' '--disable-mmx' '--disable-sse' '--enable-neon' '--enable-mmal' '--enable-mmal-avcodec' '--disable-vdpau' '--disable-libva' '--enable-dav1d' '--disable-aom' '--disable-altivec' 'build_alias=arm-linux-gnueabihf' 'CFLAGS=-g -O2 -fdebug-prefix-map=/build/vlc-iTPUTR/vlc-3.0.17.4=. -fstack-protector-strong -Wformat -Werror=format-security ' 'LDFLAGS=-Wl,-z,relro -Wl,-z,now -Wl,--as-needed' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -fdebug-prefix-map=/build/vlc-iTPUTR/vlc-3.0.17.4=. -fstack-protector-strong -Wformat -Werror=format-security ' 'OBJCFLAGS=-g -O2 -fdebug-prefix-map=/build/vlc-iTPUTR/vlc-3.0.17.4=. -fstack-protector-strong -Wformat -Werror=format-security'
[017a3b58] main libvlc debug: searching plug-in modules
[017a3b58] main libvlc debug: loading plugins cache file /usr/lib/arm-linux-gnueabihf/vlc/plugins/plugins.dat
[017a3b58] main libvlc debug: recursively browsing `/usr/lib/arm-linux-gnueabihf/vlc/plugins'
[017a3b58] main libvlc debug: plug-ins loaded: 510 modules
[017a3b58] main libvlc debug: opening config file (/home/pi/.config/vlc/vlcrc)
[017a3d78] main logger debug: looking for logger module matching "any": 4 candidates
[017a3d78] main logger debug: using logger module "console"
[017a3b58] main libvlc debug: translation test: code is "C"
[01809620] main keystore debug: looking for keystore module matching "memory": 4 candidates
[01809620] main keystore debug: using keystore module "memory"
[017a3b58] main libvlc debug: CPU has capabilities ARM_NEON FPU 
[01801370] main input debug: Creating an input for 'Media Library'
[01801370] main input debug: Input is a meta file: disabling unneeded options
[01801370] main input debug: using timeshift granularity of 50 MiB
[01801370] main input debug: using default timeshift path
[01801370] main input debug: `file/directory:///home/pi/.local/share/vlc/ml.xspf' gives access `file' demux `directory' path `/home/pi/.local/share/vlc/ml.xspf'
[01804d90] main input source debug: creating demux: access='file' demux='directory' location='/home/pi/.local/share/vlc/ml.xspf' file='/home/pi/.local/share/vlc/ml.xspf'
[01804e78] main demux debug: looking for access_demux module matching "file": 17 candidates
[01804e78] main demux debug: no access_demux modules matched
[01816fd8] main stream debug: creating access: file:///home/pi/.local/share/vlc/ml.xspf
[01816fd8] main stream debug:  (path: /home/pi/.local/share/vlc/ml.xspf)
[01816fd8] main stream debug: looking for access module matching "file": 29 candidates
[01816fd8] main stream debug: using access module "filesystem"
[01817998] main stream debug: looking for stream_filter module matching "prefetch,cache_read": 26 candidates
[01817998] cache_read stream debug: Using stream method for AStream*
[01817998] cache_read stream debug: starting pre-buffering
[01817998] cache_read stream debug: received first data after 0 ms
[01817998] cache_read stream debug: pre-buffering done 296 bytes in 0s - 2651 KiB/s
[01817998] main stream debug: using stream_filter module "cache_read"
[018182a8] main stream debug: looking for stream_filter module matching "any": 26 candidates
[018182a8] playlist stream debug: using XSPF playlist reader
[018182a8] main stream debug: using stream_filter module "playlist"
[018182a8] main stream debug: stream filter added to 0x1817998
[0181a4e8] main stream debug: looking for stream_filter module matching "any": 26 candidates
[0181a4e8] main stream debug: no stream_filter modules matched
[0180b410] main stream_directory debug: looking for stream_directory module matching "any": 1 candidates
[0180b410] main stream_directory debug: no stream_directory modules matched
[01804d90] main input source debug: attachment of directory-extractor failed for file:///home/pi/.local/share/vlc/ml.xspf
[0181a4e8] main stream debug: looking for stream_filter module matching "record": 26 candidates
[0181a4e8] main stream debug: using stream_filter module "record"
[01804d90] main input source debug: creating demux: access='file' demux='directory' location='/home/pi/.local/share/vlc/ml.xspf' file='/home/pi/.local/share/vlc/ml.xspf'
[01804e78] main demux debug: looking for demux module matching "directory": 55 candidates
[01804e78] main demux debug: using demux module "directory"
[01818770] main demux meta debug: looking for meta reader module matching "any": 2 candidates
[01818770] lua demux meta debug: Trying Lua scripts in /home/pi/.local/share/vlc/lua/meta/reader
[01818770] lua demux meta debug: Trying Lua scripts in /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/reader
[01818770] lua demux meta debug: Trying Lua playlist script /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/reader/filename.luac
[01818770] lua demux meta debug: Trying Lua scripts in /usr/share/vlc/lua/meta/reader
[01818770] main demux meta debug: no meta reader modules matched
[01801370] main input debug: `file/directory:///home/pi/.local/share/vlc/ml.xspf' successfully opened
[0180b8c0] main xml reader debug: looking for xml reader module matching "any": 1 candidates
[0180b8c0] main xml reader debug: using xml reader module "xml"
[01801370] main input debug: EOF reached
[01804e78] main demux debug: removing module "directory"
[0181a4e8] main stream debug: removing module "record"
[018182a8] main stream debug: removing module "playlist"
[01817998] main stream debug: removing module "cache_read"
[01816fd8] main stream debug: removing module "filesystem"
[0180f330] main playlist debug: creating audio output
[0181f1d0] main audio output debug: looking for audio output module matching "any": 6 candidates
[0181f1d0] vlcpulse audio output debug: using library version 12.2.0
[0181f1d0] vlcpulse audio output debug:  (compiled with version 12.2.0, protocol 32)
[0181f1d0] vlcpulse audio output debug: connected locally to /run/user/1000/pulse/native as client #27
[0181f1d0] vlcpulse audio output debug: using protocol 32, server protocol 32
[0181f1d0] pulse audio output debug: adding sink 0: alsa_output.platform-bcm2835_audio.digital-stereo (Built-in Audio Digital Stereo)
[0181f1d0] pulse audio output debug: adding sink 1: alsa_output.platform-bcm2835_audio.analog-stereo (Built-in Audio Analog Stereo)
[0181f1d0] main audio output debug: using audio output module "pulse"
[0180f330] main playlist debug: keeping audio output
[01818770] main interface debug: looking for interface module matching "dbus,none": 19 candidates
[01818770] dbus interface debug: listening on dbus as: org.mpris.MediaPlayer2.vlc.instance2236
[01818770] main interface debug: using interface module "dbus"
[0182b9c0] main interface debug: looking for interface module matching "hotkeys,none": 19 candidates
[0182b9c0] main interface debug: using interface module "hotkeys"
[0182c098] main interface debug: looking for interface module matching "globalhotkeys,none": 19 candidates
[0182c098] main interface debug: no interface modules matched
[0182c098] main interface error: no suitable interface module
[017a3b58] main libvlc error: interface "globalhotkeys,none" initialization failed
[0182c098] main interface debug: looking for interface module matching "dummy": 19 candidates
[0182c098] dummy interface: using the dummy interface module...
[0182c098] main interface debug: using interface module "dummy"
[0180f330] main playlist debug: processing request item: null, node: Playlist, skip: 0
[0180f330] main playlist debug: rebuilding array of current - root Playlist
[0180f330] main playlist debug: rebuild done - 1 items, index -1
[0180f330] main playlist debug: starting playback of new item
[0180f330] main playlist debug: resyncing on screen://
[0180f330] main playlist debug: screen:// is at 0
[0180f330] main playlist debug: creating new input thread
[73500668] main input debug: Creating an input for 'screen://'
[0180f330] main playlist debug: requesting art for new input thread
[736008a8] main stream output debug: using sout chain=`transcode{vcodec=h264,vb=1024,scale=1,acodec=none}:rtp{sdp=rtsp://:8554/desktop}'
[736008a8] main stream output debug: stream=`rtp'
[73600c18] main stream out debug: looking for sout stream module matching "rtp": 23 candidates
[62500638] main meta fetcher debug: looking for meta fetcher module matching "any": 1 candidates
[62500638] lua meta fetcher debug: Trying Lua scripts in /home/pi/.local/share/vlc/lua/meta/fetcher
[62500638] lua meta fetcher debug: Trying Lua scripts in /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/fetcher
[62500638] lua meta fetcher debug: Trying Lua scripts in /usr/share/vlc/lua/meta/fetcher
[62500638] main meta fetcher debug: no meta fetcher modules matched
[62500638] main art finder debug: looking for art finder module matching "any": 2 candidates
[73600c18] main stream out debug: set config option: sout-rtp-sdp to rtsp://:8554/desktop
[73600c18] stream_out_rtp stream out debug: RTSP stream at /desktop
[62500638] lua art finder debug: Trying Lua scripts in /home/pi/.local/share/vlc/lua/meta/art
[73600c18] main stream out debug: net: listening to * port 8554
[62500638] lua art finder debug: Trying Lua scripts in /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/art
[62500638] lua art finder debug: Trying Lua playlist script /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/art/00_musicbrainz.luac
[73600c18] main stream out debug: using sout stream module "stream_out_rtp"
[736008a8] main stream output debug: stream=`transcode'
[73602c90] main stream out debug: looking for sout stream module matching "transcode": 23 candidates
[62500638] lua art finder debug: skipping script (unmatched scope) /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/art/00_musicbrainz.luac
[62500638] lua art finder debug: Trying Lua playlist script /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/art/01_googleimage.luac
[62500638] lua art finder debug: skipping script (unmatched scope) /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/art/01_googleimage.luac
[73602c90] main stream out debug: set config option: sout-transcode-vcodec to h264
[73602c90] main stream out debug: set config option: sout-transcode-vb to 1024
[62500638] lua art finder debug: Trying Lua playlist script /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/art/02_frenchtv.luac
[73602c90] main stream out debug: set config option: sout-transcode-scale to 1
[73602c90] main stream out debug: set config option: sout-transcode-acodec to none
[73602c90] stream_out_transcode stream out debug: Checking codec mapping for none got none 
[73602c90] stream_out_transcode stream out debug: codec audio=none 0Hz 0 channels 96Kb/s
[73602c90] stream_out_transcode stream out debug: Checking video codec mapping for h264 got h264 
[73602c90] stream_out_transcode stream out debug: codec video=h264 0x0 scaling: 1.000000 1024kb/s
[73602c90] main stream out debug: using sout stream module "stream_out_transcode"
[73500668] main input debug: using timeshift granularity of 50 MiB
[73500668] main input debug: using default timeshift path
[73500668] main input debug: `screen://' gives access `screen' demux `any' path `'
[73604458] main input source debug: creating demux: access='screen' demux='any' location='' file='(null)'
[73604540] main demux debug: looking for access_demux module matching "screen": 17 candidates
[73604540] main demux debug: no access_demux modules matched
[73604810] main stream debug: creating access: screen://
[73604810] main stream debug: looking for access module matching "screen": 29 candidates
[62500638] lua art finder debug: skipping script (unmatched scope) /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/art/02_frenchtv.luac
[73604810] main stream debug: no access modules matched
[73500668] main input error: Your input can't be opened
[73500668] main input error: VLC is unable to open the MRL 'screen://'. Check the log for details.
[62500638] lua art finder debug: Trying Lua playlist script /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/art/03_lastfm.luac
[0180f330] main playlist debug: dead input
[736008a8] main stream output debug: destroying useless sout
[73602c90] main stream out debug: destroying chain... (name=transcode)
[73602c90] main stream out debug: removing module "stream_out_transcode"
[73602c90] main stream out debug: destroying chain done
[73600c18] main stream out debug: destroying chain... (name=rtp)
[73600c18] main stream out debug: removing module "stream_out_rtp"
[73602140] main http host debug: HTTP host removed
[73600c18] main stream out debug: destroying chain done
[62500638] lua art finder debug: skipping script (unmatched scope) /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/art/03_lastfm.luac
[62500638] lua art finder debug: Trying Lua scripts in /usr/share/vlc/lua/meta/art
[62500638] main art finder debug: no art finder modules matched
[0180f330] main playlist debug: changing item without a request (current 0/1)
[0180f330] main playlist debug: nothing to play

相关内容