SSL Decrypt on youtube-dl

Issues related to applications and software problems and general support
owl102
Posts: 413
Joined: 2014/06/10 19:13:41

Re: SSL Decrypt on youtube-dl

Post by owl102 » 2020/07/01 19:31:35

Maybe this is the problem:
amir385276 wrote:
2020/07/01 19:27:31
[download] Resuming download at byte 523264
Have you tried removing the incomplete download first, so youtube-dl will do a fresh download of the video?
German speaking forum for Fedora and CentOS: https://www.fedoraforum.de/

amir385276
Posts: 73
Joined: 2019/08/09 20:54:52

Re: SSL Decrypt on youtube-dl

Post by amir385276 » 2020/07/01 19:35:01

Yes i remove the incomplete video and try again
but the issue is exist

please see the pic
i.is.cc/11WrOoBO.jpg

thanks

amir385276
Posts: 73
Joined: 2019/08/09 20:54:52

Re: SSL Decrypt on youtube-dl

Post by amir385276 » 2020/07/01 20:46:42

Hi everybody
and i try more than 20 times to download one video files
my vps in the USA and centos 8

# openssl s_client -connect https://www.viki.com/videos/1167645v-yo ... -episode-3
140125446317888:error:2008F002:BIO routines:BIO_lookup_ex:system lib:crypto/bio/b_addr.c:710:Servname not supported for ai_socktype
connect:errno=0
#
and then
# youtube-dl --verbose -f480p-https --write-sub --sub-format srt --sub-lang en https://www.viki.com/videos/1167645v-yo ... -episode-3
[debug] System config: ['--prefer-free-formats']
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', '-f480p-https', '--write-sub', '--sub-format', 'srt', '--sub-lang', 'en', 'https://www.viki.com/videos/1167645v-yo ... -episode-3']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.06.16.1
[debug] Python version 3.6.8 (CPython) - Linux-4.18.0-193.6.3.el8_2.x86_64-x86_64-with-centos-8.2.2004-Core
[debug] exe versions: none
[debug] Proxy map: {}
[viki] 1167645v: Downloading video JSON
[viki] 1167645v: Downloading video streams JSON
[info] Writing video subtitles to: You Are My Destiny - Episode 3-1167645v.en.srt
[debug] Invoking downloader on 'https://v4.viki.io/1167645v/1167645v_hi ... 13a475d3e4'
[download] Resuming download at byte 53210707
[download] Destination: You Are My Destiny - Episode 3-1167645v.mp4
[download] 29.1% of 226.18MiB at 1.43MiB/s ETA 01:51ERROR: unable to download video data: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2354)
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/youtube_dl/YoutubeDL.py", line 1926, in process_info
success = dl(filename, info_dict)
File "/usr/local/lib/python3.6/site-packages/youtube_dl/YoutubeDL.py", line 1865, in dl
return fd.download(name, info)
File "/usr/local/lib/python3.6/site-packages/youtube_dl/downloader/common.py", line 366, in download
return self.real_download(filename, info_dict)
File "/usr/local/lib/python3.6/site-packages/youtube_dl/downloader/http.py", line 342, in real_download
return download()
File "/usr/local/lib/python3.6/site-packages/youtube_dl/downloader/http.py", line 230, in download
data_block = ctx.data.read(block_size if data_len is None else min(block_size, data_len - byte_counter))
File "/usr/lib64/python3.6/http/client.py", line 459, in read
n = self.readinto(b)
File "/usr/lib64/python3.6/http/client.py", line 503, in readinto
n = self.fp.readinto(b)
File "/usr/lib64/python3.6/socket.py", line 586, in readinto
return self._sock.recv_into(b)
File "/usr/lib64/python3.6/ssl.py", line 971, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib64/python3.6/ssl.py", line 833, in read
return self._sslobj.read(len, buffer)
File "/usr/lib64/python3.6/ssl.py", line 590, in read
v = self._sslobj.read(len, buffer)
ssl.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2354)


why??????????????????????

bonedome
Posts: 201
Joined: 2017/04/22 08:11:04

Re: SSL Decrypt on youtube-dl

Post by bonedome » 2020/07/01 22:17:04

I haven't been following this thread entirely so excuse me if this has been mentioned before
my vps in the USA and centos 8
I'm wondering if the vps is the problem here and how it connects to the net.
[download] 29.1% of 226.18MiB at 1.43MiB/s
this seems very slow to me, maybe the website has a minimum speed limit, in order to provide a continuous stream.
I have just watched the video url with mpv (well I skipped to the end anyway) which played fine.

Code: Select all

mpv https://www.viki.com/videos/1167645v-you-are-my-destiny-episode-3
mpv uses youtube-dl for this and is available from rpmfusion, can you watch the whole video to the end this way.
Alternatively you could install the firefox addon VideoDownloadHelper and download from the website that way.

amir385276
Posts: 73
Joined: 2019/08/09 20:54:52

Re: SSL Decrypt on youtube-dl

Post by amir385276 » 2020/07/01 22:31:35

bonedome wrote:
2020/07/01 22:17:04
I haven't been following this thread entirely so excuse me if this has been mentioned before
my vps in the USA and centos 8
I'm wondering if the vps is the problem here and how it connects to the net.
[download] 29.1% of 226.18MiB at 1.43MiB/s
this seems very slow to me, maybe the website has a minimum speed limit, in order to provide a continuous stream.
I have just watched the video url with mpv (well I skipped to the end anyway) which played fine.

Code: Select all

mpv https://www.viki.com/videos/1167645v-you-are-my-destiny-episode-3
mpv uses youtube-dl for this and is available from rpmfusion, can you watch the whole video to the end this way.
Alternatively you could install the firefox addon VideoDownloadHelper and download from the website that way.
Hi Bonedome
I have a VPS from ColoUP in the USA and the connection is full speed
but i guess maybe my connection have a problem
in the firefox the video playing good

i have some question
1- if youtube-dl working with openssl, why when i remove the openssl from my VPS the youtube-dl working better, but the issue is exist?
2- if my DB server have a limited traffic on my vps how to check it and report it?
3- i guess the viki.com reduce my traffic on my IP - d oyou know the openssl have a cmd to check it?

Thanks

amir385276
Posts: 73
Joined: 2019/08/09 20:54:52

Re: SSL Decrypt on youtube-dl

Post by amir385276 » 2020/07/01 22:39:30

I test some commands on viki.com

when i try to download 20 videos in the same command some time youtube-dl downloading all of them some time don't downloading

and i must be try try try more time

but if i space between two commands (2 or 3 minutes) the youtube-dl working fine
i wanna to know how to set max connection time on youtube-dl or
how to find the openssl config file on centos 8?

Thanks everybody

Post Reply