Opened 7 years ago

Closed 7 years ago

Last modified 4 years ago

#5915 closed defect (fixed)

ffmpeg compiled with openssl on https hls stream fails but works if compiled with gnutls

Reported by: marantz Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: libopenssl
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
How to reproduce:

compile with --enable-openssl and run the following command

ffmpeg -i https://valizadeh.se/sassatv/index.m3u8 output.mkv

and it will fail with ffmpeg[45A153A0]: [tls] error:00000000:lib(0):func(0):reason(0)

using --enable-gnutls and it will work.

Tested on ubuntu compiling against 1.0.2g-1ubuntu4.5

Same problem happens on libreelec using libressl 2.3.8 as well.

ffmpeg version N-82143-gbf14393 Copyright (c) 2000-2016 the FFmpeg developers

built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.2) 20160609

is the version I used to test on ubuntu with.

Note that other programs such as curl and wget which is built with openssl works fine on this site, it has nothing special.

Change History (5)

comment:1 by Carl Eugen Hoyos, 7 years ago

Component: ffmpegundetermined
Priority: importantnormal
Version: unspecifiedgit-master

Please provide the command line you tested together with the complete, uncut console output to make this a valid ticket.

comment:2 by jkqxz, 7 years ago

Built from 077939626eeaa0c1364065414c18ab9b3a072281, OpenSSL is 1.0.2g in Ubuntu 16.04.

$ ./ffmpeg_g -v trace -i 'https://valizadeh.se/sassatv/index.m3u8' out.mkv
ffmpeg version N-58743-g0779396 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.2) 20160609
  configuration: --enable-openssl
  libavutil      55. 35.100 / 55. 35.100
  libavcodec     57. 65.100 / 57. 65.100
  libavformat    57. 57.100 / 57. 57.100
  libavdevice    57.  2.100 / 57.  2.100
  libavfilter     6. 66.100 /  6. 66.100
  libswscale      4.  3.100 /  4.  3.100
  libswresample   2.  4.100 /  2.  4.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'trace'.
Reading option '-i' ... matched as input file with argument 'https://valizadeh.se/sassatv/index.m3u8'.
Reading option 'out.mkv' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument trace.
Successfully parsed a group of options.
Parsing a group of options: input file https://valizadeh.se/sassatv/index.m3u8.
Successfully parsed a group of options.
Opening an input file: https://valizadeh.se/sassatv/index.m3u8.
[https @ 0x3734be0] Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy'
[tls @ 0x37366a0] error:00000000:lib(0):func(0):reason(0)
https://valizadeh.se/sassatv/index.m3u8: Input/output error

comment:3 by marantz, 7 years ago

Here is a patch that fixes it. Made by vpeter of the LibreELEC project.
http://vpeter.libreelec.tv/tmp/ffmpeg-tls-1.2.patch

comment:4 by jkqxz, 7 years ago

Resolution: fixed
Status: newclosed
Last edited 7 years ago by Carl Eugen Hoyos (previous) (diff)

comment:5 by Carl Eugen Hoyos, 4 years ago

Keywords: libopenssl added; ssl openssl removed
Note: See TracTickets for help on using tickets.