acgnhiki / blrec

Bilibili Live Streaming Recorder 哔哩哔哩直播录制
GNU General Public License v3.0
595 stars 41 forks source link

无法录制 #275

Closed Karmylr closed 4 months ago

Karmylr commented 4 months ago

Logs:

2024-07-02 11:39:00.006 | INFO | application:223 |  - Disabling recorder for task 30328665...
2024-07-02 11:39:00.007 | DEBUG | task_manager:201 |  - Disabling recorder for task 30328665...
2024-07-02 11:39:00.007 | DEBUG | recorder:454 | 30328665 - Stopped recorder
2024-07-02 11:39:00.008 | DEBUG | postprocessor:143 | 30328665 - Stopped postprocessor
2024-07-02 11:39:00.008 | DEBUG | task_manager:204 |  - Disabled recorder for task 30328665
2024-07-02 11:39:00.012 | INFO | application:226 |  - Successfully disabled recorder for task 30328665
2024-07-02 11:39:01.848 | INFO | application:217 |  - Enabling recorder for task 30328665...
2024-07-02 11:39:01.849 | DEBUG | task_manager:195 |  - Enabling recorder for task 30328665...
2024-07-02 11:39:01.850 | DEBUG | postprocessor:129 | 30328665 - Started postprocessor
2024-07-02 11:39:01.850 | DEBUG | recorder:439 | 30328665 - Started recorder
2024-07-02 11:39:01.851 | INFO | recorder:537 | 30328665 - 
================================== User Info ==================================
user id          : 519114621
user name        : 玩機器cs2
gender           : 保密
---------------------------------- Room Info ----------------------------------
title            : fuseon vs chair
cover            : https://i0.hdslb.com/bfs/live/new_room_cover/9f33cae214f964932a7eda4d090237b310e2a328.jpg
online           : 0
live status      : LIVE
live start time  : 2024-07-02 11:34:13
room id          : 30328665
short room id    : NULL
area id          : 216
area name        : 我的世界
parent area id   : 6
parent area name : 单机游戏
tags             : 
description      :

===============================================================================

