Opened 10 years ago
Closed 8 years ago
#3845 closed defect (fixed)
[tls @ 0x7fb64af13f20] error:00000000:lib(0):func(0):reason(0) at the end of a WebM file through HTTPS
Reported by: | viperfx | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | git-master | Keywords: | tls http mkv |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
Summary of the bug:
Near the end of a WebM file that is opened through HTTPS connection an error occurs with the following:
[tls @ 0x7fb64af13f20] error:00000000:lib(0):func(0):reason(0)
How to reproduce: (You must follow these steps to obtain the HTTPS link to reproduce the error)
Obtain the youtube audio stream link using youtube-dl (https://github.com/rg3/youtube-dl) % youtube-dl -f 171 -g YOUTUBE_URL where YOUTUBE_URL is the url of any youtube video. The youtube-dl command will print out a long URL string that you can input to FFmpeg or ffplay to notice the issue, it will be an HTTPS URL. % ffmpeg -i "STREAM_URL" or % ffplay "STREAM_URL" Towards the end of the playback you should get the TLS error. My FFmpeg info: ffmpeg version 2.2.1 Copyright (c) 2000-2014 the FFmpeg developers built on Aug 9 2014 10:03:55 with Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) configuration: --prefix=/usr/local/Cellar/ffmpeg/2.2.1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid --enable-ffplay --enable-libfdk-aac --enable-openssl libavutil 52. 66.100 / 52. 66.100 libavcodec 55. 52.102 / 55. 52.102 libavformat 55. 33.100 / 55. 33.100 libavdevice 55. 10.100 / 55. 10.100 libavfilter 4. 2.100 / 4. 2.100 libavresample 1. 2. 0 / 1. 2. 0 libswscale 2. 5.102 / 2. 5.102 libswresample 0. 18.100 / 0. 18.100 libpostproc 52. 3.100 / 52. 3.100 Output of a typical audio stream: Input #0, matroska,webm, from 'URL': Metadata: encoder : google Duration: 00:04:00.62, start: 0.000000, bitrate: 108 kb/s Stream #0:0(eng): Audio: vorbis, 44100 Hz, stereo, fltp (default)
Change History (18)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Yes, I have compiled FFmpeg with HEAD and the error still occurs.
ffplay version 2.3.git Copyright (c) 2003-2014 the FFmpeg developers built on Aug 11 2014 10:26:03 with Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) configuration: --prefix=/usr/local/Cellar/ffmpeg/HEAD --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid --enable-ffplay --enable-libfdk-aac --enable-openssl libavutil 54. 1.100 / 54. 1.100 libavcodec 56. 0.100 / 56. 0.100 libavformat 56. 0.100 / 56. 0.100 libavdevice 56. 0.100 / 56. 0.100 libavfilter 5. 0.100 / 5. 0.100 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 0.100 / 3. 0.100 libswresample 1. 0.100 / 1. 0.100 libpostproc 53. 0.100 / 53. 0.100 Input #0, matroska,webm, from 'URL': Metadata: encoder : google Duration: 00:04:34.56, start: 0.000000, bitrate: 130 kb/s Stream #0:0(eng): Audio: vorbis, 44100 Hz, stereo, fltp (default) [tls @ 0x7f9b69707580] error:00000000:lib(0):func(0):reason(0)0/0
follow-up: 4 comment:3 by , 10 years ago
Is the problem only reproducible with ffplay
or also with ffmpeg
? ffplay
depends on an external library that is known to contain bugs and ffplay
issues are generally far more difficult to reproduce, please only report ffplay
problems if they are not reproducible with ffmpeg
.
comment:4 by , 10 years ago
Replying to cehoyos:
Is the problem only reproducible with
ffplay
or also withffmpeg
?ffplay
depends on an external library that is known to contain bugs andffplay
issues are generally far more difficult to reproduce, please only reportffplay
problems if they are not reproducible withffmpeg
.
Would encoding the stream to an mp3 be enough proof?
ffmpeg -i URL -acodec libmp3lame -q:a 2 -f mp3 - > test.mp3
With that command I get the following output:
ffmpeg -i "URL" -acodec libmp3lame -q:a 2 -f mp3 - > test.mp3 ffmpeg version 2.3.git Copyright (c) 2000-2014 the FFmpeg developers built on Aug 11 2014 10:26:03 with Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) configuration: --prefix=/usr/local/Cellar/ffmpeg/HEAD --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid --enable-ffplay --enable-libfdk-aac --enable-openssl libavutil 54. 1.100 / 54. 1.100 libavcodec 56. 0.100 / 56. 0.100 libavformat 56. 0.100 / 56. 0.100 libavdevice 56. 0.100 / 56. 0.100 libavfilter 5. 0.100 / 5. 0.100 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 0.100 / 3. 0.100 libswresample 1. 0.100 / 1. 0.100 libpostproc 53. 0.100 / 53. 0.100 Input #0, matroska,webm, from 'URL': Metadata: encoder : google Duration: 00:04:34.56, start: 0.000000, bitrate: 130 kb/s Stream #0:0(eng): Audio: vorbis, 44100 Hz, stereo, fltp (default) Output #0, mp3, to 'pipe:': Metadata: TSSE : Lavf56.0.100 Stream #0:0(eng): Audio: mp3 (libmp3lame), 44100 Hz, stereo, fltp (default) Metadata: encoder : Lavc56.0.100 libmp3lame Stream mapping: Stream #0:0 -> #0:0 (vorbis (native) -> mp3 (libmp3lame)) Press [q] to stop, [?] for help size= 6368kB time=00:04:34.60 bitrate= 190.0kbits/s video:0kB audio:6368kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000675%
It does not seem to be an issue when encoding.
comment:5 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I was using OpenSSL on 1.0.1g on iOS. Compiling FFmpeg (HEAD) with the latest openssl (1.0.1i) seems to have fixed it for me on iOS.
comment:6 by , 10 years ago
Resolution: | fixed → invalid |
---|---|
Version: | 2.2.4 → git-master |
comment:7 by , 10 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
It seems that the issue is not fixed. After some extended testing I still get this error.
I am using FFmpeg (HEAD) with the latest openssl (1.0.1i).
follow-up: 9 comment:8 by , 10 years ago
Then please provide your ffmpeg
command line including complete, uncut console output.
comment:9 by , 10 years ago
Replying to cehoyos:
Then please provide your
ffmpeg
command line including complete, uncut console output.
Using which command?
comment:11 by , 10 years ago
Replying to cehoyos:
Is the problem only reproducible on iOS?
Well on command line I was not able to reproduce it, when I encoded the file to another format. On iOS, yes I that error occurs sometimes towards the end of a playback.
comment:12 by , 10 years ago
If the problem is reproducible with ffplay
but not ffmpeg
, please provide the ffplay
command line (current FFmpeg git head) together with the complete uncut console output.
comment:13 by , 10 years ago
Here is the flags I compile ffmpeg with for iOS. I am using the latest snapshot and using openssl v1.0.1i
./configure --disable-programs --disable-shared --enable-static --enable-pic --enable-small --enable-openssl ${DEBUG_CONFIG_ARGS} \ --disable-decoders --enable-decoder=aac --enable-decoder=h264 --enable-decoder=vorbis \ --disable-encoders --enable-encoder=aac \ --disable-demuxers --enable-demuxer=aac --enable-demuxer=mov --enable-demuxer=matroska --enable-demuxer=h264 \ --disable-muxers --enable-muxer=mov --enable-muxer=mp4 --enable-muxer=hls --enable-muxer=h264 \ --disable-filters --disable-doc
Here is the output using ffplay
$ ffplay "https://r3---sn-u5a3u5a3-ajtz.googlevideo.com/videoplayback?gcr=gb&upn=GSnTpgPXqh4&source=youtube&fexp=902408%2C904724%2C923346%2C927622%2C931983%2C934024%2C934030%2C941415%2C946012&mws=yes&lmt=1394439266170970&expire=1407797900&dur=240.621&ms=au&ipbits=0&sver=3&sparams=clen%2Cdur%2Cgcr%2Cgir%2Cid%2Cip%2Cipbits%2Citag%2Clmt%2Crequiressl%2Csource%2Cupn%2Cexpire&mv=m&mt=1407776233&key=yt5&gir=yes&requiressl=yes&ip=85.210.155.249&itag=171&clen=3264561&mm=31&id=o-AI6SFCI3O9ZAesd5gmWqRO0Z7xJDcKz3GTFV22GsNZki&signature=E514B8F316DB6DC334366F0EAD65C140724E451D.EB6D203C0F267800F6ED711D67FB878BF745732B&ratebypass=yes" ffplay version 2.3.git Copyright (c) 2003-2014 the FFmpeg developers built on Aug 11 2014 10:26:03 with Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) configuration: --prefix=/usr/local/Cellar/ffmpeg/HEAD --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid --enable-ffplay --enable-libfdk-aac --enable-openssl libavutil 54. 1.100 / 54. 1.100 libavcodec 56. 0.100 / 56. 0.100 libavformat 56. 0.100 / 56. 0.100 libavdevice 56. 0.100 / 56. 0.100 libavfilter 5. 0.100 / 5. 0.100 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 0.100 / 3. 0.100 libswresample 1. 0.100 / 1. 0.100 libpostproc 53. 0.100 / 53. 0.100 Input #0, matroska,webm, from 'https://r3---sn-u5a3u5a3-ajtz.googlevideo.com/videoplayback?gcr=gb&upn=GSnTpgPXqh4&source=youtube&fexp=902408%2C904724%2C923346%2C927622%2C931983%2C934024%2C934030%2C941415%2C946012&mws=yes&lmt=1394439266170970&expire=1407797900&dur=240.621&ms=au&ipbits=0&sver=3&sparams=clen%2Cdur%2Cgcr%2Cgir%2Cid%2Cip%2Cipbits%2Citag%2Clmt%2Crequiressl%2Csource%2Cupn%2Cexpire&mv=m&mt=1407776233&key=yt5&gir=yes&requiressl=yes&ip=85.210.155.249&itag=171&clen=3264561&mm=31&id=o-AI6SFCI3O9ZAesd5gmWqRO0Z7xJDcKz3GTFV22GsNZki&signature=E514B8F316DB6DC334366F0EAD65C140724E451D.EB6D203C0F267800F6ED711D67FB878BF745732B&ratebypass=yes': Metadata: encoder : google Duration: 00:04:00.62, start: 0.000000, bitrate: 108 kb/s Stream #0:0(eng): Audio: vorbis, 44100 Hz, stereo, fltp (default) [tls @ 0x7fce00737f40] error:00000000:lib(0):func(0):reason(0)0/0
follow-up: 15 comment:14 by , 10 years ago
I see a similar problem with tls, -autoexit
didn't work:
$ ffplay -autoexit "https://r4---sn-bvvbax-8pxe.googlevideo.com/videoplayback?itag=171&mws=yes&mt=1407784028&clen=3517500&sver=3&lmt=1392577165969919&signature=0D0BD8B88F84BA006DA9BDEC7FEB946D978D56F0.6E39194558775D891DBCF30EB50D6E166EBF0F12&sparams=clen%2Cdur%2Cgcr%2Cgir%2Cid%2Cip%2Cipbits%2Citag%2Clmt%2Crequiressl%2Csource%2Cupn%2Cexpire&ipbits=0&mv=m&ms=au&requiressl=yes&source=youtube&fexp=902408%2C927622%2C927894%2C930657%2C931983%2C934024%2C934030%2C937432%2C943908%2C945035%2C946013&gcr=at&upn=3KY97TSgiI0&dur=252.222&ip=84.114.78.119&mm=31&gir=yes&key=yt5&expire=1407805695&id=o-APBb1hr8cgnHFmIl1jqTZtUgs6HFFest6fIF4RFfToUB&ratebypass=yes" ffplay version N-65523-g9a16214 Copyright (c) 2003-2014 the FFmpeg developers built on Aug 11 2014 20:58:53 with gcc 4.7 (SUSE Linux) configuration: --enable-gnutls libavutil 54. 1.100 / 54. 1.100 libavcodec 56. 0.100 / 56. 0.100 libavformat 56. 0.100 / 56. 0.100 libavdevice 56. 0.100 / 56. 0.100 libavfilter 5. 0.100 / 5. 0.100 libswscale 3. 0.100 / 3. 0.100 libswresample 1. 0.100 / 1. 0.100 Input #0, matroska,webm, from 'https://r4---sn-bvvbax-8pxe.googlevideo.com/videoplayback?itag=171&mws=yes&mt=1407784028&clen=3517500&sver=3&lmt=1392577165969919&signature=0D0BD8B88F84BA006DA9BDEC7FEB946D978D56F0.6E39194558775D891DBCF30EB50D6E166EBF0F12&sparams=clen%2Cdur%2Cgcr%2Cgir%2Cid%2Cip%2Cipbits%2Citag%2Clmt%2Crequiressl%2Csource%2Cupn%2Cexpire&ipbits=0&mv=m&ms=au&requiressl=yes&source=youtube&fexp=902408%2C927622%2C927894%2C930657%2C931983%2C934024%2C934030%2C937432%2C943908%2C945035%2C946013&gcr=at&upn=3KY97TSgiI0&dur=252.222&ip=84.114.78.119&mm=31&gir=yes&key=yt5&expire=1407805695&id=o-APBb1hr8cgnHFmIl1jqTZtUgs6HFFest6fIF4RFfToUB&ratebypass=yes': Metadata: encoder : google Duration: 00:04:12.22, start: 0.000000, bitrate: 111 kb/s Stream #0:0(eng): Audio: vorbis, 44100 Hz, stereo, fltp (default) [tls @ 0x7f0408002d80] The TLS connection was non-properly terminated. [tls @ 0x7f0408002d80] The specified session has been invalidated for some reason. 269.22 M-A: 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
comment:15 by , 10 years ago
Replying to cehoyos:
I see a similar problem with tls,
-autoexit
didn't work:
$ ffplay -autoexit "https://r4---sn-bvvbax-8pxe.googlevideo.com/videoplayback?itag=171&mws=yes&mt=1407784028&clen=3517500&sver=3&lmt=1392577165969919&signature=0D0BD8B88F84BA006DA9BDEC7FEB946D978D56F0.6E39194558775D891DBCF30EB50D6E166EBF0F12&sparams=clen%2Cdur%2Cgcr%2Cgir%2Cid%2Cip%2Cipbits%2Citag%2Clmt%2Crequiressl%2Csource%2Cupn%2Cexpire&ipbits=0&mv=m&ms=au&requiressl=yes&source=youtube&fexp=902408%2C927622%2C927894%2C930657%2C931983%2C934024%2C934030%2C937432%2C943908%2C945035%2C946013&gcr=at&upn=3KY97TSgiI0&dur=252.222&ip=84.114.78.119&mm=31&gir=yes&key=yt5&expire=1407805695&id=o-APBb1hr8cgnHFmIl1jqTZtUgs6HFFest6fIF4RFfToUB&ratebypass=yes" ffplay version N-65523-g9a16214 Copyright (c) 2003-2014 the FFmpeg developers built on Aug 11 2014 20:58:53 with gcc 4.7 (SUSE Linux) configuration: --enable-gnutls libavutil 54. 1.100 / 54. 1.100 libavcodec 56. 0.100 / 56. 0.100 libavformat 56. 0.100 / 56. 0.100 libavdevice 56. 0.100 / 56. 0.100 libavfilter 5. 0.100 / 5. 0.100 libswscale 3. 0.100 / 3. 0.100 libswresample 1. 0.100 / 1. 0.100 Input #0, matroska,webm, from 'https://r4---sn-bvvbax-8pxe.googlevideo.com/videoplayback?itag=171&mws=yes&mt=1407784028&clen=3517500&sver=3&lmt=1392577165969919&signature=0D0BD8B88F84BA006DA9BDEC7FEB946D978D56F0.6E39194558775D891DBCF30EB50D6E166EBF0F12&sparams=clen%2Cdur%2Cgcr%2Cgir%2Cid%2Cip%2Cipbits%2Citag%2Clmt%2Crequiressl%2Csource%2Cupn%2Cexpire&ipbits=0&mv=m&ms=au&requiressl=yes&source=youtube&fexp=902408%2C927622%2C927894%2C930657%2C931983%2C934024%2C934030%2C937432%2C943908%2C945035%2C946013&gcr=at&upn=3KY97TSgiI0&dur=252.222&ip=84.114.78.119&mm=31&gir=yes&key=yt5&expire=1407805695&id=o-APBb1hr8cgnHFmIl1jqTZtUgs6HFFest6fIF4RFfToUB&ratebypass=yes': Metadata: encoder : google Duration: 00:04:12.22, start: 0.000000, bitrate: 111 kb/s Stream #0:0(eng): Audio: vorbis, 44100 Hz, stereo, fltp (default) [tls @ 0x7f0408002d80] The TLS connection was non-properly terminated. [tls @ 0x7f0408002d80] The specified session has been invalidated for some reason. 269.22 M-A: 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
So this is a confirmed bug? Can the ticket be updated so someone may look into the issue?
comment:17 by , 9 years ago
I can reproduce with latest trunk on Linux with gnutls 3.4.8:
λ ffplay-head https://www.youtube.com/watch?v=SdaR8VBh_F0
ffplay version N-78269-gc1b23e1 Copyright (c) 2003-2016 the FFmpeg developers
built with gcc 5 (SUSE Linux)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --extra-cflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g' --optflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g' --disable-htmlpages --enable-pic --disable-stripping --disable-shared --enable-static --enable-runtime-cpudetect --enable-gpl --disable-openssl --enable-avresample --enable-libcdio --enable-libdc1394 --enable-gnutls --enable-libass --enable-libbluray --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libvorbis --enable-libvpx --enable-libwebp --enable-pic --enable-pthreads --enable-vaapi --enable-vdpau --disable-decoder=dca --enable-libdcadec --enable-libmp3lame --enable-version3 --enable-libx264 --enable-libx265 --enable-x11grab
libavutil 55. 17.100 / 55. 17.100
libavcodec 57. 24.101 / 57. 24.101
libavformat 57. 24.100 / 57. 24.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 28.100 / 6. 28.100
libavresample 3. 0. 0 / 3. 0. 0
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
[tls @ 0x292ccc0] The TLS connection was non-properly terminated.
https://www.youtube.com/watch?v=SdaR8VBh_F0: Input/output error
comment:18 by , 8 years ago
Component: | undetermined → avformat |
---|---|
Keywords: | tls http mkv added; openssl webm removed |
Reproduced by developer: | set |
Resolution: | → fixed |
Status: | reopened → closed |
Fixed by Martin Storsjö since 9f7a2ecb (2.4).
Is this problem reproducible with current FFmpeg git head?
To make this a valid ticket, please provide the complete, uncut console output of the current version.