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

mpv av://v4l2:/dev/video0: ERROR: Unable to handle request: Unsupported url scheme: "av" (urllib) #47

Open
alopatindev opened this issue Nov 30, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@alopatindev
Copy link

Debug log

Log
$ mpv --msg-level=mpv_thumbnail_script_server=debug,mpv_thumbnail_script_client_osc=debug,ytdl_hook=debug av://v4l2:/dev/video0

Warning: option --status-msg was replaced with --term-status-msg and might be removed in the future.
Warning: option --display-fps was replaced with --override-display-fps and might be removed in the future.
[ytdl_hook] Loading lua script @ytdl_hook.lua...
[ytdl_hook] loading mp.defaults
[mpv_thumbnail_script_server] Loading lua script /home/al/.config/mpv/scripts/mpv_thumbnail_script_server.lua...
[mpv_thumbnail_script_client_osc] Loading lua script /home/al/.config/mpv/scripts/mpv_thumbnail_script_client_osc.lua...
[mpv_thumbnail_script_server] loading mp.defaults
[mpv_thumbnail_script_client_osc] loading mp.defaults
[ytdl_hook] loading @ytdl_hook.lua
[mpv_thumbnail_script_server] loading file /home/al/.config/mpv/scripts/mpv_thumbnail_script_server.lua
[mpv_thumbnail_script_client_osc] loading file /home/al/.config/mpv/scripts/mpv_thumbnail_script_client_osc.lua
[ytdl_hook] reading options for ytdl_hook
[ytdl_hook] Opened config file script-opts/ytdl_hook.conf.
[mpv_thumbnail_script_server] reading options for mpv_thumbnail_script
[mpv_thumbnail_script_server] Opened config file script-opts/mpv_thumbnail_script.conf.
[mpv_thumbnail_script_client_osc] reading options for mpv_thumbnail_script
[mpv_thumbnail_script_client_osc] Opened config file script-opts/mpv_thumbnail_script.conf.
[mpv_thumbnail_script_client_osc] reading options for osc
[mpv_thumbnail_script_client_osc] script-opts/osc.conf not found.
[mpv_thumbnail_script_client_osc] lua-settings/osc.conf not found.
[ytdl_hook] full hook
[mpv_thumbnail_script_client_osc] osc_init
[mpv_thumbnail_script_server] Announcing self to master...
[mpv_thumbnail_script_client_osc] Registered worker mpv_thumbnail_script_server
[mpv_thumbnail_script_server] Successfully registered with master
Not seekable, but enabling seeking on user request.
 (+) Video --vid=1 (rawvideo 640x480 30.000fps)
[mpv_thumbnail_script_client_osc] osc_init
[autoconvert] Converting yuyv422 -> yuv422p
[autoconvert] Converting yuyv422 -> yuv422p
VO: [gpu] 640x480 yuv422p
Time: 00:00:00 / 00:00:00 0%
[mpv_thumbnail_script_client_osc] Gathering video/thumbnail state
[mpv_thumbnail_script_client_osc] thumb size550 412
[mpv_thumbnail_script_client_osc] Thumbnailer.state: {"worker_extra" = {}, "ready" = true, "available" = false, "is_remote" = 3, "thumbnail_directory" = "/var/tmp/al_mpv_thumbnails/ddd1a66bb45e60621e98da1d15b67df7369985fd-0", "thumbnail_template" = "/var/tmp/al_mpv_thumbnails/ddd1a66bb45e60621e98da1d15b67df7369985fd-0/%06d.bgra", "thumbnail_size" = {"h" = 412, "w" = 550}, "finished_thumbnails" = 0, "thumbnails" = {}, "thumbnail_count" = 0}
[mpv_thumbnail_script_client_osc] Trying to get storyboard info...
[mpv_thumbnail_script_client_osc] osc_init
Time: 00:00:00 / 00:00:00 53%
[mpv_thumbnail_script_client_osc] [debug] Command-line config: ['--format', 'sb0', '--dump-json', '--no-playlist', '--extractor-args', 'youtube:skip=hls,dash,translated_subs', '--', 'av://v4l2:/dev/video0']
[mpv_thumbnail_script_client_osc] [debug] System config "/etc/yt-dlp.conf": ['-vU', '-vvv', '--format-sort', 'res,codec:codec:h264,codec:av1,codec:vp9', '--format-sort-force', '--sub-format', 'ass/srt/best', '--concurrent-fragments', '32', '--no-write-comments', '--no-post-overwrites', '--user-agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36']
[mpv_thumbnail_script_client_osc] [debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8 (No ANSI), error utf-8 (No ANSI), screen utf-8 (No ANSI)
[mpv_thumbnail_script_client_osc] [debug] yt-dlp version [email protected] [a0b19d319]
Time: 00:00:00 / 00:00:00 56%
[mpv_thumbnail_script_client_osc] [debug] Python 3.11.6 (CPython x86_64 64bit) - Linux-6.6.1-x86_64-11th_Gen_Intel-R-_Core-TM-_i9-11950H_@_2.60GHz-with-glibc2.37 (OpenSSL 3.0.11 19 Sep 2023, glibc 2.37)
Time: 00:00:00 / 00:00:00 59%
[mpv_thumbnail_script_client_osc] [debug] exe versions: ffmpeg 4.4.4 (fdk,setts), ffprobe 4.4.4, phantomjs broken, rtmpdump 2.4
[mpv_thumbnail_script_client_osc] [debug] Optional libraries: brotlicffi-1.1.0.0, certifi-2022.12.07, pycrypto-3.19.0, requests-2.31.0, secretstorage-3.3.3, sqlite3-3.43.2, urllib3-1.26.16
[mpv_thumbnail_script_client_osc] [debug] Proxy map: {}
[mpv_thumbnail_script_client_osc] [debug] Request Handlers: urllib
Time: 00:00:00 / 00:00:00 61%
[mpv_thumbnail_script_client_osc] [debug] Loaded 1915 extractors
[mpv_thumbnail_script_client_osc] [debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Time: 00:00:00 / 00:00:00 74%
[mpv_thumbnail_script_client_osc] Latest version: [email protected] from yt-dlp/yt-dlp
[mpv_thumbnail_script_client_osc] yt-dlp is up to date ([email protected])
Time: 00:00:00 / 00:00:01 83%
[mpv_thumbnail_script_client_osc] [generic] Extracting URL: av://v4l2:/dev/video0
[mpv_thumbnail_script_client_osc] [generic] video0: Downloading webpage
[mpv_thumbnail_script_client_osc] ERROR: Unable to handle request: Unsupported url scheme: "av" (urllib)
[mpv_thumbnail_script_client_osc] Traceback (most recent call last):
[mpv_thumbnail_script_client_osc]   File "/usr/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 1570, in wrapper
[mpv_thumbnail_script_client_osc]     return func(self, *args, **kwargs)
[mpv_thumbnail_script_client_osc]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[mpv_thumbnail_script_client_osc]   File "/usr/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 1705, in __extract_info
[mpv_thumbnail_script_client_osc]     ie_result = ie.extract(url)
[mpv_thumbnail_script_client_osc]                 ^^^^^^^^^^^^^^^
[mpv_thumbnail_script_client_osc]   File "/usr/lib/python3.11/site-packages/yt_dlp/extractor/common.py", line 715, in extract
[mpv_thumbnail_script_client_osc]     ie_result = self._real_extract(url)
[mpv_thumbnail_script_client_osc]                 ^^^^^^^^^^^^^^^^^^^^^^^
[mpv_thumbnail_script_client_osc]   File "/usr/lib/python3.11/site-packages/yt_dlp/extractor/generic.py", line 2439, in _real_extract
[mpv_thumbnail_script_client_osc]     full_response = self._request_webpage(url, video_id, headers=filter_dict({
[mpv_thumbnail_script_client_osc]                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[mpv_thumbnail_script_client_osc]   File "/usr/lib/python3.11/site-packages/yt_dlp/extractor/common.py", line 847, in _request_webpage
[mpv_thumbnail_script_client_osc]     return self._downloader.urlopen(self._create_request(url_or_request, data, headers, query))
[mpv_thumbnail_script_client_osc]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[mpv_thumbnail_script_client_osc]   File "/usr/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 4055, in urlopen
[mpv_thumbnail_script_client_osc]     return self._request_director.send(req)
[mpv_thumbnail_script_client_osc]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[mpv_thumbnail_script_client_osc]   File "/usr/lib/python3.11/site-packages/yt_dlp/networking/common.py", line 127, in send
[mpv_thumbnail_script_client_osc]     raise NoSupportingHandlers(unsupported_errors, unexpected_errors)
[mpv_thumbnail_script_client_osc] yt_dlp.networking.exceptions.NoSupportingHandlers: Unable to handle request: Unsupported url scheme: "av" (urllib)
[mpv_thumbnail_script_client_osc]
Time: 00:00:01 / 00:00:01 81%
Saving state.
Not seekable, or time unknown - not saving position.
[ffmpeg/demuxer] video4linux2,v4l2: Some buffers are still owned by the caller on close.
[ffmpeg] ioctl(VIDIOC_QBUF): Bad file descriptor
[ffmpeg] ioctl(VIDIOC_QBUF): Bad file descriptor

Exiting... (Quit)
[ytdl_hook] Exiting...
[mpv_thumbnail_script_server] Exiting...
[mpv_thumbnail_script_client_osc] Exiting...

Environment

  • OS: Gentoo GNU/Linux
  • mpv version: 0.36
  • mpv_thumbnail_script version: 0.5.3
@alopatindev alopatindev added the bug Something isn't working label Nov 30, 2023
@alopatindev alopatindev changed the title ERROR: Unable to handle request: Unsupported url scheme: "av" (urllib) mpv av://v4l2:/dev/video0: ERROR: Unable to handle request: Unsupported url scheme: "av" (urllib) Nov 30, 2023
@po5
Copy link

po5 commented Dec 16, 2023

How do you expect thumbnailing to ever work on an unseekable stream?

@alopatindev
Copy link
Author

alopatindev commented Dec 16, 2023

I don't. I expect that thumbling attempts will not happen for unseekable streams and this error won't appear.

Also I believe this error relates to micro freeze in this case, which doesn't happen with --no-config. Ok, this one was not related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants