Welcome! Log In Create A New Profile

Advanced

Re: Failed to publish a HLS stream via the nginx HTTPS server with ffmpeg.

Hongyi Zhao
February 05, 2021 09:46AM
On Thu, Feb 4, 2021 at 6:16 PM Francis Daly <francis@daoine.org> wrote:
>
> On Thu, Feb 04, 2021 at 10:25:08AM +0800, Hongyi Zhao wrote:
> > On Thu, Feb 4, 2021 at 10:03 AM Maxim Dounin <mdounin@mdounin.ru> wrote:
>
> Hi there,
>
> > # Watch the stream:
> > # http:
> > $ ffplay http://localhost:8000/live/surveillance.m3u8
> > # https:
> > $ ffplay https://localhost:8443/live/surveillance.m3u8
>
> You report that "ffplay" successfully plays both http and https streams.
>
> That suggests that the nginx side is fundamentally good.
>
> > 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)
>
> > [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.
>
> Your "cvlc" client fails to play the https stream because that client
> does not like this certificate.
>
> Tell the client to accept your certificate; or change your certificate
> to one that both clients will accept. No obvious nginx-side changes
> needed here.
>
> > $ cvlc http://localhost:8000/live/surveillance.m3u8
> > VLC media player 3.0.9.2 Vetinari (revision 3.0.9.2-0-gd4c1aefe4d)
>
> > [00007fd7e8001610] http stream error: cannot resolve localhost: Name
> > or service not known
>
> Here the cvlc client reports that it cannot resolve the name
> localhost. Your ffplay client could resolve that name; what is different
> about cvlc?
>
> > [00007fd7e8001610] main stream error: cannot resolve localhost port
> > 844000 : Name or service not known
> > [00007fd7e8001610] http stream error: cannot connect to localhost:844000
>
> And here it reports that it is trying to connect to port 844000 instead
> of the 8000 that is in the request that you showed.
>
> > [00007fd7f4000c80] main input error: VLC is unable to open the MRL
> > 'http://localhost:844000/live/surveillance.m3u8'. Check the log for
> > details.
>
> What part of the system turned
>
> "cvlc http://localhost:8000/live/surveillance.m3u8" into a request for
> http://localhost:844000/live/surveillance.m3u8?
>
> Perhaps "tcpdump" the port-8000 traffic to see if there is something
> about 844000 in the response? The "ffplay" output did not indicate any
> issue like that, though.
>
> Good luck with it,

Thanks a lot for your notes and suggestions.

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

$ 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

I'm not sure if these messages harm.

Regards
--
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Polytechnic University of Science and Technology engineering
NO. 552 North Gangtie Road, Xingtai, China
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Failed to publish a HLS stream via the nginx HTTPS server with ffmpeg.

Hongyi Zhao February 03, 2021 08:20PM

Re: Failed to publish a HLS stream via the nginx HTTPS server with ffmpeg.

Maxim Dounin February 03, 2021 09:04PM

Re: Failed to publish a HLS stream via the nginx HTTPS server with ffmpeg.

Hongyi Zhao February 03, 2021 09:26PM

Re: Failed to publish a HLS stream via the nginx HTTPS server with ffmpeg.

Francis Daly February 04, 2021 05:18AM

Re: Failed to publish a HLS stream via the nginx HTTPS server with ffmpeg.

Hongyi Zhao February 05, 2021 09:46AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 259
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready