mirror of
https://github.com/mpv-player/mpv
synced 2024-10-30 04:46:41 +01:00
stream_lavf: add support for data URIs
Only FFmpeg supports them and they need to be in the format data:// like other protocols or prefixed with ffmpeg:// or lavf://. Closes #4058
This commit is contained in:
parent
39adaf3dcc
commit
d303ebd9b6
@ -673,6 +673,10 @@ PROTOCOLS
|
||||
either aliases to documented protocols, or are just redirections to
|
||||
protocols implemented and documented in FFmpeg.
|
||||
|
||||
``data:`` is supported in FFmpeg (not in Libav), but needs to be in the
|
||||
format ``data://``. This is done to avoid ambiguity with filenames. You
|
||||
can also prefix it with ``lavf://`` or ``ffmpeg://``.
|
||||
|
||||
``ytdl://...``
|
||||
By default, the youtube-dl hook script (enabled by default for mpv CLI)
|
||||
only looks at http URLs. Prefixing an URL with ``ytdl://`` forces it to
|
||||
|
@ -295,7 +295,7 @@ mp.add_hook("on_load", 10, function ()
|
||||
|
||||
msg.debug("streamurl: " .. streamurl)
|
||||
|
||||
mp.set_property("stream-open-filename", streamurl)
|
||||
mp.set_property("stream-open-filename", streamurl:gsub("^data:", "data://", 1))
|
||||
|
||||
mp.set_property("file-local-options/force-media-title", json.title)
|
||||
|
||||
|
@ -416,6 +416,7 @@ const stream_info_t stream_info_ffmpeg = {
|
||||
.protocols = (const char *const[]){
|
||||
"rtmp", "rtsp", "http", "https", "mms", "mmst", "mmsh", "mmshttp", "rtp",
|
||||
"httpproxy", "hls", "rtmpe", "rtmps", "rtmpt", "rtmpte", "rtmpts", "srtp",
|
||||
"data",
|
||||
NULL },
|
||||
.can_write = true,
|
||||
.is_safe = true,
|
||||
|
Loading…
Reference in New Issue
Block a user