vlcomxplayer

cvlc cannot play rtsp (omxplayer instead can)


Got this Dahua vto stream link: that works with omxplayer, but vlc won't play it:

rtsp://user:pass@ipadd:554/cam/realmonitor/channel=1&subtype=1

This is the output of vlc:

VLC media player 3.0.16 Vetinari (revision 3.0.13-8-g41878ff4f2)
[000055b9be2245b0] main libvlc debug: VLC media player - 3.0.16 Vetinari
[000055b9be2245b0] main libvlc debug: Copyright © 1996-2021 the VideoLAN team
[000055b9be2245b0] main libvlc debug: revision 3.0.13-8-g41878ff4f2
[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'
[000055b9be2e1700] main audio output debug: looking for audio output module matching "any": 6 candidates
[000055b9be2e1700] vlcpulse audio output debug: using library version 14.2.0
[000055b9be2e1700] vlcpulse audio output debug:  (compiled with version 14.2.0, protocol 34)
[000055b9be2e1700] vlcpulse audio output debug: connected locally to /run/user/1000/pulse/native as client #10650
[000055b9be2e1700] vlcpulse audio output debug: using protocol 34, server protocol 34
[000055b9be2e1700] pulse audio output debug: adding sink 1: alsa_output.pci-0000_00_1f.3.analog-stereo (Built-in Audio Analog Stereo)
[000055b9be2e1700] pulse audio output debug: adding sink 2: ec_ref (Built-in Audio Analog Stereo (echo cancelled with Built-in Audio Analog Stereo))
[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))
[000055b9be2e1700] main audio output debug: using audio output module "pulse"
[000055b9be2caff0] main playlist debug: keeping audio output
[000055b9be310c40] main interface debug: looking for interface module matching "dbus,none": 19 candidates
[000055b9be310c40] dbus interface debug: listening on dbus as: org.mpris.MediaPlayer2.vlc
[000055b9be310c40] main interface debug: using interface module "dbus"
[000055b9be3154c0] main interface debug: looking for interface module matching "hotkeys,none": 19 candidates
[000055b9be3154c0] main interface debug: using interface module "hotkeys"
[000055b9be315e90] main interface debug: looking for interface module matching "globalhotkeys,none": 19 candidates
[000055b9be310c40] dbus interface debug: Getting All properties
[000055b9be310c40] dbus interface debug: Getting All properties
[000055b9be315e90] main interface debug: using interface module "xcb_hotkeys"
[000055b9be3177f0] main interface debug: looking for interface module matching "dummy": 19 candidates
[000055b9be3177f0] dummy interface: using the dummy interface module...
[000055b9be3177f0] main interface debug: using interface module "dummy"
[000055b9be2caff0] main playlist debug: processing request item: null, node: Scaletta, skip: 0
[000055b9be2caff0] main playlist debug: rebuilding array of current - root Scaletta
[000055b9be2caff0] main playlist debug: rebuild done - 1 items, index -1
[000055b9be2caff0] main playlist debug: starting playback of new item
[000055b9be2caff0] main playlist debug: resyncing on rtsp://10.168.5.138:554/cam/realmonitor/channel=1&subtype=1
[000055b9be2caff0] main playlist debug: rtsp://10.168.5.138:554/cam/realmonitor/channel=1&subtype=1 is at 0
[000055b9be2caff0] main playlist debug: creating new input thread
[00007ff0bc000c80] main input debug: Creating an input for 'rtsp://10.168.5.138:554/cam/realmonitor/channel=1&subtype=1'
[000055b9be2caff0] main playlist debug: requesting art for new input thread
[00007ff0bc000c80] main input debug: using timeshift granularity of 50 MiB
[00007ff0bc000c80] main input debug: using default timeshift path
[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'
[00007ff0b0000fa0] main input source debug: creating demux: access='rtsp' demux='any' location='user:pass@address:554/cam/realmonitor/channel=1&subtype=1' file='(null)'
[00007ff0b0001160] main demux debug: looking for access_demux module matching "rtsp": 16 candidates
[00007ff0a8000c20] main meta fetcher debug: looking for meta fetcher module matching "any": 1 candidates
[000055b9be2caff0] main playlist debug: processing request item: null, node: Scaletta, skip: 0
[000055b9be2caff0] main playlist debug: rebuilding array of current - root Scaletta
[000055b9be2caff0] main playlist debug: rebuild done - 1 items, index -1
[000055b9be2caff0] main playlist debug: starting playback of new item
[000055b9be2caff0] main playlist debug: resyncing on rtsp://10.168.5.138:554/cam/realmonitor/channel=1&subtype=1
[000055b9be2caff0] main playlist debug: rtsp://10.168.5.138:554/cam/realmonitor/channel=1&subtype=1 is at 0
[000055b9be2caff0] main playlist debug: creating new input thread
[00007ff0bc000c80] main input debug: Creating an input for 'rtsp://10.168.5.138:554/cam/realmonitor/channel=1&subtype=1'
[000055b9be2caff0] main playlist debug: requesting art for new input thread
[00007ff0bc000c80] main input debug: using timeshift granularity of 50 MiB
[00007ff0bc000c80] main input debug: using default timeshift path
[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'
[00007ff0b0000fa0] main input source debug: creating demux: access='rtsp' demux='any' location='user:pass@address:554/cam/realmonitor/channel=1&subtype=1' file='(null)'
[00007ff0b0001160] main demux debug: looking for access_demux module matching "rtsp": 16 candidates
[00007ff0a8000c20] main meta fetcher debug: looking for meta fetcher module matching "any": 1 candidates
[00007ff0a8000c20] lua meta fetcher debug: Trying Lua scripts in /home/tec1/.local/share/vlc/lua/meta/fetcher
[00007ff0a8000c20] lua meta fetcher debug: Trying Lua scripts in /usr/lib/x86_64-linux-gnu/vlc/lua/meta/fetcher
[00007ff0a8000c20] lua meta fetcher debug: Trying Lua scripts in /usr/share/vlc/lua/meta/fetcher
[00007ff0b0001160] main demux debug: no access_demux modules matched
[00007ff0a8000c20] main meta fetcher debug: no meta fetcher modules matched
[00007ff0b0001630] main stream debug: creating access: rtsp://user:pass@address:554/cam/realmonitor/channel=1&subtype=1
[00007ff0a8000c20] main art finder debug: looking for art finder module matching "any": 2 candidates
[00007ff0b0001630] main stream debug: looking for access module matching "rtsp": 29 candidates
[00007ff0a8000c20] lua art finder debug: Trying Lua scripts in /home/tec1/.local/share/vlc/lua/meta/art
[00007ff0a8000c20] lua art finder debug: Trying Lua scripts in /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art
[00007ff0a8000c20] lua art finder debug: Trying Lua playlist script /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/00_musicbrainz.luac
[00007ff0b0001630] satip stream debug: try to open 'rtsp://user:pass@address:554/cam/realmonitor/channel=1&subtype=1'
[00007ff0b0001630] satip stream debug: connect to host '10.168.5.138'
[00007ff0b0001630] main stream debug: net: connecting to 10.168.5.138 port 554
[00007ff0a8000c20] lua art finder debug: skipping script (unmatched scope) /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/00_musicbrainz.luac
[00007ff0a8000c20] lua art finder debug: Trying Lua playlist script /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/01_googleimage.luac
[00007ff0a8000c20] lua art finder debug: skipping script (unmatched scope) /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/01_googleimage.luac
[00007ff0a8000c20] lua art finder debug: Trying Lua playlist script /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/02_frenchtv.luac
[00007ff0a8000c20] lua art finder debug: skipping script (unmatched scope) /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/02_frenchtv.luac
[00007ff0a8000c20] lua art finder debug: Trying Lua playlist script /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/03_lastfm.luac
[00007ff0a8000c20] lua art finder debug: skipping script (unmatched scope) /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/03_lastfm.luac
[00007ff0a8000c20] lua art finder debug: Trying Lua scripts in /usr/share/vlc/lua/meta/art
[00007ff0a8000c20] main art finder debug: no art finder modules matched
[00007ff0b0001630] main stream debug: connection succeeded (socket = 11)
[00007ff0ac000e80] main meta fetcher debug: looking for meta fetcher module matching "any": 1 candidates
[00007ff0b0001630] main stream debug: net: opening 0.0.0.0 datagram port 9164
[00007ff0ac000e80] lua meta fetcher debug: Trying Lua scripts in /home/tec1/.local/share/vlc/lua/meta/fetcher
[00007ff0b0001630] main stream debug: net: opening 0.0.0.0 datagram port 9165
[00007ff0ac000e80] lua meta fetcher debug: Trying Lua scripts in /usr/lib/x86_64-linux-gnu/vlc/lua/meta/fetcher
[00007ff0ac000e80] lua meta fetcher debug: Trying Lua scripts in /usr/share/vlc/lua/meta/fetcher
[00007ff0ac000e80] main meta fetcher debug: no meta fetcher modules matched
[00007ff0ac000e80] main art finder debug: looking for art finder module matching "any": 2 candidates
[00007ff0ac000e80] lua art finder debug: Trying Lua scripts in /home/tec1/.local/share/vlc/lua/meta/art
[00007ff0ac000e80] lua art finder debug: Trying Lua scripts in /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art
[00007ff0ac000e80] lua art finder debug: Trying Lua playlist script /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/00_musicbrainz.luac
[00007ff0ac000e80] lua art finder debug: Trying Lua playlist script /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/01_googleimage.luac
[00007ff0ac000e80] lua art finder debug: Trying Lua playlist script /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/02_frenchtv.luac
[00007ff0ac000e80] lua art finder debug: Trying Lua playlist script /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/03_lastfm.luac
[00007ff0ac000e80] lua art finder debug: Trying Lua scripts in /usr/share/vlc/lua/meta/art
[00007ff0ac000e80] main art finder debug: no art finder modules matched
[00007ff0b0001630] satip stream error: Failed to setup RTSP session
[00007ff0b0001630] main stream debug: net: connecting to 10.168.5.138 port 554
[00007ff0b0001630] main stream debug: connection succeeded (socket = 11)
[00007ff0b0001630] access_realrtsp stream warning: Cseq mismatch, got 1, assumed 0
[00007ff0b0001630] access_realrtsp stream debug: rtsp connected
[00007ff0b0001630] access_realrtsp stream warning: only real/helix rtsp servers supported for now
[00007ff0b0001630] main stream debug: no access modules matched
[00007ff0bc000c80] main input error: L'ingresso non può essere aperto
[00007ff0bc000c80] main input error: VLC non è in grado di aprire il MRL 'rtsp://user:pass@address:554/cam/realmonitor/channel=1&subtype=1'. Controlla il registro per i dettagli.
[000055b9be2caff0] main playlist debug: dead input
[000055b9be2caff0] main playlist debug: changing item without a request (current 0/1)
[000055b9be2caff0] main playlist debug: nothing to play

Main problem is omxplayer is deprecated but it play it fine, after 10 seconds of loading. Can someone let me understand why vlc doesn't at all?


Solution

  • So what happened is that the library in Debian providing support for live555 was removed in February of this year, this affects all downstream distros including but not limited to RPi OS and Ubuntu:

    https://askubuntu.com/a/1363113

    The 2 active versions were 2020.01.19-1 and 2018.11.26-1.1, Live555 has since added GPL license headers to the offending files, however the RFC issue remains.

    Now you may be tempted to just download the latest Live555 source code and compile it... it does not work. There have been changes to function names and structures referenced by VLC, and as such VLC will not compile against the source. You need to get an older version, I specifically used this one, which is a tweaked snapshot from 2020 prior to the modifications that prevent VLC compilation:

    https://github.com/rgaufman/live555

    The configuration you want is ./genMakefiles linux-with-shared-libraries, I do not know if it is required but since my system is x86-64-bit I added -m64 to the compiler options first

    After compilation and install, I went on to compile VLC, adding '--enable-live555' and '--with-live555-tree=extras/live555-master' after placing the root Live555 folder in the VLC extras folder, however VLC failed to compile, it turns out the Live555's make install does not copy all the header files needed to where VLC is looking. They were dropped as 4 subfolders into /usr/local/include/, and the actual libs into /usr/local/lib/. Adding the correct CXX/CPP flags will make it look where they were put, however I put them all in a single folder and used 1 flag.

    I also had to '--disable-mod' to work around a dependency version issue that I had no interest in fixing, since I do not use modplug or any mod files.

    50 minutes later... VLC successfully compiled! However it was expecting the libraries for Live555 to be in /usr/lib/ not /usr/local/lib/, since it took so long to compile I was just fine with linking or copying the libraries into the expected folder, and after that VLC works with RTSP when linked to the new file. Or you can choose to maintain the original VLC and run the new file directly if you need to load the camera feeds.