cvlc 无法播放 rtsp(omxplayer 可以)

use*_*318 5 vlc omxplayer

得到了这个大华 vto 流链接:可以与 omxplayer 一起使用,但 vlc 无法播放它:

\n
rtsp://user:pass@ipadd:554/cam/realmonitor/channel=1&subtype=1\n
Run Code Online (Sandbox Code Playgroud)\n

这是 vlc 的输出:

\n
VLC media player 3.0.16 Vetinari (revision 3.0.13-8-g41878ff4f2)\n[000055b9be2245b0] main libvlc debug: VLC media player - 3.0.16 Vetinari\n[000055b9be2245b0] main libvlc debug: Copyright \xc2\xa9 1996-2021 the VideoLAN team\n[000055b9be2245b0] main libvlc debug: revision 3.0.13-8-g41878ff4f2\n[000055b9be2245b0] main libvlc debug: configured with ./configure  '--build=x86_64-linux-gnu' '--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/x86_64-linux-gnu' '--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.16-1' '--enable-a52' '--enable-aa' '--enable-aribsub' '--enable-avahi' '--enable-bluray' '--enable-caca' '--enable-chromaprint' '--enable-chromecast' '--enable-dav1d' '--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-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-vdpau' '--enable-vnc' '--enable-vorbis' '--enable-x264' '--enable-x265' '--enable-zvbi' '--with-kde-solid=/usr/share/solid/actions/' '--disable-aom' '--disable-crystalhd' '--disable-d3d11va' '--disable-decklink' '--disable-directx' '--disable-dsm' '--disable-dxva2' '--disable-fdkaac' '--disable-fluidlite' '--disable-freerdp' '--disable-goom' '--disable-gst-decode' '--disable-libtar' '--disable-live555' '--disable-macosx' '--disable-macosx-avfoundation' '--disable-macosx-qtkit' '--disable-mfx' '--disable-microdns' '--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-udev' '--enable-v4l2' '--enable-wayland' '--enable-libva' '--enable-vcd' '--enable-smbclient' '--disable-oss' '--enable-mmx' '--enable-sse' '--disable-neon' '--disable-altivec' '--disable-omxil' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -ffile-prefix-map=/build/vlc-0rjD9V/vlc-3.0.16=. -fstack-protector-strong -Wformat -Werror=format-security ' 'LDFLAGS=-Wl,-z,relro -Wl,-z,now' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -ffile-prefix-map=/build/vlc-0rjD9V/vlc-3.0.16=. -fstack-protector-strong -Wformat -Werror=format-security ' 'OBJCFLAGS=-g -O2 -ffile-prefix-map=/build/vlc-0rjD9V/vlc-3.0.16=. -fstack-protector-strong -Wformat -Werror=format-security'\n[000055b9be2e1700] main audio output debug: looking for audio output module matching "any": 6 candidates\n[000055b9be2e1700] vlcpulse audio output debug: using library version 14.2.0\n[000055b9be2e1700] vlcpulse audio output debug:  (compiled with version 14.2.0, protocol 34)\n[000055b9be2e1700] vlcpulse audio output debug: connected locally to /run/user/1000/pulse/native as client #10650\n[000055b9be2e1700] vlcpulse audio output debug: using protocol 34, server protocol 34\n[000055b9be2e1700] pulse audio output debug: adding sink 1: alsa_output.pci-0000_00_1f.3.analog-stereo (Built-in Audio Analog Stereo)\n[000055b9be2e1700] pulse audio output debug: adding sink 2: ec_ref (Built-in Audio Analog Stereo (echo cancelled with Built-in Audio Analog Stereo))\n[000055b9be2e1700] pulse audio output debug: adding sink 16: alsa_output.pci-0000_01_00.1.hdmi-stereo-extra3 (GM107 High Definition Audio Controller [GeForce 940MX] Digital Stereo (HDMI 4))\n[000055b9be2e1700] main audio output debug: using audio output module "pulse"\n[000055b9be2caff0] main playlist debug: keeping audio output\n[000055b9be310c40] main interface debug: looking for interface module matching "dbus,none": 19 candidates\n[000055b9be310c40] dbus interface debug: listening on dbus as: org.mpris.MediaPlayer2.vlc\n[000055b9be310c40] main interface debug: using interface module "dbus"\n[000055b9be3154c0] main interface debug: looking for interface module matching "hotkeys,none": 19 candidates\n[000055b9be3154c0] main interface debug: using interface module "hotkeys"\n[000055b9be315e90] main interface debug: looking for interface module matching "globalhotkeys,none": 19 candidates\n[000055b9be310c40] dbus interface debug: Getting All properties\n[000055b9be310c40] dbus interface debug: Getting All properties\n[000055b9be315e90] main interface debug: using interface module "xcb_hotkeys"\n[000055b9be3177f0] main interface debug: looking for interface module matching "dummy": 19 candidates\n[000055b9be3177f0] dummy interface: using the dummy interface module...\n[000055b9be3177f0] main interface debug: using interface module "dummy"\n[000055b9be2caff0] main playlist debug: processing request item: null, node: Scaletta, skip: 0\n[000055b9be2caff0] main playlist debug: rebuilding array of current - root Scaletta\n[000055b9be2caff0] main playlist debug: rebuild done - 1 items, index -1\n[000055b9be2caff0] main playlist debug: starting playback of new item\n[000055b9be2caff0] main playlist debug: resyncing on rtsp://10.168.5.138:554/cam/realmonitor/channel=1&subtype=1\n[000055b9be2caff0] main playlist debug: rtsp://10.168.5.138:554/cam/realmonitor/channel=1&subtype=1 is at 0\n[000055b9be2caff0] main playlist debug: creating new input thread\n[00007ff0bc000c80] main input debug: Creating an input for 'rtsp://10.168.5.138:554/cam/realmonitor/channel=1&subtype=1'\n[000055b9be2caff0] main playlist debug: requesting art for new input thread\n[00007ff0bc000c80] main input debug: using timeshift granularity of 50 MiB\n[00007ff0bc000c80] main input debug: using default timeshift path\n[00007ff0bc000c80] main input debug: `rtsp://user:pass@address:554/cam/realmonitor/channel=1&subtype=1' gives access `rtsp' demux `any' path `user:pass@address:554/cam/realmonitor/channel=1&subtype=1'\n[00007ff0b0000fa0] main input source debug: creating demux: access='rtsp' demux='any' location='user:pass@address:554/cam/realmonitor/channel=1&subtype=1' file='(null)'\n[00007ff0b0001160] main demux debug: looking for access_demux module matching "rtsp": 16 candidates\n[00007ff0a8000c20] main meta fetcher debug: looking for meta fetcher module matching "any": 1 candidates\n[000055b9be2caff0] main playlist debug: processing request item: null, node: Scaletta, skip: 0\n[000055b9be2caff0] main playlist debug: rebuilding array of current - root Scaletta\n[000055b9be2caff0] main playlist debug: rebuild done - 1 items, index -1\n[000055b9be2caff0] main playlist debug: starting playback of new item\n[000055b9be2caff0] main playlist debug: resyncing on rtsp://10.168.5.138:554/cam/realmonitor/channel=1&subtype=1\n[000055b9be2caff0] main playlist debug: rtsp://10.168.5.138:554/cam/realmonitor/channel=1&subtype=1 is at 0\n[000055b9be2caff0] main playlist debug: creating new input thread\n[00007ff0bc000c80] main input debug: Creating an input for 'rtsp://10.168.5.138:554/cam/realmonitor/channel=1&subtype=1'\n[000055b9be2caff0] main playlist debug: requesting art for new input thread\n[00007ff0bc000c80] main input debug: using timeshift granularity of 50 MiB\n[00007ff0bc000c80] main input debug: using default timeshift path\n[00007ff0bc000c80] main input debug: `rtsp://user:pass@address:554/cam/realmonitor/channel=1&subtype=1' gives access `rtsp' demux `any' path `user:pass@address:554/cam/realmonitor/channel=1&subtype=1'\n[00007ff0b0000fa0] main input source debug: creating demux: access='rtsp' demux='any' location='user:pass@address:554/cam/realmonitor/channel=1&subtype=1' file='(null)'\n[00007ff0b0001160] main demux debug: looking for access_demux module matching "rtsp": 16 candidates\n[00007ff0a8000c20] main meta fetcher debug: looking for meta fetcher module matching "any": 1 candidates\n[00007ff0a8000c20] lua meta fetcher debug: Trying Lua scripts in /home/tec1/.local/share/vlc/lua/meta/fetcher\n[00007ff0a8000c20] lua meta fetcher debug: Trying Lua scripts in /usr/lib/x86_64-linux-gnu/vlc/lua/meta/fetcher\n[00007ff0a8000c20] lua meta fetcher debug: Trying Lua scripts in /usr/share/vlc/lua/meta/fetcher\n[00007ff0b0001160] main demux debug: no access_demux modules matched\n[00007ff0a8000c20] main meta fetcher debug: no meta fetcher modules matched\n[00007ff0b0001630] main stream debug: creating access: rtsp://user:pass@address:554/cam/realmonitor/channel=1&subtype=1\n[00007ff0a8000c20] main art finder debug: looking for art finder module matching "any": 2 candidates\n[00007ff0b0001630] main stream debug: looking for access module matching "rtsp": 29 candidates\n[00007ff0a8000c20] lua art finder debug: Trying Lua scripts in /home/tec1/.local/share/vlc/lua/meta/art\n[00007ff0a8000c20] lua art finder debug: Trying Lua scripts in /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art\n[00007ff0a8000c20] lua art finder debug: Trying Lua playlist script /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/00_musicbrainz.luac\n[00007ff0b0001630] satip stream debug: try to open 'rtsp://user:pass@address:554/cam/realmonitor/channel=1&subtype=1'\n[00007ff0b0001630] satip stream debug: connect to host '10.168.5.138'\n[00007ff0b0001630] main stream debug: net: connecting to 10.168.5.138 port 554\n[00007ff0a8000c20] lua art finder debug: skipping script (unmatched scope) /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/00_musicbrainz.luac\n[00007ff0a8000c20] lua art finder debug: Trying Lua playlist script /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/01_googleimage.luac\n[00007ff0a8000c20] lua art finder debug: skipping script (unmatched scope) /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/01_googleimage.luac\n[00007ff0a8000c20] lua art finder debug: Trying Lua playlist script /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/02_frenchtv.luac\n[00007ff0a8000c20] lua art finder debug: skipping script (unmatched scope) /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/02_frenchtv.luac\n[00007ff0a8000c20] lua art finder debug: Trying Lua playlist script /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/03_lastfm.luac\n[00007ff0a8000c20] lua art finder debug: skipping script (unmatched scope) /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/03_lastfm.luac\n[00007ff0a8000c20] lua art finder debug: Trying Lua scripts in /usr/share/vlc/lua/meta/art\n[00007ff0a8000c20] main art finder debug: no art finder modules matched\n[00007ff0b0001630] main stream debug: connection succeeded (socket = 11)\n[00007ff0ac000e80] main meta fetcher debug: looking for meta fetcher module matching "any": 1 candidates\n[00007ff0b0001630] main stream debug: net: opening 0.0.0.0 datagram port 9164\n[00007ff0ac000e80] lua meta fetcher debug: Trying Lua scripts in /home/tec1/.local/share/vlc/lua/meta/fetcher\n[00007ff0b0001630] main stream debug: net: opening 0.0.0.0 datagram port 9165\n[00007ff0ac000e80] lua meta fetcher debug: Trying Lua scripts in /usr/lib/x86_64-linux-gnu/vlc/lua/meta/fetcher\n[00007ff0ac000e80] lua meta fetcher debug: Trying Lua scripts in /usr/share/vlc/lua/meta/fetcher\n[00007ff0ac000e80] main meta fetcher debug: no meta fetcher modules matched\n[00007ff0ac000e80] main art finder debug: looking for art finder module matching "any": 2 candidates\n[00007ff0ac000e80] lua art finder debug: Trying Lua scripts in /home/tec1/.local/share/vlc/lua/meta/art\n[00007ff0ac000e80] lua art finder debug: Trying Lua scripts in /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art\n[00007ff0ac000e80] lua art finder debug: Trying Lua playlist script /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/00_musicbrainz.luac\n[00007ff0ac000e80] lua art finder debug: Trying Lua playlist script /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/01_googleimage.luac\n[00007ff0ac000e80] lua art finder debug: Trying Lua playlist script /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/02_frenchtv.luac\n[00007ff0ac000e80] lua art finder debug: Trying Lua playlist script /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/03_lastfm.luac\n[00007ff0ac000e80] lua art finder debug: Trying Lua scripts in /usr/share/vlc/lua/meta/art\n[00007ff0ac000e80] main art finder debug: no art finder modules matched\n[00007ff0b0001630] satip stream error: Failed to setup RTSP session\n[00007ff0b0001630] main stream debug: net: connecting to 10.168.5.138 port 554\n[00007ff0b0001630] main stream debug: connection succeeded (socket = 11)\n[00007ff0b0001630] access_realrtsp stream warning: Cseq mismatch, got 1, assumed 0\n[00007ff0b0001630] access_realrtsp stream debug: rtsp connected\n[00007ff0b0001630] access_realrtsp stream warning: only real/helix rtsp servers supported for now\n[00007ff0b0001630] main stream debug: no access modules matched\n[00007ff0bc000c80] main input error: L'ingresso non pu\xc3\xb2 essere aperto\n[00007ff0bc000c80] main input error: VLC non \xc3\xa8 in grado di aprire il MRL 'rtsp://user:pass@address:554/cam/realmonitor/channel=1&subtype=1'. Controlla il registro per i dettagli.\n[000055b9be2caff0] main playlist debug: dead input\n[000055b9be2caff0] main playlist debug: changing item without a request (current 0/1)\n[000055b9be2caff0] main playlist debug: nothing to play\n
Run Code Online (Sandbox Code Playgroud)\n