2024-07-02 11:39:02.577 | DEBUG | segment_fetcher:187 | 30328665 - Failed to fetch segment https://d1--cn-gotcha204-3.bilivideo.com/live-bvc/818937/live_519114621_57129813/h1719891260.m4s: ReadTimeout(ReadTimeoutError("HTTPSConnectionPool(host='d1--cn-gotcha204-3.bilivideo.com', port=443): Read timed out. (read timeout=5)"))
2024-07-02 11:39:13.458 | DEBUG | metadata_dumper:39 | 30328665 - Disabled metadata dumper
2024-07-02 11:39:13.459 | DEBUG | stream_recorder_impl:302 | 30328665 - Stopped stream recorder
2024-07-02 11:39:13.461 | DEBUG | danmaku_dumper:105 | 30328665 - Disabled danmaku dumper
2024-07-02 11:39:13.461 | DEBUG | danmaku_receiver:33 | 30328665 - Stopped danmaku receiver
2024-07-02 11:39:13.462 | DEBUG | cover_downloader:69 | 30328665 - Disabled cover downloader
2024-07-02 11:39:13.462 | INFO | recorder:494 | 30328665 - Recording Finished
2024-07-02 11:39:13.463 | INFO | stream_recorder:253 | 30328665 - Waiting for the fmp4 stream becomes available...
2024-07-02 11:39:13.571 | DEBUG | segment_fetcher:187 | 30328665 - Failed to fetch segment https://d1--cn-gotcha204-3.bilivideo.com/live-bvc/818937/live_519114621_57129813/h1719891260.m4s: ConnectionError(ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')))
2024-07-02 11:39:14.896 | DEBUG | stream_recorder_impl:287 | 30328665 - Starting stream recorder...
2024-07-02 11:39:14.897 | DEBUG | metadata_dumper:32 |  - Enabled metadata dumper
2024-07-02 11:39:14.899 | DEBUG | stream_recorder_impl:291 | 30328665 - Started stream recorder
2024-07-02 11:39:14.899 | INFO | recorder:473 | 30328665 - Started recording
2024-07-02 11:39:14.900 | DEBUG | task_manager:198 |  - Enabled recorder for task 30328665
2024-07-02 11:39:14.908 | INFO | application:220 |  - Successfully enabled recorder for task 30328665
2024-07-02 11:39:14.912 | INFO | stream_url_resolver:94 | 30328665 - Getting the live stream url... qn: 10000, format: fmp4, api platform: web, use alternative stream: False
2024-07-02 11:39:15.019 | INFO | stream_url_resolver:113 | 30328665 - Got live stream url: 'https://d1--cn-gotcha204-3.bilivideo.com/live-bvc/836271/live_519114621_57129813/index.m3u8?expires=1719895214&len=0&oi=3701481020&pt=web&qn=10000&trid=10072f45eaea78194beaa6b90e00b9f99e29&sigparams=cdn,expires,len,oi,pt,qn,trid&cdn=cn-gotcha204&sign=df64b13598787d5f2c8b3ba79f3eb6d3&sk=7657046e629b88e4adffc06088313215&p2p_type=1&sl=1&free_type=0&mid=1447801676&source=onetier&trace=10&site=593fb6bd10ba5d411239f9902b982cab&order=2'
2024-07-02 11:39:15.020 | INFO | playlist_fetcher:48 | 30328665 - Fetching playlist... https://d1--cn-gotcha204-3.bilivideo.com/live-bvc/836271/live_519114621_57129813/index.m3u8?expires=1719895214&len=0&oi=3701481020&pt=web&qn=10000&trid=10072f45eaea78194beaa6b90e00b9f99e29&sigparams=cdn,expires,len,oi,pt,qn,trid&cdn=cn-gotcha204&sign=df64b13598787d5f2c8b3ba79f3eb6d3&sk=7657046e629b88e4adffc06088313215&p2p_type=1&sl=1&free_type=0&mid=1447801676&source=onetier&trace=10&site=593fb6bd10ba5d411239f9902b982cab&order=2
2024-07-02 11:39:20.060 | DEBUG | segment_fetcher:187 | 30328665 - Failed to fetch segment https://d1--cn-gotcha204-3.bilivideo.com/live-bvc/836271/live_519114621_57129813/h1719891260.m4s: ReadTimeout(ReadTimeoutError("HTTPSConnectionPool(host='d1--cn-gotcha204-3.bilivideo.com', port=443): Read timed out. (read timeout=5)"))
2024-07-02 11:39:23.335 | INFO | application:223 |  - Disabling recorder for task 30328665...
2024-07-02 11:39:23.336 | DEBUG | task_manager:201 |  - Disabling recorder for task 30328665...
2024-07-02 11:39:23.336 | DEBUG | stream_recorder_impl:294 | 30328665 - Stopping stream recorder...
2024-07-02 11:39:26.069 | DEBUG | segment_fetcher:187 | 30328665 - Failed to fetch segment https://d1--cn-gotcha204-3.bilivideo.com/live-bvc/836271/live_519114621_57129813/h1719891260.m4s: ReadTimeout(ReadTimeoutError("HTTPSConnectionPool(host='d1--cn-gotcha204-3.bilivideo.com', port=443): Read timed out. (read timeout=5)"))
2024-07-02 11:39:28.580 | DEBUG | segment_fetcher:187 | 30328665 - Failed to fetch segment https://d1--cn-gotcha204-3.bilivideo.com/live-bvc/818937/live_519114621_57129813/h1719891260.m4s: ReadTimeout(ReadTimeoutError("HTTPSConnectionPool(host='d1--cn-gotcha204-3.bilivideo.com', port=443): Read timed out. (read timeout=5)"))
2024-07-02 11:39:30.570 | DEBUG | segment_fetcher:187 | 30328665 - Failed to fetch segment https://d1--cn-gotcha204-3.bilivideo.com/live-bvc/836271/live_519114621_57129813/h1719891260.m4s: ConnectionError(ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')))
2024-07-02 11:39:39.577 | DEBUG | segment_fetcher:187 | 30328665 - Failed to fetch segment https://d1--cn-gotcha204-3.bilivideo.com/live-bvc/836271/live_519114621_57129813/h1719891260.m4s: ReadTimeout(ReadTimeoutError("HTTPSConnectionPool(host='d1--cn-gotcha204-3.bilivideo.com', port=443): Read timed out. (read timeout=5)"))
2024-07-02 11:39:43.590 | DEBUG | segment_fetcher:187 | 30328665 - Failed to fetch segment https://d1--cn-gotcha204-3.bilivideo.com/live-bvc/818937/live_519114621_57129813/h1719891260.m4s: ReadTimeout(ReadTimeoutError("HTTPSConnectionPool(host='d1--cn-gotcha204-3.bilivideo.com', port=443): Read timed out. (read timeout=5)"))
2024-07-02 11:39:43.594 | WARNING | segment_fetcher:146 | 30328665 - Failed to fetch segment: https://d1--cn-gotcha204-3.bilivideo.com/live-bvc/818937/live_519114621_57129813/h1719891260.m4s
Traceback (most recent call last):
  File "/root/blrec/.venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
               ^^^^^^^^^^^^^^^^^^
  File "/root/blrec/.venv/lib/python3.11/site-packages/urllib3/connection.py", line 464, in getresponse
    httplib_response = super().getresponse()
                       ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/http/client.py", line 1374, in getresponse
    response.begin()
  File "/usr/lib/python3.11/http/client.py", line 318, in begin
    version, status, reason = self._read_status()
                              ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/http/client.py", line 279, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/socket.py", line 706, in readinto
    return self._sock.recv_into(b)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/ssl.py", line 1278, in recv_into
    return self.read(nbytes, buffer)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/ssl.py", line 1134, in read
    return self._sslobj.read(len, buffer)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TimeoutError: The read operation timed out

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/root/blrec/.venv/lib/python3.11/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/root/blrec/.venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 843, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "/root/blrec/.venv/lib/python3.11/site-packages/urllib3/util/retry.py", line 474, in increment
    raise reraise(type(error), error, _stacktrace)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/blrec/.venv/lib/python3.11/site-packages/urllib3/util/util.py", line 39, in reraise
    raise value
  File "/root/blrec/.venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
               ^^^^^^^^^^^^^^^^^^^
  File "/root/blrec/.venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 538, in _make_request
    self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
  File "/root/blrec/.venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 369, in _raise_timeout
    raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='d1--cn-gotcha204-3.bilivideo.com', port=443): Read timed out. (read timeout=5)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/blrec/src/blrec/hls/operators/segment_fetcher.py", line 98, in on_next
    data = self._fetch_segment(url)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/blrec/.venv/lib/python3.11/site-packages/tenacity/__init__.py", line 336, in wrapped_f
    return copy(f, *args, **kw)
           ^^^^^^^^^^^^^^^^^^^^
  File "/root/blrec/.venv/lib/python3.11/site-packages/tenacity/__init__.py", line 475, in __call__
    do = self.iter(retry_state=retry_state)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/blrec/.venv/lib/python3.11/site-packages/tenacity/__init__.py", line 376, in iter
    result = action(retry_state)
             ^^^^^^^^^^^^^^^^^^^
  File "/root/blrec/.venv/lib/python3.11/site-packages/tenacity/__init__.py", line 418, in exc_check
    raise retry_exc.reraise()
          ^^^^^^^^^^^^^^^^^^^
  File "/root/blrec/.venv/lib/python3.11/site-packages/tenacity/__init__.py", line 185, in reraise
    raise self.last_attempt.result()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/root/blrec/.venv/lib/python3.11/site-packages/tenacity/__init__.py", line 478, in __call__
    result = fn(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^
  File "/root/blrec/src/blrec/hls/operators/segment_fetcher.py", line 184, in _fetch_segment
    response = self._session.get(url, headers=self._live.headers, timeout=5)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/blrec/.venv/lib/python3.11/site-packages/requests/sessions.py", line 602, in get
    return self.request("GET", url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/blrec/.venv/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/blrec/.venv/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/blrec/.venv/lib/python3.11/site-packages/requests/adapters.py", line 713, in send
    raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='d1--cn-gotcha204-3.bilivideo.com', port=443): Read timed out. (read timeout=5)

2024-07-02 11:39:48.669 | DEBUG | segment_fetcher:187 | 30328665 - Failed to fetch segment https://d1--cn-gotcha204-3.bilivideo.com/live-bvc/818937/live_519114621_57129813/h1719891260.m4s: ReadTimeout(ReadTimeoutError("HTTPSConnectionPool(host='d1--cn-gotcha204-3.bilivideo.com', port=443): Read timed out. (read timeout=5)"))
2024-07-02 11:39:50.573 | DEBUG | segment_fetcher:187 | 30328665 - Failed to fetch segment https://d1--cn-gotcha204-3.bilivideo.com/live-bvc/836271/live_519114621_57129813/h1719891260.m4s: ConnectionError(ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')))
2024-07-02 11:39:50.575 | DEBUG | segment_fetcher:187 | 30328665 - Failed to fetch segment https://d1--cn-gotcha204-3.bilivideo.com/live-bvc/818937/live_519114621_57129813/h1719891260.m4s: ConnectionError(ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')))
2024-07-02 11:39:54.388 | DEBUG | metadata_dumper:39 |  - Disabled metadata dumper
2024-07-02 11:39:54.389 | DEBUG | stream_recorder_impl:302 | 30328665 - Stopped stream recorder
2024-07-02 11:39:54.391 | INFO | recorder:491 | 30328665 - Recording Cancelled
2024-07-02 11:39:54.392 | DEBUG | recorder:454 | 30328665 - Stopped recorder
2024-07-02 11:39:54.392 | DEBUG | postprocessor:143 | 30328665 - Stopped postprocessor
2024-07-02 11:39:54.393 | DEBUG | task_manager:204 |  - Disabled recorder for task 30328665
2024-07-02 11:39:54.397 | INFO | application:226 |  - Successfully disabled recorder for task 30328665
2024-07-02 11:39:57.645 | DEBUG | segment_fetcher:187 | 30328665 - Failed to fetch segment https://d1--cn-gotcha204-3.bilivideo.com/live-bvc/818937/live_519114621_57129813/h1719891260.m4s: ReadTimeout(ReadTimeoutError("HTTPSConnectionPool(host='d1--cn-gotcha204-3.bilivideo.com', port=443): Read timed out. (read timeout=5)"))
2024-07-02 11:40:05.645 | DEBUG | segment_fetcher:187 | 30328665 - Failed to fetch segment https://d1--cn-gotcha204-3.bilivideo.com/live-bvc/836271/live_519114621_57129813/h1719891260.m4s: ReadTimeout(ReadTimeoutError("HTTPSConnectionPool(host='d1--cn-gotcha204-3.bilivideo.com', port=443): Read timed out. (read timeout=5)"))
2024-07-02 11:40:06.713 | DEBUG | segment_fetcher:187 | 30328665 - Failed to fetch segment https://d1--cn-gotcha204-3.bilivideo.com/live-bvc/818937/live_519114621_57129813/h1719891260.m4s: ReadTimeout(ReadTimeoutError("HTTPSConnectionPool(host='d1--cn-gotcha204-3.bilivideo.com', port=443): Read timed out. (read timeout=5)"))
2024-07-02 11:40:13.565 | INFO | application:223 |  - Disabling recorder for task 30328665...
2024-07-02 11:40:13.565 | DEBUG | task_manager:201 |  - Disabling recorder for task 30328665...
2024-07-02 11:40:13.566 | DEBUG | task_manager:204 |  - Disabled recorder for task 30328665
2024-07-02 11:40:13.569 | INFO | application:226 |  - Successfully disabled recorder for task 30328665
2024-07-02 11:40:17.398 | INFO | application:217 |  - Enabling recorder for task 30328665...
2024-07-02 11:40:17.399 | DEBUG | task_manager:195 |  - Enabling recorder for task 30328665...
2024-07-02 11:40:17.400 | DEBUG | postprocessor:129 | 30328665 - Started postprocessor
2024-07-02 11:40:17.400 | DEBUG | recorder:439 | 30328665 - Started recorder
2024-07-02 11:40:17.400 | INFO | recorder:537 | 30328665 - 
================================== User Info ==================================
user id          : 519114621
user name        : 玩機器cs2
gender           : 保密
---------------------------------- Room Info ----------------------------------
title            : fuseon vs chair
cover            : https://i0.hdslb.com/bfs/live/new_room_cover/9f33cae214f964932a7eda4d090237b310e2a328.jpg
online           : 0
live status      : LIVE
live start time  : 2024-07-02 11:34:13
room id          : 30328665
short room id    : NULL
area id          : 216
area name        : 我的世界
parent area id   : 6
parent area name : 单机游戏
tags             : 
description      :

===============================================================================

2024-07-02 11:40:17.401 | DEBUG | danmaku_dumper:99 | 30328665 - Enabled danmaku dumper
2024-07-02 11:40:17.401 | DEBUG | danmaku_receiver:28 | 30328665 - Started danmaku receiver
2024-07-02 11:40:17.402 | DEBUG | cover_downloader:65 | 30328665 - Enabled cover downloader
2024-07-02 11:40:17.402 | INFO | stream_recorder:253 | 30328665 - Waiting for the fmp4 stream becomes available...
2024-07-02 11:40:18.821 | DEBUG | stream_recorder_impl:287 | 30328665 - Starting stream recorder...
2024-07-02 11:40:18.822 | DEBUG | metadata_dumper:32 |  - Enabled metadata dumper
2024-07-02 11:40:18.824 | DEBUG | stream_recorder_impl:291 | 30328665 - Started stream recorder
2024-07-02 11:40:18.824 | INFO | recorder:473 | 30328665 - Started recording
2024-07-02 11:40:18.825 | DEBUG | task_manager:198 |  - Enabled recorder for task 30328665
2024-07-02 11:40:18.832 | INFO | application:220 |  - Successfully enabled recorder for task 30328665
2024-07-02 11:40:18.842 | INFO | stream_url_resolver:94 | 30328665 - Getting the live stream url... qn: 10000, format: fmp4, api platform: web, use alternative stream: False
2024-07-02 11:40:18.945 | INFO | stream_url_resolver:113 | 30328665 - Got live stream url: 'https://d1--cn-gotcha204.bilivideo.com/live-bvc/105512/live_519114621_57129813/index.m3u8?expires=1719895278&len=0&oi=3701481020&pt=web&qn=10000&trid=1007c7621403bac24eec91a61c0274c39279&sigparams=cdn,expires,len,oi,pt,qn,trid&cdn=cn-gotcha204&sign=45ceacbb3c7388e126dc515feeb91b43&sk=7657046e629b88e4adffc06088313215&p2p_type=1&sl=1&free_type=0&mid=1447801676&pp=srt&source=onetier&trace=10&site=b5f708eed560ccaa95ff362ba30576eb&order=2'
2024-07-02 11:40:18.946 | INFO | playlist_fetcher:48 | 30328665 - Fetching playlist... https://d1--cn-gotcha204.bilivideo.com/live-bvc/105512/live_519114621_57129813/index.m3u8?expires=1719895278&len=0&oi=3701481020&pt=web&qn=10000&trid=1007c7621403bac24eec91a61c0274c39279&sigparams=cdn,expires,len,oi,pt,qn,trid&cdn=cn-gotcha204&sign=45ceacbb3c7388e126dc515feeb91b43&sk=7657046e629b88e4adffc06088313215&p2p_type=1&sl=1&free_type=0&mid=1447801676&pp=srt&source=onetier&trace=10&site=b5f708eed560ccaa95ff362ba30576eb&order=2
2024-07-02 11:40:19.782 | DEBUG | segment_fetcher:187 | 30328665 - Failed to fetch segment https://d1--cn-gotcha204-3.bilivideo.com/live-bvc/818937/live_519114621_57129813/h1719891260.m4s: ReadTimeout(ReadTimeoutError("HTTPSConnectionPool(host='d1--cn-gotcha204-3.bilivideo.com', port=443): Read timed out. (read timeout=5)"))
2024-07-02 11:40:20.713 | DEBUG | segment_fetcher:187 | 30328665 - Failed to fetch segment https://d1--cn-gotcha204-3.bilivideo.com/live-bvc/836271/live_519114621_57129813/h1719891260.m4s: ReadTimeout(ReadTimeoutError("HTTPSConnectionPool(host='d1--cn-gotcha204-3.bilivideo.com', port=443): Read timed out. (read timeout=5)"))
2024-07-02 11:40:20.717 | WARNING | segment_fetcher:146 | 30328665 - Failed to fetch segment: https://d1--cn-gotcha204-3.bilivideo.com/live-bvc/836271/live_519114621_57129813/h1719891260.m4s
Traceback (most recent call last):
  File "/root/blrec/.venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
               ^^^^^^^^^^^^^^^^^^
  File "/root/blrec/.venv/lib/python3.11/site-packages/urllib3/connection.py", line 464, in getresponse
    httplib_response = super().getresponse()
                       ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/http/client.py", line 1374, in getresponse
    response.begin()
  File "/usr/lib/python3.11/http/client.py", line 318, in begin
    version, status, reason = self._read_status()
                              ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/http/client.py", line 279, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/socket.py", line 706, in readinto
    return self._sock.recv_into(b)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/ssl.py", line 1278, in recv_into
    return self.read(nbytes, buffer)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/ssl.py", line 1134, in read
    return self._sslobj.read(len, buffer)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TimeoutError: The read operation timed out

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/root/blrec/.venv/lib/python3.11/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/root/blrec/.venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 843, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "/root/blrec/.venv/lib/python3.11/site-packages/urllib3/util/retry.py", line 474, in increment
    raise reraise(type(error), error, _stacktrace)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/blrec/.venv/lib/python3.11/site-packages/urllib3/util/util.py", line 39, in reraise
    raise value
  File "/root/blrec/.venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
               ^^^^^^^^^^^^^^^^^^^
  File "/root/blrec/.venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 538, in _make_request
    self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
  File "/root/blrec/.venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 369, in _raise_timeout
    raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='d1--cn-gotcha204-3.bilivideo.com', port=443): Read timed out. (read timeout=5)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/blrec/src/blrec/hls/operators/segment_fetcher.py", line 98, in on_next
    data = self._fetch_segment(url)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/blrec/.venv/lib/python3.11/site-packages/tenacity/__init__.py", line 336, in wrapped_f
    return copy(f, *args, **kw)
           ^^^^^^^^^^^^^^^^^^^^
  File "/root/blrec/.venv/lib/python3.11/site-packages/tenacity/__init__.py", line 475, in __call__
    do = self.iter(retry_state=retry_state)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/blrec/.venv/lib/python3.11/site-packages/tenacity/__init__.py", line 376, in iter
    result = action(retry_state)
             ^^^^^^^^^^^^^^^^^^^
  File "/root/blrec/.venv/lib/python3.11/site-packages/tenacity/__init__.py", line 418, in exc_check
    raise retry_exc.reraise()
          ^^^^^^^^^^^^^^^^^^^
  File "/root/blrec/.venv/lib/python3.11/site-packages/tenacity/__init__.py", line 185, in reraise
    raise self.last_attempt.result()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/root/blrec/.venv/lib/python3.11/site-packages/tenacity/__init__.py", line 478, in __call__
    result = fn(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^
  File "/root/blrec/src/blrec/hls/operators/segment_fetcher.py", line 184, in _fetch_segment
    response = self._session.get(url, headers=self._live.headers, timeout=5)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/blrec/.venv/lib/python3.11/site-packages/requests/sessions.py", line 602, in get
    return self.request("GET", url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/blrec/.venv/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/blrec/.venv/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/blrec/.venv/lib/python3.11/site-packages/requests/adapters.py", line 713, in send
    raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='d1--cn-gotcha204-3.bilivideo.com', port=443): Read timed out. (read timeout=5)

2024-07-02 11:40:20.718 | DEBUG | recorder:431 | 30328665 - Stream recording completed
2024-07-02 11:40:20.719 | DEBUG | stream_recorder_impl:294 | 30328665 - Stopping stream recorder...
Exception in thread StreamRecorderDisposer::30328665:
Traceback (most recent call last):
  File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/root/blrec/src/blrec/core/stream_recorder_impl.py", line 318, in run
    target()
  File "/root/blrec/src/blrec/core/stream_recorder_impl.py", line 330, in _dispose
    self._subscription.dispose()
    ^^^^^^^^^^^^^^^^^^
AttributeError: 'HLSStreamRecorderImpl' object has no attribute '_subscription'
2024-07-02 11:40:24.236 | DEBUG | segment_fetcher:187 | 30328665 - Failed to fetch segment https://d1--cn-gotcha204.bilivideo.com/live-bvc/105512/live_519114621_57129813/h1719891260.m4s: ReadTimeout(ReadTimeoutError("HTTPSConnectionPool(host='d1--cn-gotcha204.bilivideo.com', port=443): Read timed out. (read timeout=5)"))
Karmylr commented 4 months ago

感觉是网络的问题。一个小时前b站崩过一次