Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PeerTube extractor: No video formats found #26002

Closed
0l-l0 opened this issue Jul 14, 2020 · 4 comments
Closed

PeerTube extractor: No video formats found #26002

0l-l0 opened this issue Jul 14, 2020 · 4 comments

Comments

@0l-l0
Copy link

0l-l0 commented Jul 14, 2020

Hi,

I tried to download videos from several PeerTube instances with youtube-dl and it worked fine except for one instance (https://spacepub.space). I contacted the instance owner but he claimed that this is a youtube-dl related issue.

Here is the command that I issued:

$ youtube-dl -j --print-traffic --verbose https://spacepub.space/videos/watch/1619c000-7c44-4330-9177-29a0854bd759

...and I got the following output:

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-j', '--print-traffic', '--verbose', 'https://spacepub.space/videos/watch/1619c000-7c44-4330-9177-29a0854bd759']
[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.7.7 (CPython) - Linux-5.6.18-156.current-x86_64-with-glibc2.2.5
[debug] exe versions: ffmpeg 4.3, ffprobe 4.3
[debug] Proxy map: {}
send: b'GET /api/v1/videos/1619c000-7c44-4330-9177-29a0854bd759/ HTTP/1.1\r\nHost: spacepub.space\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3767.0 Safari/537.36\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Server: nginx
header: Date: Tue, 14 Jul 2020 12:56:46 GMT
header: Content-Type: application/json; charset=utf-8
header: Content-Length: 6513
header: Connection: close
header: X-Powered-By: Express
header: Tk: N
header: Access-Control-Allow-Origin: *
header: Access-Control-Allow-Credentials: true
header: Access-Control-Expose-Headers: Retry-After
header: X-RateLimit-Limit: 50
header: X-RateLimit-Remaining: 49
header: X-RateLimit-Reset: 1594731416
header: ETag: W/"1971-IR9Tih/fJEuVDs3YosEe+l1T7zg"
ERROR: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/youtube_dl/YoutubeDL.py", line 797, in extract_info
    ie_result = ie.extract(url)
  File "/usr/lib/python3.7/site-packages/youtube_dl/extractor/common.py", line 530, in extract
    ie_result = self._real_extract(url)
  File "/usr/lib/python3.7/site-packages/youtube_dl/extractor/peertube.py", line 545, in _real_extract
    self._sort_formats(formats)
  File "/usr/lib/python3.7/site-packages/youtube_dl/extractor/common.py", line 1350, in _sort_formats
    raise ExtractorError('No video formats found')
youtube_dl.utils.ExtractorError: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

I got the same result for any other videos on the mentioned instance (https://spacepub.space) but for no videos on randomly selected other instances.

@0l-l0
Copy link
Author

0l-l0 commented Jul 22, 2020

Can anyone reproduce this issue?
The list of public instances for testing can be found here: https://instances.joinpeertube.org/instances

@terminalnode
Copy link

I can reproduce the issue. Exact same error as far as I can tell. (except python 3.8.5)

@0l-l0
Copy link
Author

0l-l0 commented Aug 11, 2020

I just submitted a PR (#26302) that solves the problem, but I am not entirely sure whether it shouldn't be solved on the server side. (It's not clear for me how important the presence of the "files" array is.)

@0l-l0
Copy link
Author

0l-l0 commented Aug 25, 2020

@Chocobozzz (the maintainer of PeerTube) made a clarification on the two "files" arrays in question. Each of them has its own role and from the youtube-dl's point of view any of them can be used to download the video file(s).

ThirumalaiK pushed a commit to ThirumalaiK/youtube-dl that referenced this issue Jan 28, 2021
JSON objects with an empty "files" tag seem to be a valid PeerTube API
response. In those cases the "files" arrays contained in the
"streamingPlaylists" members can be used instead.
closes ytdl-org#26002
closes ytdl-org#27586
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants