Closed hongyi-zhao closed 3 years ago
Do you get this issue when enabling SSL on this repo too (not the fork)?
This repository has the following issues, which must be fixed first to enable SSL:
And the commits I made on top of your repo including all the above operations. And furthermore, I also tried directly with your repo by adding the above two revisions, but still encounter the same problem reported here.
Hey @hongyi-zhao,
On your docker command: docker run -it -p 1935:1935 -p 8000:80 --rm nginx-rtmp
, can you mount the certs/
volume? Also, make sure to bind port 443 so you can access https
properly. For example, using the supplied docker-compose.yml
file, you should be able to:
$ docker-compose up
$ curl -I -k https://localhost:8443/stats
HTTP/1.1 200 OK
Server: nginx/1.18.0
Date: Thu, 04 Feb 2021 01:20:43 GMT
Content-Type: text/xml
Content-Length: 645
Connection: keep-alive
Do you mean the certs/
folder should be mounted to the host's /opt/certs
at the container runtime instead of copy them to the image's /opt/certs
during the building process?
Either should work, but I recommend using volume if using a production certificate.
Edit: I see that you copied it in your Dockerfile fork. So maybe check the right https port is being exposed too.
Either should work, but I recommend using volume if using a production certificate.
Why?
Edit: I see that you copied it in your Dockerfile fork. So maybe check the right https port is being exposed too.
Thanks a lot, I exposed the 443 from container, and now I can play on host's 8443 with ssl enabled using the following steps:
# Start the container:
$ docker run -it -p 1935:1935 -p 8000:80 -p 8443:443 --rm nginx-rtmp
# Verify the https sever's status:
$ curl -I -k https://localhost:8443/stats
HTTP/1.1 200 OK
Server: nginx/1.18.0
Date: Thu, 04 Feb 2021 02:17:04 GMT
Content-Type: text/xml
Content-Length: 5568
Connection: keep-alive
# Publish the stream:
$ ffmpeg -f pulse -i default -f v4l2 -r 30 -s 1920x1080 -i /dev/video0 -c:v libx264 -preset veryfast -b:v 3000k -maxrate 3000k -bufsize 3000k -vf "scale=1280:-1,format=yuv420p" -g 60 -c:a aac -b:a 128k -ar 44100 -force_key_frames "expr:gte(t,n_forced*4)" -f flv "rtmp://localhost:1935/stream/surveillance"
# Watch the stream:
# http:
$ ffplay http://localhost:8000/live/surveillance.m3u8
# https:
$ ffplay https://localhost:8443/live/surveillance.m3u8
But I still failed to watch the stream with HTTP or HTTPS protocol using VLC player as shown below:
$ cvlc https://localhost:8443/live/surveillance.m3u8
VLC media player 3.0.9.2 Vetinari (revision 3.0.9.2-0-gd4c1aefe4d)
[0000557a9a005210] dummy interface: using the dummy interface module...
[00007f55a40024b0] gnutls tls client error: Certificate verification failure: The certificate is NOT trusted. The certificate issuer is unknown. The certificate chain uses expired certificate. The name in the certificate does not match the expected.
[00007f55a40024b0] main tls client error: TLS session handshake error
[00007f55a40024b0] main tls client error: connection error: Resource temporarily unavailable
[00007f55a4001610] access stream error: HTTP connection failure
[00007f55b0000c80] main input error: Your input can't be opened
[00007f55b0000c80] main input error: VLC is unable to open the MRL 'https://localhost:8443/live/surveillance.m3u8'. Check the log for details.
$ cvlc http://localhost:8000/live/surveillance.m3u8
VLC media player 3.0.9.2 Vetinari (revision 3.0.9.2-0-gd4c1aefe4d)
[00005645acdbefc0] dummy interface: using the dummy interface module...
[00007fd7e8001610] http stream error: cannot resolve localhost: Name or service not known
[00007fd7e8001610] access stream error: HTTP connection failure
[00007fd7e8001610] main stream error: cannot resolve localhost port 844000 : Name or service not known
[00007fd7e8001610] http stream error: cannot connect to localhost:844000
[00007fd7f4000c80] main input error: Your input can't be opened
[00007fd7f4000c80] main input error: VLC is unable to open the MRL 'http://localhost:844000/live/surveillance.m3u8'. Check the log for details.
Why?
This way you don't have to copy your private key to the container at build time. You can manage it outside as a volume.
But I still failed to watch the stream with HTTP or HTTPS protocol using VLC player as shown below:
Looks like this is the issue:
gnutls tls client error: Certificate verification failure: The certificate is NOT trusted. The certificate issuer is unknown. The certificate chain uses expired certificate.
Some players, such as VLC will not use an untrusted/self-signed certificate when using SSL. I'm not sure if there's a flag to bypass for testing. You can try generating your own certificate via Let's Encrypt.
I like using https://hls-js.netlify.app/demo/ as a player to test the HLS streams. It should work on untrusted certs too, depending on your browser.
This way you don't have to copy your private key to the container at build time. You can manage it outside as a volume.
Do you mean the suggested way for running the container in production environment should be something as following?
$ docker run -it -p 1935:1935 -p 8000:80 -p 8443:443 -v ./certs:/opt/certs --rm nginx-rtmp
Yeah, that is ideal, or using an automated service like https://letsencrypt.org to renew the cert in an interval with something like certbot.
The supplied certificate in this repository is for testing only, as it is self-signed (and expired).
I like using https://hls-js.netlify.app/demo/ as a player to test the HLS streams.
My stream created by the container can pass the above testing. See the screenshot below:
Looks good. 👍
BTW, how can I embed the player in the browser like the test page above?
HLS.js
is a great player and I recommend using it for a web page. However, I can't provide support on it since it varies based on your webpage setup. I would suggest checking out the documentation for implementation details and examples:
https://github.com/video-dev/hls.js/blob/master/docs/API.md#getting-started
They have a few snippets you can use an example for embedding to your website.
Thanks a lot, I'll try it and feedback the problem relative to this project if necessary. BTW, I think we can further enhance this project for directly supply the HLS.js integration.
That's a good idea. It would be nice to have an example player in static
folder. I'll look into it as one of my next tasks for this project.
Feel free to close the issue if all is good. Thanks!
I confirmed that the VLC relevant problem is caused by your self-signed (and expired) cert as shown below:
$ cvlc -vv https://localhost:8443/live/surveillance.m3u8
VLC media player 3.0.9.2 Vetinari (revision 3.0.9.2-0-gd4c1aefe4d)
[000055b421ef15b0] main libvlc debug: VLC media player - 3.0.9.2 Vetinari
[000055b421ef15b0] main libvlc debug: Copyright © 1996-2020 the VideoLAN team
[000055b421ef15b0] main libvlc debug: revision 3.0.9.2-0-gd4c1aefe4d
[000055b421ef15b0] 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-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.9.2-1' '--enable-a52' '--enable-aa' '--enable-aom' '--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-srt' '--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-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-macosx' '--disable-macosx-avfoundation' '--disable-macosx-qtkit' '--disable-microdns' '--disable-mfx' '--disable-opencv' '--disable-projectm' '--disable-schroedinger' '--disable-sparkle' '--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-libva' '--enable-vcd' '--enable-smbclient' '--disable-oss' '--enable-mmx' '--enable-sse' '--disable-neon' '--disable-altivec' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fdebug-prefix-map=/build/vlc-sUx6OI/vlc-3.0.9.2=. -fstack-protector-strong -Wformat -Werror=format-security ' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -fdebug-prefix-map=/build/vlc-sUx6OI/vlc-3.0.9.2=. -fstack-protector-strong -Wformat -Werror=format-security ' 'OBJCFLAGS=-g -O2 -fdebug-prefix-map=/build/vlc-sUx6OI/vlc-3.0.9.2=. -fstack-protector-strong -Wformat -Werror=format-security'
[000055b421ef15b0] main libvlc debug: searching plug-in modules
[000055b421ef15b0] main libvlc debug: loading plugins cache file /usr/lib/x86_64-linux-gnu/vlc/plugins/plugins.dat
[000055b421ef15b0] main libvlc debug: recursively browsing `/usr/lib/x86_64-linux-gnu/vlc/plugins'
[000055b421ef15b0] main libvlc debug: plug-ins loaded: 521 modules
[000055b421ef15b0] main libvlc debug: opening config file (/home/werner/.config/vlc/vlcrc)
[000055b421ef1900] main logger debug: looking for logger module matching "any": 4 candidates
[000055b421ef1900] main logger debug: using logger module "console"
[000055b421ef15b0] main libvlc debug: translation test: code is "C"
[000055b421f8a120] main keystore debug: looking for keystore module matching "memory": 4 candidates
[000055b421f8a120] main keystore debug: using keystore module "memory"
[000055b421ef15b0] main libvlc debug: CPU has capabilities MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX AVX2 FPU
[000055b421f91c00] main input debug: Creating an input for 'Media Library'
[000055b421f91c00] main input debug: Input is a meta file: disabling unneeded options
[000055b421f91c00] main input debug: using timeshift granularity of 50 MiB
[000055b421f91c00] main input debug: using default timeshift path
[000055b421f91c00] main input debug: `file/directory:///home/werner/.local/share/vlc/ml.xspf' gives access `file' demux `directory' path `/home/werner/.local/share/vlc/ml.xspf'
[000055b421f8be90] main input source debug: creating demux: access='file' demux='directory' location='/home/werner/.local/share/vlc/ml.xspf' file='/home/werner/.local/share/vlc/ml.xspf'
[000055b421f8d550] main demux debug: looking for access_demux module matching "file": 17 candidates
[000055b421f8d550] main demux debug: no access_demux modules matched
[000055b421fb1170] main stream debug: creating access: file:///home/werner/.local/share/vlc/ml.xspf
[000055b421fb1170] main stream debug: (path: /home/werner/.local/share/vlc/ml.xspf)
[000055b421fb1170] main stream debug: looking for access module matching "file": 28 candidates
[000055b421fb1170] main stream debug: using access module "filesystem"
[000055b421fb2310] main stream debug: looking for stream_filter module matching "prefetch,cache_read": 26 candidates
[000055b421fb2310] cache_read stream debug: Using stream method for AStream*
[000055b421fb2310] cache_read stream debug: starting pre-buffering
[000055b421fb2310] cache_read stream debug: received first data after 0 ms
[000055b421fb2310] cache_read stream debug: pre-buffering done 296 bytes in 0s - 8501 KiB/s
[000055b421fb2310] main stream debug: using stream_filter module "cache_read"
[000055b421fb33f0] main stream debug: looking for stream_filter module matching "any": 26 candidates
[000055b421fb33f0] playlist stream debug: using XSPF playlist reader
[000055b421fb33f0] main stream debug: using stream_filter module "playlist"
[000055b421fb33f0] main stream debug: stream filter added to 0x55b421fb2310
[000055b421fb6950] main stream debug: looking for stream_filter module matching "any": 26 candidates
[000055b421fb6950] main stream debug: no stream_filter modules matched
[000055b421f8e570] main stream_directory debug: looking for stream_directory module matching "any": 1 candidates
[000055b421f8e570] main stream_directory debug: no stream_directory modules matched
[000055b421f8be90] main input source debug: attachment of directory-extractor failed for file:///home/werner/.local/share/vlc/ml.xspf
[000055b421fb6950] main stream debug: looking for stream_filter module matching "record": 26 candidates
[000055b421fb6950] main stream debug: using stream_filter module "record"
[000055b421f8be90] main input source debug: creating demux: access='file' demux='directory' location='/home/werner/.local/share/vlc/ml.xspf' file='/home/werner/.local/share/vlc/ml.xspf'
[000055b421f8d550] main demux debug: looking for demux module matching "directory": 55 candidates
[000055b421f8d550] main demux debug: using demux module "directory"
[000055b421fbaf00] main demux meta debug: looking for meta reader module matching "any": 2 candidates
[000055b421fbaf00] lua demux meta debug: Trying Lua scripts in /home/werner/.local/share/vlc/lua/meta/reader
[000055b421fbaf00] lua demux meta debug: Trying Lua scripts in /usr/lib/x86_64-linux-gnu/vlc/lua/meta/reader
[000055b421fbaf00] lua demux meta debug: Trying Lua playlist script /usr/lib/x86_64-linux-gnu/vlc/lua/meta/reader/filename.luac
[000055b421fbaf00] lua demux meta debug: Trying Lua scripts in /usr/share/vlc/lua/meta/reader
[000055b421fbaf00] main demux meta debug: no meta reader modules matched
[000055b421f91c00] main input debug: `file/directory:///home/werner/.local/share/vlc/ml.xspf' successfully opened
[000055b421fc6500] main xml reader debug: looking for xml reader module matching "any": 1 candidates
[000055b421fc6500] main xml reader debug: using xml reader module "xml"
[000055b421f91c00] main input debug: EOF reached
[000055b421f8d550] main demux debug: removing module "directory"
[000055b421fb6950] main stream debug: removing module "record"
[000055b421fb33f0] main stream debug: removing module "playlist"
[000055b421fb2310] main stream debug: removing module "cache_read"
[000055b421fb1170] main stream debug: removing module "filesystem"
[000055b421f8f420] main playlist debug: creating audio output
[000055b421fc6140] main audio output debug: looking for audio output module matching "any": 6 candidates
[000055b421fc6140] vlcpulse audio output debug: using library version 13.99.0
[000055b421fc6140] vlcpulse audio output debug: (compiled with version 13.99.0, protocol 33)
[000055b421fc6140] vlcpulse audio output debug: connected locally to /run/user/1000/pulse/native as client #46
[000055b421fc6140] vlcpulse audio output debug: using protocol 33, server protocol 33
[000055b421fc6140] pulse audio output debug: adding sink 1: alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo (Audio Adapter (Unitek Y-247A) Analog Stereo)
[000055b421fc6140] pulse audio output debug: adding sink 3: alsa_output.pci-0000_00_1b.0.hdmi-stereo (Built-in Audio Digital Stereo (HDMI))
[000055b421fc6140] pulse audio output debug: adding sink 4: alsa_output.pci-0000_02_00.1.hdmi-stereo-extra1 (TU104 HD Audio Controller Digital Stereo (HDMI 2))
[000055b421fc6140] main audio output debug: using audio output module "pulse"
[000055b421f8f420] main playlist debug: keeping audio output
[000055b421fce410] main interface debug: looking for interface module matching "dbus,none": 19 candidates
[000055b421fce410] dbus interface debug: listening on dbus as: org.mpris.MediaPlayer2.vlc
[000055b421fce410] main interface debug: using interface module "dbus"
[000055b421fd2940] main interface debug: looking for interface module matching "hotkeys,none": 19 candidates
[000055b421fd2940] main interface debug: using interface module "hotkeys"
[000055b421fd3310] main interface debug: looking for interface module matching "globalhotkeys,none": 19 candidates
[000055b421fce410] dbus interface debug: Getting All properties
[000055b421fd3310] main interface debug: using interface module "xcb_hotkeys"
[000055b421fd4210] main interface debug: looking for interface module matching "dummy": 19 candidates
[000055b421fd4210] dummy interface: using the dummy interface module...
[000055b421fd4210] main interface debug: using interface module "dummy"
[000055b421f8f420] main playlist debug: processing request item: null, node: Playlist, skip: 0
[000055b421f8f420] main playlist debug: rebuilding array of current - root Playlist
[000055b421f8f420] main playlist debug: rebuild done - 1 items, index -1
[000055b421f8f420] main playlist debug: starting playback of new item
[000055b421f8f420] main playlist debug: resyncing on surveillance.m3u8
[000055b421f8f420] main playlist debug: surveillance.m3u8 is at 0
[000055b421f8f420] main playlist debug: creating new input thread
[00007ff104000c80] main input debug: Creating an input for 'surveillance.m3u8'
[000055b421f8f420] main playlist debug: requesting art for new input thread
[00007ff104000c80] main input debug: using timeshift granularity of 50 MiB
[00007ff104000c80] main input debug: using default timeshift path
[00007ff104000c80] main input debug: `https://localhost:8443/live/surveillance.m3u8' gives access `https' demux `any' path `localhost:8443/live/surveillance.m3u8'
[00007ff0f8000fa0] main input source debug: creating demux: access='https' demux='any' location='localhost:8443/live/surveillance.m3u8' file='(null)'
[00007ff0f8001140] main demux debug: looking for access_demux module matching "https": 17 candidates
[00007ff0f8001140] main demux debug: no access_demux modules matched
[00007ff0f8001610] main stream debug: creating access: https://localhost:8443/live/surveillance.m3u8
[00007ff0f0000c20] main meta fetcher debug: looking for meta fetcher module matching "any": 1 candidates
[00007ff0f8001610] main stream debug: looking for access module matching "https": 28 candidates
[00007ff0f0000c20] lua meta fetcher debug: Trying Lua scripts in /home/werner/.local/share/vlc/lua/meta/fetcher
[00007ff0f0000c20] lua meta fetcher debug: Trying Lua scripts in /usr/lib/x86_64-linux-gnu/vlc/lua/meta/fetcher
[00007ff0f0000c20] lua meta fetcher debug: Trying Lua scripts in /usr/share/vlc/lua/meta/fetcher
[00007ff0f0000c20] main meta fetcher debug: no meta fetcher modules matched
[00007ff0f0000c20] main art finder debug: looking for art finder module matching "any": 2 candidates
[00007ff0f80024b0] main tls client debug: looking for tls client module matching "any": 1 candidates
[00007ff0f0000c20] lua art finder debug: Trying Lua scripts in /home/werner/.local/share/vlc/lua/meta/art
[00007ff0f0000c20] lua art finder debug: Trying Lua scripts in /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art
[00007ff0f0000c20] lua art finder debug: Trying Lua playlist script /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/00_musicbrainz.luac
[00007ff0f0000c20] lua art finder debug: skipping script (unmatched scope) /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/00_musicbrainz.luac
[00007ff0f0000c20] lua art finder debug: Trying Lua playlist script /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/01_googleimage.luac
[00007ff0f0000c20] lua art finder debug: skipping script (unmatched scope) /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/01_googleimage.luac
[00007ff0f0000c20] lua art finder debug: Trying Lua playlist script /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/02_frenchtv.luac
[00007ff0f0000c20] lua art finder debug: skipping script (unmatched scope) /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/02_frenchtv.luac
[00007ff0f0000c20] lua art finder debug: Trying Lua playlist script /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/03_lastfm.luac
[00007ff0f0000c20] lua art finder debug: skipping script (unmatched scope) /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/03_lastfm.luac
[00007ff0f0000c20] lua art finder debug: Trying Lua scripts in /usr/share/vlc/lua/meta/art
[00007ff0f0000c20] main art finder debug: no art finder modules matched
[00007ff0f4000c20] main meta fetcher debug: looking for meta fetcher module matching "any": 1 candidates
[00007ff0f4000c20] lua meta fetcher debug: Trying Lua scripts in /home/werner/.local/share/vlc/lua/meta/fetcher
[00007ff0f4000c20] lua meta fetcher debug: Trying Lua scripts in /usr/lib/x86_64-linux-gnu/vlc/lua/meta/fetcher
[00007ff0f4000c20] lua meta fetcher debug: Trying Lua scripts in /usr/share/vlc/lua/meta/fetcher
[00007ff0f4000c20] main meta fetcher debug: no meta fetcher modules matched
[00007ff0f4000c20] main art finder debug: looking for art finder module matching "any": 2 candidates
[00007ff0f4000c20] lua art finder debug: Trying Lua scripts in /home/werner/.local/share/vlc/lua/meta/art
[00007ff0f4000c20] lua art finder debug: Trying Lua scripts in /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art
[00007ff0f4000c20] lua art finder debug: Trying Lua playlist script /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/00_musicbrainz.luac
[00007ff0f4000c20] lua art finder debug: Trying Lua playlist script /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/01_googleimage.luac
[00007ff0f80024b0] gnutls tls client debug: using GnuTLS version 3.6.13
[00007ff0f4000c20] lua art finder debug: Trying Lua playlist script /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/02_frenchtv.luac
[00007ff0f4000c20] lua art finder debug: Trying Lua playlist script /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/03_lastfm.luac
[00007ff0f4000c20] lua art finder debug: Trying Lua scripts in /usr/share/vlc/lua/meta/art
[00007ff0f4000c20] main art finder debug: no art finder modules matched
[000055b421fce410] dbus interface debug: Getting All properties
[000055b421fce410] dbus interface debug: Getting All properties
[00007ff0f80024b0] gnutls tls client debug: loaded 138 trusted CAs from system
[00007ff0f80024b0] main tls client debug: using tls client module "gnutls"
[00007ff0f80024b0] main tls client debug: resolving localhost ...
[00007ff0f80024b0] gnutls tls client debug: TLS handshake: Resource temporarily unavailable, try again.
[00007ff0f80024b0] gnutls tls client debug: TLS handshake: Success.
[00007ff0f80024b0] gnutls tls client debug: - safe renegotiation (RFC5746) enabled
[00007ff0f80024b0] gnutls tls client debug: - extended master secret (RFC7627) enabled
[00007ff0f80024b0] gnutls tls client debug: - false start (RFC7918) enabled
[00007ff0f80024b0] gnutls tls client error: Certificate verification failure: The certificate is NOT trusted. The certificate issuer is unknown. The certificate chain uses expired certificate. The name in the certificate does not match the expected.
[00007ff0f80024b0] main tls client error: TLS session handshake error
[00007ff0f80024b0] main tls client error: connection error: Resource temporarily unavailable
[00007ff0f8001610] access stream error: HTTP connection failure
[00007ff0f8001610] main stream debug: no access modules matched
[00007ff104000c80] main input error: Your input can't be opened
[00007ff104000c80] main input error: VLC is unable to open the MRL 'https://localhost:8443/live/surveillance.m3u8'. Check the log for details.
[000055b421f8f420] main playlist debug: dead input
[000055b421f8f420] main playlist debug: changing item without a request (current 0/1)
[000055b421f8f420] main playlist debug: nothing to play
Yeah, just like browsers and curl, anything establishing an SSL/TLS connection will give a warning or error if the certificate is unverified. Sometimes they give an option to bypass for testing, like curl -k
for example. I'm not sure if VLC does.
But why ffplay doesn't have that problem? But with VLC, even the HTTP protocol does not work, as shown below:
$ cvlc -vv http://localhost:8000/live/surveillance.m3u8
[...]
[00007fde9c002210] http stream debug: incoming response:
HTTP/1.1 206 Partial Content
Server: nginx/1.18.0
Date: Thu, 04 Feb 2021 05:07:52 GMT
Content-Type: application/vnd.apple.mpegurl
Content-Length: 138
Last-Modified: Thu, 04 Feb 2021 05:07:50 GMT
Connection: keep-alive
ETag: "601b8126-8a"
Cache-Control: no-cache
Access-Control-Allow-Origin: *
Content-Range: bytes 0-137/138
[00007fde9c002210] main stream debug: using access module "access"
[00007fde9c001640] main stream debug: looking for stream_filter module matching "prefetch,cache_block": 26 candidates
[00007fde9c001640] prefetch stream debug: using 138 bytes buffer, 138 bytes read
[00007fde9c001640] main stream debug: using stream_filter module "prefetch"
[00007fde9c002590] main stream debug: looking for stream_filter module matching "any": 26 candidates
[00007fde9c001640] prefetch stream debug: end of stream
[00007fde9c002590] main stream debug: no stream_filter modules matched
[00007fde9c002590] main stream debug: looking for stream_filter module matching "inflate": 26 candidates
[00007fde9c002590] main stream debug: no stream_filter modules matched
[00007fde9c001640] main stream debug: removing module "prefetch"
[00007fde9c002210] main stream debug: removing module "access"
^C[000055a14c9dd5b0] main libvlc debug: exiting
[000055a14c9dd5b0] main libvlc debug: removing all interfaces
[000055a14cac04c0] main interface debug: removing module "dummy"
[000055a14cabf3b0] main interface debug: removing module "xcb_hotkeys"
[000055a14cabe9e0] main interface debug: removing module "hotkeys"
[000055a14caa27b0] main interface debug: removing module "dbus"
[000055a14ca7b420] main playlist debug: destroying
[000055a14ca7b420] main playlist debug: deactivating the playlist
[000055a14ca7b420] main playlist debug: incoming request - stopping current input
[00007fdeac001140] main demux debug: removing module "adaptive"
[00007fdeac002eb0] main stream debug: removing module "record"
[00007fdeac002900] main stream debug: removing module "prefetch"
[00007fdeac001610] main stream debug: removing module "access"
[000055a14ca7b420] main playlist debug: dead input
[000055a14ca7b420] main playlist debug: nothing to play
[000055a14cab2170] main audio output debug: removing module "pulse"
[000055a14cabb7e0] main playlist export debug: saving media library to file /home/werner/.local/share/vlc/ml.xspf.tmp1615381
[000055a14cabb7e0] main playlist export debug: looking for playlist export module matching "export-xspf": 4 candidates
[000055a14cabb7e0] main playlist export debug: using playlist export module "export"
[000055a14cabb7e0] main playlist export debug: removing module "export"
[000055a14ca7b420] main playlist debug: deleting item `Media Library'
[000055a14ca7b420] main playlist debug: deleting item `surveillance.m3u8'
[000055a14ca7b420] main playlist debug: deleting item `Playlist'
[000055a14ca76120] main keystore debug: removing module "memory"
It could be that ffplay
allows the untrusted connection. I am not 100% sure, though.
VLC still seems to work fine for me using http/80.
Every client can behave differently on how it handles SSL/TLS connections.
I compiled and installed the git master version of vlc and then testing it with one of hls stream's URL given here but still failed. See following for detailed info.
werner@X10DAi:~$ cvlc -vv 'https://multiplatform-f.akamaihd.net/i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/master.m3u8'
VLC media player 4.0.0-dev Otto Chriek (revision 4.0.0-dev-14728-g63a50f5439)
[0000558f5c888870] main libvlc debug: VLC media player - 4.0.0-dev Otto Chriek
[0000558f5c888870] main libvlc debug: Copyright © 1996-2021 the VideoLAN team
[0000558f5c888870] main libvlc debug: revision 4.0.0-dev-14728-g63a50f5439
[0000558f5c888870] main libvlc debug: configured with ./configure
[0000558f5c888870] main libvlc debug: searching plug-in modules
[0000558f5c888870] main libvlc debug: loading plugins cache file /usr/local/lib/vlc/plugins/plugins.dat
[0000558f5c888870] main libvlc debug: recursively browsing `/usr/local/lib/vlc/plugins'
[0000558f5c888870] main libvlc debug: plug-ins loaded: 545 modules
[0000558f5c888870] main libvlc debug: opening config file (/home/werner/.config/vlc/vlcrc)
[00007ffdb2e4dd98] main generic debug: looking for logger module matching "any": 4 candidates
[00007ffdb2e4dd98] main generic debug: using logger module "console"
[0000558f5c888870] main libvlc debug: translation test: code is "C"
[00007ffdb2e4dd68] main generic debug: looking for keystore module matching "memory": 1 candidates
[00007ffdb2e4dd68] main generic debug: using keystore module "memory"
[0000558f5c888870] main libvlc debug: CPU has capabilities MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX AVX2 FPU
[00007ffdb2e4dd88] main generic debug: looking for medialibrary module matching "any": 0 candidates
[00007ffdb2e4dd88] main generic debug: no medialibrary modules matched with name any
[0000558f5c888870] main libvlc warning: Media library initialization failed
[0000558f5c9181c0] main player debug: creating audio output
[00007ffdb2e4daf8] main generic debug: looking for audio output module matching "any": 4 candidates
[0000558f5c91be80] vlcpulse audio output debug: using library version 13.99.0
[0000558f5c91be80] vlcpulse audio output debug: (compiled with version 13.99.0, protocol 33)
[0000558f5c91be80] vlcpulse audio output debug: connected locally to /run/user/1000/pulse/native as client #40
[0000558f5c91be80] vlcpulse audio output debug: using protocol 33, server protocol 33
[0000558f5c91be80] pulse audio output debug: adding sink 1: alsa_output.pci-0000_00_1b.0.hdmi-stereo (Built-in Audio Digital Stereo (HDMI))
[0000558f5c91be80] pulse audio output debug: adding sink 2: alsa_output.pci-0000_02_00.1.hdmi-stereo-extra1 (TU104 HD Audio Controller Digital Stereo (HDMI 2))
[0000558f5c91be80] pulse audio output debug: adding sink 3: alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo (Audio Adapter (Unitek Y-247A) Analog Stereo)
[00007ffdb2e4daf8] main generic debug: using audio output module "pulse"
[0000558f5c9181c0] main player debug: keeping audio output
[00007ffdb2e4dc78] main generic debug: looking for interface module matching "dbus,none": 1 candidates
[0000558f5c942500] dbus interface debug: listening on dbus as: org.mpris.MediaPlayer2.vlc
[00007ffdb2e4dc78] main generic debug: using interface module "dbus"
[00007ffdb2e4de38] main generic debug: looking for interface module matching "hotkeys": 1 candidates
[00007ffdb2e4de38] main generic debug: using interface module "hotkeys"
[00007ffdb2e4de38] main generic debug: looking for interface module matching "xcb_hotkeys": 1 candidates
[00007ffdb2e4de38] main generic debug: using interface module "xcb_hotkeys"
[00007ffdb2e4de38] main generic debug: looking for interface module matching "dummy": 1 candidates
[0000558f5c949470] dummy interface: using the dummy interface module...
[00007ffdb2e4de38] main generic debug: using interface module "dummy"
[0000558f5c9496b0] main input debug: Creating an input for 'master.m3u8'
[0000558f5c9496b0] main input debug: using timeshift granularity of 50 MiB
[0000558f5c9496b0] main input debug: using default timeshift path
[0000558f5c9496b0] main input debug: `https://multiplatform-f.akamaihd.net/i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/master.m3u8' gives access `https' demux `any' path `multiplatform-f.akamaihd.net/i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/master.m3u8'
[00007fcd28000fe0] main access debug: creating access: https://multiplatform-f.akamaihd.net/i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/master.m3u8
[00007fcd33ffe8d8] main generic debug: looking for access module matching "https": 1 candidates
[00007fcd28002320] gnutls tls client debug: using GnuTLS v3.6.13 (built with v3.6.13)
[00007fcd28002320] gnutls tls client debug: loaded 138 trusted CAs from system
[00007fcd28002320] main tls client debug: resolving multiplatform-f.akamaihd.net ...
[00007fcd28002320] gnutls tls client debug: TLS handshake complete
[00007fcd28002320] gnutls tls client debug: - safe renegotiation (RFC5746) enabled
[00007fcd28002320] gnutls tls client debug: - false start (RFC7918) enabled
[00007fcd33ffe578] http generic debug: outgoing request:
GET /i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/master.m3u8 HTTP/1.1
Host: multiplatform-f.akamaihd.net
Accept: */*
Accept-Language: en_US
User-Agent: VLC/4.0.0-dev LibVLC/4.0.0-dev
Range: bytes=0-
[00007fcd33ffe528] http generic debug: incoming response:
HTTP/1.1 206 Partial Content
Server: AkamaiGHost
Mime-Version: 1.0
Content-Type: application/vnd.apple.mpegurl
Date: Thu, 04 Feb 2021 07:11:11 GMT
Content-Range: bytes 0-1316/1317
Content-Length: 1317
Connection: keep-alive
Access-Control-Allow-Headers: *
Access-Control-Expose-Headers: *
Access-Control-Allow-Methods: GET, HEAD, OPTIONS
Access-Control-Allow-Origin: *
Set-Cookie: _alid_=U9lOKidpd+WqU74Z7x7pAA==; path=/i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/; domain=multiplatform-f.akamaihd.net
[00007fcd33ffe8d8] main generic debug: using access module "http"
[00007fcd33ffe918] main generic debug: looking for stream_filter module matching "prefetch,cache": 3 candidates
[00007fcd28335960] prefetch stream filter debug: using 1317 bytes buffer
[00007fcd33ffe918] main generic debug: using stream_filter module "prefetch"
[00007fcd33ffe918] main generic debug: looking for stream_filter module matching "any": 7 candidates
[00007fcd28335960] prefetch stream filter debug: end of stream
[00007fcd33ffe918] main generic debug: no stream_filter modules matched with name any
[00007fcd33ffe958] main generic debug: looking for stream_directory module matching "any": 1 candidates
[00007fcd33ffe958] main generic debug: no stream_directory modules matched with name any
[0000558f5c9496b0] main input debug: attachment of directory-extractor failed for https://multiplatform-f.akamaihd.net/i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/master.m3u8
[00007fcd33ffe918] main generic debug: looking for stream_filter module matching "record": 1 candidates
[00007fcd33ffe918] main generic debug: using stream_filter module "record"
[0000558f5c9496b0] main input debug: creating demux "any", URL: https://multiplatform-f.akamaihd.net/i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/master.m3u8, path: (null)
[00007fcd33ffe918] main generic debug: looking for demux module matching "any": 63 candidates
[00007fcd2832d140] adaptive demux debug: Period
[00007fcd2832d140] adaptive demux debug: BaseAdaptationSet default_id#0
[00007fcd2832d140] adaptive demux debug: Representation https://multiplatform-f.akamaihd.net/i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/index_0_a.m3u8 [mp4a.40.2]
[00007fcd2832d140] adaptive demux debug: (not loaded) Unknown
[00007fcd2832d140] adaptive demux debug: Representation https://multiplatform-f.akamaihd.net/i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/index_0_av.m3u8 [avc1.77.30, mp4a.40.2]
[00007fcd2832d140] adaptive demux debug: (not loaded) Unknown
[00007fcd2832d140] adaptive demux debug: Representation https://multiplatform-f.akamaihd.net/i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/index_1_av.m3u8 [avc1.77.30, mp4a.40.2]
[00007fcd2832d140] adaptive demux debug: (not loaded) Unknown
[00007fcd2832d140] adaptive demux debug: Representation https://multiplatform-f.akamaihd.net/i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/index_2_av.m3u8 [avc1.77.30, mp4a.40.2]
[00007fcd2832d140] adaptive demux debug: (not loaded) Unknown
[00007fcd2832d140] adaptive demux debug: Representation https://multiplatform-f.akamaihd.net/i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/index_3_av.m3u8 [avc1.77.30, mp4a.40.2]
[00007fcd2832d140] adaptive demux debug: (not loaded) Unknown
[0000558f5c9496b0] main input debug: selecting program id=0
[00007fcd2832d140] adaptive demux debug: opening playlist file (multiplatform-f.akamaihd.net/i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/master.m3u8)
[00007fcd33ffe918] main generic debug: using demux module "adaptive"
[00007fcd33ffe608] main generic debug: looking for audio decoder module matching "any": 17 candidates
[00007fcd2833a410] avcodec decoder debug: using ffmpeg Lavc58.119.100
[00007fcd2833a410] avcodec decoder debug: CPU flags: 0x000fd3db
[00007fcd2833a410] avcodec decoder debug: codec (aac) started
[00007fcd33ffe608] main generic debug: using audio decoder module "avcodec"
[00007fcd33ffeb08] main generic debug: looking for meta reader module matching "any": 2 candidates
[00007fcd283b17d0] lua demux meta debug: Trying Lua scripts in /home/werner/.local/share/vlc/lua/meta/reader
[00007fcd283b17d0] lua demux meta debug: Trying Lua scripts in /usr/local/libexec/vlc/lua/meta/reader
[00007fcd283b17d0] lua demux meta debug: Trying Lua playlist script /usr/local/libexec/vlc/lua/meta/reader/filename.luac
[00007fcd283b17d0] lua demux meta warning: Error loading script /usr/local/libexec/vlc/lua/meta/reader/filename.luac: /usr/local/libexec/vlc/lua/meta/reader/filename.luac: version mismatch in precompiled chunk
[00007fcd283b17d0] lua demux meta debug: Trying Lua scripts in /usr/local/share/vlc/lua/meta/reader
[00007fcd33ffeb08] main generic debug: no meta reader modules matched with name any
[0000558f5c9496b0] main input debug: `https://multiplatform-f.akamaihd.net/i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/master.m3u8' successfully opened
[00007fcd2832d140] adaptive demux debug: Retrieving https://multiplatform-f.akamaihd.net:443/i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/index_0_a.m3u8 @0
[00007fcd18001650] main access debug: creating access: https://multiplatform-f.akamaihd.net:443/i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/index_0_a.m3u8
[00007fcd1c789728] main generic debug: looking for access module matching "https": 1 candidates
[00007fcd18002230] gnutls tls client debug: using GnuTLS v3.6.13 (built with v3.6.13)
[00007fcd18002230] gnutls tls client debug: loaded 138 trusted CAs from system
[00007fcd18002230] main tls client debug: resolving multiplatform-f.akamaihd.net ...
[00007fcd18002230] gnutls tls client debug: TLS handshake complete
[00007fcd18002230] gnutls tls client debug: - safe renegotiation (RFC5746) enabled
[00007fcd18002230] gnutls tls client debug: - false start (RFC7918) enabled
[00007fcd1c7893c8] http generic debug: outgoing request:
GET /i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/index_0_a.m3u8 HTTP/1.1
Host: multiplatform-f.akamaihd.net:443
Accept: */*
Accept-Language: en_US
User-Agent: VLC/4.0.0-dev LibVLC/4.0.0-dev
Cookie: _alid_=U9lOKidpd+WqU74Z7x7pAA==
Range: bytes=0-
[00007fcd1c789378] http generic debug: incoming response:
HTTP/1.1 206 Partial Content
Server: AkamaiGHost
Mime-Version: 1.0
Content-Type: application/vnd.apple.mpegurl
Date: Thu, 04 Feb 2021 07:11:12 GMT
Content-Range: bytes 0-10086/10087
Content-Length: 10087
Connection: keep-alive
Access-Control-Allow-Headers: *
Access-Control-Expose-Headers: *
Access-Control-Allow-Methods: GET, HEAD, OPTIONS
Access-Control-Allow-Origin: *
Set-Cookie: _alid_=BImtaB+guCeyChHWbxnRVw==; path=/i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/; domain=multiplatform-f.akamaihd.net
[00007fcd1c789728] main generic debug: using access module "http"
[00007fcd1c789768] main generic debug: looking for stream_filter module matching "prefetch,cache": 3 candidates
[00007fcd18008be0] prefetch stream filter debug: using 10087 bytes buffer
[00007fcd1c789768] main generic debug: using stream_filter module "prefetch"
[00007fcd1c789788] main generic debug: looking for stream_filter module matching "any": 7 candidates
[00007fcd1c789788] main generic debug: no stream_filter modules matched with name any
[00007fcd18008be0] prefetch stream filter debug: end of stream
[00007fcd1c7897c8] main generic debug: looking for stream_filter module matching "inflate": 1 candidates
[00007fcd1c7897c8] main generic debug: no stream_filter modules matched with name inflate
[00007fcd18008be0] main stream filter debug: removing module "prefetch"
[00007fcd18001650] main access debug: removing module "http"
[00007fcd2832d140] adaptive demux debug: Retrieving https://multiplatform-f.akamaihd.net:443/i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/index_3_av.m3u8 @0
[00007fcd18134980] main access debug: creating access: https://multiplatform-f.akamaihd.net:443/i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/index_3_av.m3u8
[00007fcd1c789748] main generic debug: looking for access module matching "https": 1 candidates
[00007fcd18134d50] gnutls tls client debug: using GnuTLS v3.6.13 (built with v3.6.13)
[00007fcd18134d50] gnutls tls client debug: loaded 138 trusted CAs from system
[00007fcd18134d50] main tls client debug: resolving multiplatform-f.akamaihd.net ...
[00007fcd18134d50] gnutls tls client debug: TLS handshake complete
[00007fcd18134d50] gnutls tls client debug: - safe renegotiation (RFC5746) enabled
[00007fcd18134d50] gnutls tls client debug: - false start (RFC7918) enabled
[00007fcd1c7893e8] http generic debug: outgoing request:
GET /i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/index_3_av.m3u8 HTTP/1.1
Host: multiplatform-f.akamaihd.net:443
Accept: */*
Accept-Language: en_US
User-Agent: VLC/4.0.0-dev LibVLC/4.0.0-dev
Cookie: _alid_=BImtaB+guCeyChHWbxnRVw==
Range: bytes=0-
[00007fcd1c789398] http generic debug: incoming response:
HTTP/1.1 206 Partial Content
Server: AkamaiGHost
Mime-Version: 1.0
Content-Type: application/vnd.apple.mpegurl
Date: Thu, 04 Feb 2021 07:11:14 GMT
Content-Range: bytes 0-10146/10147
Content-Length: 10147
Connection: keep-alive
Access-Control-Allow-Headers: *
Access-Control-Expose-Headers: *
Access-Control-Allow-Methods: GET, HEAD, OPTIONS
Access-Control-Allow-Origin: *
Set-Cookie: _alid_=CxiMqESK6ayLlMUIu0Lmnw==; path=/i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/; domain=multiplatform-f.akamaihd.net
[00007fcd1c789748] main generic debug: using access module "http"
[00007fcd1c789788] main generic debug: looking for stream_filter module matching "prefetch,cache": 3 candidates
[00007fcd1810ade0] prefetch stream filter debug: using 10147 bytes buffer
[00007fcd1c789788] main generic debug: using stream_filter module "prefetch"
[00007fcd1c7897a8] main generic debug: looking for stream_filter module matching "any": 7 candidates
[00007fcd1c7897a8] main generic debug: no stream_filter modules matched with name any
[00007fcd1810ade0] prefetch stream filter debug: end of stream
[00007fcd1c7897e8] main generic debug: looking for stream_filter module matching "inflate": 1 candidates
[00007fcd1c7897e8] main generic debug: no stream_filter modules matched with name inflate
[00007fcd1810ade0] main stream filter debug: removing module "prefetch"
[00007fcd18134980] main access debug: removing module "http"
[00007fcd2832d140] adaptive demux debug: Retrieving https://multiplatform-f.akamaihd.net:443/i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/segment1_0_a.ts @0
[00007fcd10001bb0] gnutls tls client debug: using GnuTLS v3.6.13 (built with v3.6.13)
[00007fcd10001bb0] gnutls tls client debug: loaded 138 trusted CAs from system
[00007fcd10001bb0] main tls client debug: resolving multiplatform-f.akamaihd.net ...
[00007fcd10001bb0] gnutls tls client debug: TLS handshake complete
[00007fcd10001bb0] gnutls tls client debug: - safe renegotiation (RFC5746) enabled
[00007fcd10001bb0] gnutls tls client debug: - false start (RFC7918) enabled
[00007fcd2832d140] main demux debug: creating demux "ts", URL: , path: (null)
[00007fcd1c7899b8] main generic debug: looking for demux module matching "ts": 1 candidates
[00007fcd1833c900] ts demux debug: Standard set to Auto
[00007fcd1c7899b8] main generic debug: using demux module "ts"
[00007fcd1833c900] ts demux debug: pid[17] unknown
[00007fcd1833c900] ts demux debug: first packet for pid=0 cc=0x1
[00007fcd1833c900] ts demux debug: PATCallBack called
[00007fcd1833c900] ts demux debug: new PAT ts_id=1 version=0 current_next=1
[00007fcd1833c900] ts demux debug: * number=1 pid=4096
[00007fcd1833c900] ts demux debug: temporary receiving program 1
[00007fcd1833c900] ts demux debug: PMTCallBack called for program 1
[00007fcd1833c900] ts demux debug: new PMT program number=1 version=0 pid_pcr=256
[00007fcd1833c900] ts demux debug: * pid=256 type=0xf ISO/IEC 13818-7 Audio with ADTS transport
[00007fcd1833c900] ts demux debug: - SL/FMC descriptor not found/matched
[00007fcd1833c900] ts demux debug: => pid 256 has now es fcc=mp4a
[00007fcd1833c900] ts demux debug: Default program is 1
[00007fcd1833c900] ts demux debug: * pid=17 listening for SDT
[00007fcd1833c900] ts demux debug: enabling pid 256 from program 1
[00007fcd1833c900] ts demux debug: enabling pcr pid 256 from program 1
[00007fcd2832d140] adaptive demux: Changing stream format Unknown -> Unknown
[00007fcd2832d140] adaptive demux: Encountered discontinuity
[00007fcd1833c900] ts demux debug: Can't read TS packet at 108852
[00007fcd2832d140] adaptive demux debug: Restarting demuxer
[00007fcd1833c900] ts demux debug: Can't read TS packet at 108852
[00007fcd1833c900] main demux debug: removing module "ts"
[00007fcd1833c900] main demux debug: attempt to destroy nonexistent variable "module-name"
[00007fcd2832d140] adaptive demux debug: Draining on discontinuity
[00007fcd2833a410] main decoder debug: killing decoder fourcc `mp4a'
[00007fcd2833a410] main decoder debug: removing module "avcodec"
[00007fcd33ffe2e8] main generic debug: looking for packetizer module matching "any": 25 candidates
[00007fcd283b5160] mpeg4audio packetizer debug: running MPEG4 audio packetizer
[00007fcd283b5160] mpeg4audio packetizer debug: ADTS Mode
[00007fcd33ffe2e8] main generic debug: using packetizer module "mpeg4audio"
[00007fcd33ffe2e8] main generic debug: looking for audio decoder module matching "any": 17 candidates
[00007fcd2833a410] avcodec decoder debug: using ffmpeg Lavc58.119.100
[00007fcd2833a410] avcodec decoder debug: CPU flags: 0x000fd3db
[00007fcd2833a410] avcodec decoder debug: codec (aac) started
[00007fcd33ffe2e8] main generic debug: using audio decoder module "avcodec"
[0000558f5c9496b0] main input debug: Buffering 0%
[00007fcd283b5160] mpeg4audio packetizer: AAC channels: 2 samplerate: 44100
[0000558f5c9496b0] main input debug: Buffering 1%
[00007fcd2833a410] main decoder debug: restarting module due to input format change
[0000558f5c9496b0] main input debug: Buffering 6%
[00007fcd2833a410] main decoder debug: removing module "avcodec"
[0000558f5c9496b0] main input debug: Buffering 8%
[00007fcd1ca03ae8] main generic debug: looking for audio decoder module matching "any": 17 candidates
[0000558f5c9496b0] main input debug: Buffering 13%
[00007fcd2833a410] avcodec decoder debug: using ffmpeg Lavc58.119.100
[0000558f5c9496b0] main input debug: Buffering 15%
[00007fcd2833a410] avcodec decoder debug: CPU flags: 0x000fd3db
[0000558f5c9496b0] main input debug: Buffering 20%
[0000558f5c9496b0] main input debug: Buffering 22%
[0000558f5c9496b0] main input debug: Buffering 27%
[0000558f5c9496b0] main input debug: Buffering 29%
[0000558f5c9496b0] main input debug: Buffering 34%
[0000558f5c9496b0] main input debug: Buffering 36%
[0000558f5c9496b0] main input debug: Buffering 41%
[0000558f5c9496b0] main input debug: Buffering 43%
[0000558f5c9496b0] main input debug: Buffering 48%
[0000558f5c9496b0] main input debug: Buffering 50%
[0000558f5c9496b0] main input debug: Buffering 55%
[0000558f5c9496b0] main input debug: Buffering 57%
[0000558f5c9496b0] main input debug: Buffering 62%
[0000558f5c9496b0] main input debug: Buffering 64%
[0000558f5c9496b0] main input debug: Buffering 69%
[0000558f5c9496b0] main input debug: Buffering 71%
[0000558f5c9496b0] main input debug: Buffering 76%
[0000558f5c9496b0] main input debug: Buffering 78%
[0000558f5c9496b0] main input debug: Buffering 83%
[0000558f5c9496b0] main input debug: Buffering 85%
[0000558f5c9496b0] main input debug: Buffering 90%
[0000558f5c9496b0] main input debug: Buffering 92%
[0000558f5c9496b0] main input debug: Buffering 97%
[0000558f5c9496b0] main input debug: Buffering 99%
[0000558f5c9496b0] main input debug: Stream buffering done (1044 ms in 1 ms)
[00007fcd2833a410] avcodec decoder debug: codec (aac) started
[00007fcd1ca03ae8] main generic debug: using audio decoder module "avcodec"
[0000558f5c9181c0] main player debug: reusing audio output
[0000558f5c91be80] pulse audio output debug: using stereo channel map
[0000558f5c91be80] pulse audio output debug: changed buffer metrics: maxlength=4194304, tlength=42336, prebuf=0, minreq=14112
[0000558f5c91be80] pulse audio output debug: connected to sink alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo
[0000558f5c91be80] main audio output debug: output 'f32l' 44100 Hz Stereo frame=1 samples/8 bytes
[00007fcd1ca03a18] main generic debug: looking for audio volume module matching "any": 2 candidates
[00007fcd1ca03a18] main generic debug: using audio volume module "float_mixer"
[0000558f5c91be80] main audio output debug: input 'f32l' 44100 Hz Stereo frame=1 samples/8 bytes
[00007fcd1ca03838] main generic debug: looking for audio filter module matching "scaletempo": 1 candidates
[0000558f5c91be80] pulse audio output debug: changing sink 3: alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo (Audio Adapter (Unitek Y-247A) Analog Stereo)
[00007fcd140227d0] scaletempo audio filter debug: format: 44100 rate, 2 nch, 4 bps, fl32
[00007fcd140227d0] scaletempo audio filter debug: params: 30 stride, 0.200 overlap, 14 search
[00007fcd140227d0] scaletempo audio filter debug: 1.000 scale, 1323.000 stride_in, 1323 stride_out, 1059 standing, 264 overlap, 617 search, 2204 queue, fl32 mode
[00007fcd1ca03838] main generic debug: using audio filter module "scaletempo"
[0000558f5c91be80] main audio output debug: conversion: 'f32l'->'f32l' 44100 Hz->44100 Hz Stereo->Stereo
[0000558f5c91be80] main audio output debug: conversion pipeline complete
[0000558f5c91be80] main audio output debug: conversion: 'f32l'->'f32l' 44100 Hz->44100 Hz Stereo->Stereo
[0000558f5c91be80] main audio output debug: conversion pipeline complete
[00007fcd1ca038a8] main generic debug: looking for audio resampler module matching "any": 3 candidates
[00007fcd14029540] soxr audio resampler debug: Using SoX Resampler with 'cr32s' engine and 'Medium 16-bit with medium roll-off' quality to convert f32l/44100Hz to f32l/44100Hz.
[00007fcd1ca038a8] main generic debug: using audio resampler module "soxr"
[0000558f5c9496b0] main input debug: Decoder wait done in 5 ms
[0000558f5c91be80] pulse audio output debug: cannot synchronize start
[0000558f5c91be80] pulse audio output debug: deferring start (79950 us)
[0000558f5c91be80] pulse audio output debug: deferring start (79721 us)
[0000558f5c91be80] pulse audio output debug: deferring start (79540 us)
[0000558f5c91be80] pulse audio output debug: deferring start (79420 us)
[0000558f5c91be80] pulse audio output debug: deferring start (79295 us)
[0000558f5c91be80] pulse audio output debug: deferring start (79166 us)
[0000558f5c91be80] pulse audio output debug: deferring start (79048 us)
[0000558f5c91be80] pulse audio output debug: deferring start (78911 us)
[0000558f5c91be80] pulse audio output debug: deferring start (78762 us)
[0000558f5c91be80] pulse audio output debug: deferring start (78638 us)
[0000558f5c91be80] pulse audio output debug: deferring start (78519 us)
[0000558f5c91be80] pulse audio output debug: deferring start (78398 us)
[0000558f5c91be80] pulse audio output debug: deferring start (78270 us)
[0000558f5c91be80] pulse audio output debug: deferring start (78149 us)
[0000558f5c91be80] pulse audio output debug: deferring start (78024 us)
[0000558f5c91be80] pulse audio output debug: deferring start (77903 us)
[0000558f5c91be80] pulse audio output debug: deferring start (77780 us)
[0000558f5c91be80] pulse audio output debug: deferring start (77662 us)
[0000558f5c91be80] pulse audio output debug: deferring start (77539 us)
[0000558f5c91be80] pulse audio output debug: deferring start (77415 us)
[0000558f5c91be80] pulse audio output debug: deferring start (77293 us)
[0000558f5c91be80] pulse audio output debug: deferring start (77169 us)
[0000558f5c91be80] pulse audio output debug: deferring start (77047 us)
[0000558f5c91be80] pulse audio output debug: deferring start (76928 us)
[0000558f5c91be80] pulse audio output debug: deferring start (76805 us)
[0000558f5c91be80] pulse audio output debug: deferring start (76682 us)
[0000558f5c91be80] pulse audio output debug: deferring start (76561 us)
[0000558f5c91be80] pulse audio output debug: deferring start (76440 us)
[0000558f5c91be80] pulse audio output debug: deferring start (76310 us)
[0000558f5c91be80] pulse audio output debug: deferring start (76186 us)
[0000558f5c91be80] pulse audio output debug: deferring start (76068 us)
[0000558f5c91be80] pulse audio output debug: deferring start (75949 us)
[0000558f5c91be80] pulse audio output debug: deferring start (75826 us)
[0000558f5c91be80] pulse audio output debug: deferring start (75704 us)
[0000558f5c91be80] pulse audio output debug: deferring start (75582 us)
[0000558f5c91be80] pulse audio output debug: deferring start (75453 us)
[0000558f5c91be80] pulse audio output debug: deferring start (75329 us)
[0000558f5c91be80] pulse audio output debug: deferring start (75207 us)
[0000558f5c91be80] pulse audio output debug: deferring start (75087 us)
[0000558f5c91be80] pulse audio output debug: deferring start (74950 us)
[0000558f5c91be80] pulse audio output debug: deferring start (74817 us)
[0000558f5c91be80] pulse audio output debug: deferring start (74693 us)
[0000558f5c91be80] pulse audio output debug: deferring start (74576 us)
[0000558f5c91be80] pulse audio output debug: deferring start (74459 us)
[0000558f5c91be80] pulse audio output debug: deferring start (74336 us)
[0000558f5c91be80] pulse audio output debug: deferring start (74219 us)
[0000558f5c91be80] pulse audio output debug: deferring start (74100 us)
[0000558f5c91be80] pulse audio output debug: deferring start (73980 us)
[0000558f5c91be80] pulse audio output debug: deferring start (73859 us)
[0000558f5c91be80] pulse audio output debug: deferring start (73728 us)
[0000558f5c91be80] pulse audio output debug: deferring start (48301 us)
[0000558f5c91be80] pulse audio output debug: deferring start (55235 us)
[0000558f5c91be80] pulse audio output debug: deferring start (55073 us)
[0000558f5c91be80] pulse audio output debug: deferring start (54940 us)
[0000558f5c91be80] pulse audio output debug: deferring start (27419 us)
[0000558f5c91be80] pulse audio output debug: starting deferred
[0000558f5c91be80] pulse audio output debug: changing sink 3: alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo (Audio Adapter (Unitek Y-247A) Analog Stereo)
[0000558f5c91be80] pulse audio output debug: started
[0000558f5c9496b0] main input debug: ES_OUT_RESET_PCR called
[0000558f5c91be80] pulse audio output debug: changing sink 3: alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo (Audio Adapter (Unitek Y-247A) Analog Stereo)
[00007fcd2832d140] adaptive demux debug: Retrieving https://multiplatform-f.akamaihd.net:443/i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/segment2_3_av.ts @0
[00007fcd10017720] gnutls tls client debug: using GnuTLS v3.6.13 (built with v3.6.13)
[00007fcd10017720] gnutls tls client debug: loaded 138 trusted CAs from system
[00007fcd10017720] main tls client debug: resolving multiplatform-f.akamaihd.net ...
[00007fcd10017720] gnutls tls client debug: TLS handshake complete
[00007fcd10017720] gnutls tls client debug: - safe renegotiation (RFC5746) enabled
[00007fcd10017720] gnutls tls client debug: - false start (RFC7918) enabled
[00007fcd2832d140] main demux debug: creating demux "ts", URL: , path: (null)
[00007fcd1c7899b8] main generic debug: looking for demux module matching "ts": 1 candidates
[00007fcd1810b760] ts demux debug: Standard set to Auto
[00007fcd1c7899b8] main generic debug: using demux module "ts"
[00007fcd1810b760] ts demux debug: pid[17] unknown
[00007fcd1810b760] ts demux debug: first packet for pid=0 cc=0x2
[00007fcd1810b760] ts demux debug: PATCallBack called
[00007fcd1810b760] ts demux debug: new PAT ts_id=1 version=0 current_next=1
[00007fcd1810b760] ts demux debug: * number=1 pid=4096
[00007fcd1810b760] ts demux debug: temporary receiving program 1
[00007fcd1810b760] ts demux debug: PMTCallBack called for program 1
[00007fcd1810b760] ts demux debug: new PMT program number=1 version=0 pid_pcr=256
[00007fcd1810b760] ts demux debug: * pid=256 type=0x1b AVC video stream as defined in ITU-T Rec. H.264
[00007fcd1810b760] ts demux debug: => pid 256 has now es fcc=h264
[00007fcd1810b760] ts demux debug: Default program is 1
[00007fcd1810b760] ts demux debug: * pid=257 type=0xf ISO/IEC 13818-7 Audio with ADTS transport
[00007fcd1810b760] ts demux debug: - SL/FMC descriptor not found/matched
[00007fcd1810b760] ts demux debug: => pid 257 has now es fcc=mp4a
[00007fcd1810b760] ts demux debug: * pid=17 listening for SDT
[00007fcd1810b760] ts demux debug: enabling pid 256 from program 1
[00007fcd1810b760] ts demux debug: enabling pid 257 from program 1
[00007fcd1810b760] ts demux debug: enabling pcr pid 256 from program 1
[00007fcd2832d140] adaptive demux debug: Retrieving https://multiplatform-f.akamaihd.net:443/i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/segment3_3_av.ts @0
[00007fcd10017720] gnutls tls client debug: using GnuTLS v3.6.13 (built with v3.6.13)
[00007fcd10017720] gnutls tls client debug: loaded 138 trusted CAs from system
[00007fcd10017720] main tls client debug: resolving multiplatform-f.akamaihd.net ...
[00007fcd10017720] gnutls tls client debug: TLS handshake complete
[00007fcd10017720] gnutls tls client debug: - safe renegotiation (RFC5746) enabled
[00007fcd10017720] gnutls tls client debug: - false start (RFC7918) enabled
[0000558f5c91be80] pulse audio output debug: suspended
[0000558f5c91be80] pulse audio output debug: changing sink 3: alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo (Audio Adapter (Unitek Y-247A) Analog Stereo)
[00007fcd1810b760] ts demux debug: SDTCallBack called
[00007fcd1810b760] ts demux debug: * pid=18 listening for EIT
[00007fcd1810b760] ts demux debug: * pid=20 listening for TDT
[00007fcd1810b760] ts demux debug: new SDT ts_id=1 version=0 current_next=1 network_id=65281
[00007fcd1810b760] ts demux debug: * service id=1 eit schedule=0 present=0 running=4 free_ca=0
[00007fcd1810b760] ts demux debug: - type=1 provider=FFmpeg name=Service01
[00007fcd1810b760] ts demux warning: discontinuity received 0x3 instead of 0xc (pid=0)
[00007fcd1810b760] ts demux error: libdvbpsi error (PSI decoder): TS discontinuity (received 3, expected 12) for PID 0
[00007fcd1810b760] ts demux debug: PATCallBack called
[00007fcd1810b760] ts demux warning: discontinuity received 0x0 instead of 0xa (pid=4096)
[00007fcd1810b760] ts demux error: libdvbpsi error (PSI decoder): TS discontinuity (received 0, expected 10) for PID 4096
[00007fcd1810b760] ts demux debug: PMTCallBack called for program 1
Yeah, I'm not sure. This might be a VLC related issue if it's not working with a demo stream.
I've requested the free SSL certificate authorized by www.dnspod.cn for my domain auto.hyddns.xyz
, and now I can successfully play the HLS stream with VLC through HTTP(S) published by the docker-nginx-rtmp
container. But I still see some error messages as shown below:
$ cvlc http://auto.hyddns.xyz:8000/live/surveillance.m3u8
VLC media player 4.0.0-dev Otto Chriek (revision 4.0.0-dev-14728-g63a50f5439)
[0000561991f9f3d0] dummy interface: using the dummy interface module...
[00007f1e20037dd0] main decoder error: buffer deadlock prevented
[00007f1e20130510] main decoder error: buffer deadlock prevented
[00007f1e20130be0] mpeg4audio packetizer: AAC channels: 2 samplerate: 44100
[0000561991f9f610] main input error: ES_OUT_SET_(GROUP_)PCR is called 1354 ms late (pts_delay increased to 1000 ms)
[00007f1e100048d0] ts demux error: libdvbpsi error (PSI decoder): TS duplicate (received 0, expected 1) for PID 0
[00007f1e100048d0] ts demux error: libdvbpsi error (PSI decoder): TS duplicate (received 0, expected 1) for PID 4097
[0000561991f9f610] main input error: ES_OUT_SET_(GROUP_)PCR is called 382 ms late (pts_delay increased to 1382 ms)
[00007f1e100048d0] ts demux error: libdvbpsi error (PSI decoder): TS duplicate (received 0, expected 1) for PID 0
[00007f1e100048d0] ts demux error: libdvbpsi error (PSI decoder): TS duplicate (received 0, expected 1) for PID 4097
[0000561991f9f610] main input error: ES_OUT_SET_(GROUP_)PCR is called 363 ms late (pts_delay increased to 1745 ms)
[00007f1e100048d0] ts demux error: libdvbpsi error (PSI decoder): TS duplicate (received 0, expected 1) for PID 0
[00007f1e100048d0] ts demux error: libdvbpsi error (PSI decoder): TS duplicate (received 0, expected 1) for PID 4097
[0000561991f9f610] main input error: ES_OUT_SET_(GROUP_)PCR is called 1371 ms late (pts_delay increased to 2354 ms)
[00007f1e100048d0] ts demux error: libdvbpsi error (PSI decoder): TS duplicate (received 0, expected 1) for PID 0
[00007f1e100048d0] ts demux error: libdvbpsi error (PSI decoder): TS duplicate (received 0, expected 1) for PID 4097
The screenshot is represented below:
$ cvlc https://auto.hyddns.xyz:8443/live/surveillance.m3u8
VLC media player 4.0.0-dev Otto Chriek (revision 4.0.0-dev-14728-g63a50f5439)
[000055ac16bc13d0] dummy interface: using the dummy interface module...
[00007f6fd4336b00] adaptive demux: Changing stream format Unknown -> Unknown
[00007f6fd4336b00] adaptive demux: Encountered discontinuity
[00007f6fd46213b0] main decoder error: buffer deadlock prevented
[00007f6fd4490600] main decoder error: buffer deadlock prevented
[00007f6fd44eea60] mpeg4audio packetizer: AAC channels: 2 samplerate: 44100
[00007f6fd46213b0] main decoder error: buffer deadlock prevented
[00007f6fd4490600] main decoder error: buffer deadlock prevented
[00007f6fd4638fc0] mpeg4audio packetizer: AAC channels: 2 samplerate: 44100
[000055ac16bc1610] main input error: ES_OUT_SET_(GROUP_)PCR is called 873 ms late (pts_delay increased to 1000 ms)
[00007f6fc4005430] ts demux error: libdvbpsi error (PSI decoder): TS duplicate (received 0, expected 1) for PID 0
[00007f6fc4005430] ts demux error: libdvbpsi error (PSI decoder): TS duplicate (received 0, expected 1) for PID 4097
[000055ac16bc1610] main input error: ES_OUT_SET_(GROUP_)PCR is called 462 ms late (pts_delay increased to 1462 ms)
[00007f6fc4005430] ts demux error: libdvbpsi error (PSI decoder): TS duplicate (received 0, expected 1) for PID 0
[00007f6fc4005430] ts demux error: libdvbpsi error (PSI decoder): TS duplicate (received 0, expected 1) for PID 4097
[000055ac16bc1610] main input error: ES_OUT_SET_(GROUP_)PCR is called 489 ms late (pts_delay increased to 1873 ms)
[00007f6fc4005430] ts demux error: libdvbpsi error (PSI decoder): TS duplicate (received 0, expected 1) for PID 0
[00007f6fc4005430] ts demux error: libdvbpsi error (PSI decoder): TS duplicate (received 0, expected 1) for PID 4097
The screenshot is represented below:
On Ubuntu 20.04, I forked your repo and build the nginx-rtmp image with ssl support, see here for more info.
Then I try to stream my USB camera as shown below:
Then I try to watch the stream but failed:
Then I try to open it with VLC but still failed as shown below:
Any hints for this problem is highly appreciated.
Regards, HY