Welcome! Log In Create A New Profile

Advanced

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

Francis Daly
February 04, 2021 05:18AM
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,

f
--
Francis Daly francis@daoine.org
_______________________________________________
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: 285
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