主要问题是 omxplayer 已被弃用,但在加载 10 秒后它可以正常播放。\n有人可以让我理解为什么 vlc 根本不播放吗?

\n

小智 1

那么发生的事情是,Debian 中提供 live555 支持的库已于今年 2 月被删除,这影响了所有下游发行版,包括但不限于 RPi OS 和 Ubuntu:

https://askubuntu.com/a/1363113

两个有效版本是 2020.01.19-1 和 2018.11.26-1.1,Live555 此后已将 GPL 许可证标头添加到违规文件中,但 RFC 问题仍然存在。

现在您可能想下载最新的 Live555 源代码并编译它......它不起作用。VLC 引用的函数名称和结构发生了变化,因此 VLC 将不会针对源代码进行编译。你需要获得一个旧版本,我专门使用了这个版本,它是 2020 年的调整快照,之前进行了阻止 VLC 编译的修改:

https://github.com/rgaufman/live555

你想要的配置是./genMakefiles linux-with-shared-libraries,我不知道是否需要,但由于我的系统是x86-64位,我首先将 -m64 添加到编译器选项中

编译和安装后,我继续编译VLC,添加'--enable-live555'并将'--with-live555-tree=extras/live555-master'根Live555文件夹放入VLC extras文件夹后,但是VLC编译失败,事实证明Live555的make install并没有将所有需要的头文件复制到VLC所在的位置在找。它们作为 4 个子文件夹放入 /usr/local/include/ 中,实际的库放入 /usr/local/lib/ 中。添加正确的 CXX/CPP 标志将使它看起来像它们放置的位置,但是我将它们全部放在一个文件夹中并使用了 1 个标志。

我还必须'--disable-mod'解决一个我没有兴趣修复的依赖版本问题,因为我不使用 modplug 或任何 mod 文件。

50分钟后...VLC编译成功!然而,它期望 Live555 的库位于 /usr/lib/ 而不是 /usr/local/lib/ 中,因为编译花了很长时间,我可以将库链接或复制到预期的文件夹中,然后就可以了当链接到新文件时,VLC 可与 RTSP 配合使用。或者,如果您需要加载摄像机源,您可以选择保留原始 VLC 并直接运行新文件。