Ricardo Constantino
ce42a96533
ytdl_hook: fix safe url checking with EDL urls
2018-01-26 18:54:17 +00:00
Ricardo Constantino
f8263e82cc
ytdl_hook: move url_is_safe earlier in code
...
lua isn't javascript.
2018-01-26 11:29:55 +00:00
Ricardo Constantino
e6e6b0dcc7
ytdl_hook: whitelist protocols from urls retrieved from youtube-dl
...
Not very clean since there's a lot of potential unsafe urls that youtube-dl
can give us, depending on whether it's a single url, split tracks,
playlists, segmented dash, etc.
2018-01-26 01:47:43 +00:00
Ricardo Constantino
86004909ac
ytdl_hook: support native dash demuxer, if present
...
Uses track tbr instead of track disposition id for dash selection
Works just as expected because youtube-dl also takes tbr from the manifests.
2018-01-15 11:20:02 +00:00
Ricardo Constantino
b478d2b1ce
ytdl_hook: look for the right ytdl binary according to system
...
package.config is available in 5.1, 5.2, 5.3 and luajit, so should be fine.
The first character is the path separator, so it's '\' on windows and '/'
on *nix.
This should also prevent cases where users download the wrong binary.
2018-01-12 18:17:37 +00:00
Ricardo Constantino
2d6fdccb92
ytdl_hook: be more informative when youtube-dl fails
2018-01-12 01:52:37 +00:00
Ricardo Constantino
154ff98128
ytdl_hook: don't try to use webpage_url if non-existent
2018-01-11 00:16:53 +00:00
Ricardo Constantino
b62066433d
ytdl_hook: actually use the script option from 87d3af6
2018-01-07 16:15:47 +00:00
Ricardo Constantino
87d3af6f19
ytdl_hook: add script option to revert to trying youtube-dl first
...
Should only make a difference if most of the URLs you open need
youtube-dl parsing.
2018-01-07 15:56:55 +00:00
Ricardo Constantino
cf8855cd2e
ytdl_hook: check for possible infinite loop in playlist generation
2018-01-06 18:43:46 +00:00
Ricardo Constantino
442ff93626
ytdl_hook: add additional check for comedycentral urls
...
If this breaks another site again, remove this whole if and just leave them as
separate playlist items.
Close #5364
2018-01-06 18:22:08 +00:00
Ricardo Constantino
cf411a9489
ytdl_hook: update obsolete warning about retrying URL if failed
2018-01-04 20:35:43 +00:00
Ricardo Constantino
89f81da481
player: add on_load_fail hook
2018-01-02 16:01:22 +00:00
Ricardo Constantino
0da5688c84
ytdl_hook: fix single-entry playlists
...
Close #5313
2018-01-02 14:28:03 +00:00
Ricardo Constantino
b1b03da137
ytdl_hook: use table concat for playlist building
...
Faster and more efficient than string concat with large playlists.
2017-12-24 14:13:57 -07:00
Ricardo Constantino
1623430b20
ytdl_hook: don't preappend ytdl:// to non-youtube links in playlists
...
Close #5003
2017-12-24 14:13:57 -07:00
Kevin Mitchell
985e83e217
Revert "ytdl: handle HLS with FFmpeg"
...
Apparently, this breaks youtube live and possibly other things.
This reverts commit 06519aae58 .
2017-12-07 00:46:27 -08:00
wm4
06519aae58
ytdl: handle HLS with FFmpeg
...
Using youtube-dl's metadata ends up with stupid things like missing
variant streams, or missing audio streams entirely.
2017-12-06 23:59:59 -08:00
Ricardo Constantino
d280b3db93
ytdl_hook: resolve relative paths when joining segment urls
...
FFmpeg/mpv don't do it automatically.
See #4827
2017-09-03 13:42:51 +01:00
Ricardo Constantino
2b83f7e391
ytdl_hook: support fragments with relative paths
...
Unbreaks segmented DASH with the change in
https://github.com/rg3/youtube-dl/commit/1141e9104 which made each
segment URL only use relative path from fragment_base_url with a
different key.
2017-08-06 13:27:53 +01:00
Jagannathan Tiruvallur Eachambadi
46bfa3726f
ytdl_hook: add a header to support geo-bypass
...
youtube-dl supports bypassing some geographic restrictions by
setting X-Forwarded-For header when used with geo-bypass and
geo-bypass-country.
2017-07-16 13:20:17 +01:00
Ricardo Constantino
db60cbb80a
ytdl_hook: actually load the script-opts
...
Also, comma-separated list doesn't actually work, even quote-surrounded.
Switch to using | instead.
2017-07-11 23:42:22 +01:00
Ricardo Constantino
042e98f4c9
ytdl_hook: add option to exclude URLs from being parsed
...
This is more of a niche usecase than --ytdl-format and --ytdl-raw-options,
so a simple script option should be enough.
Either create lua-settings/ytdl_hook.conf with
'exclude=example.com,sub.example.com' option or
"--script-opts=ytdl_hook-exclude=example.com,sub.example.com"
2017-07-11 14:18:29 +01:00
Ricardo Constantino
b1165ce3a2
ytdl_hook: add times for ytdl and hook running on debug-level
...
Not really important, but still interesting to know.
2017-07-11 14:16:35 +01:00
Ricardo Constantino
41b3b11669
ytdl_hook: add pre-parsed chapters, if available
...
Available since 2017.05.07 but only on certain extractors.
2017-07-02 21:15:15 +01:00
Martin D
30cd963b25
ytdl_hook: don't override start time set by saved state
...
This affects resuming playback from a watch_later directory so that you can resume playback even for URLs that have a start parameter.
2017-06-09 11:13:24 +01:00
Ricardo Constantino
289b11553b
ytdl_hook: don't override user-set start time
2017-06-08 19:45:49 +01:00
Ricardo Constantino
ce78f1222f
ytdl_hook: rework edl joining to use lua tables
...
Seems much more resource efficient than concatenating a string.
2017-05-04 17:10:07 +01:00
Ricardo Constantino
3526b95aaf
ytdl_hook: treat single-entry playlists as a single video
2017-04-23 01:53:59 +01:00
Ricardo Constantino
d5517f0d9f
ytdl_hook: move single video code to a separate function
2017-04-23 01:53:57 +01:00
Ricardo Constantino
6ac3d77e90
ytdl_hook: support livestream segmented DASH VODs
...
Seen with a VOD of a recently ended livestream on Youtube.
They seem to use segmented DASH but unlike normal Youtube
segmented DASH, the segments don't seem to need the initialization
segment.
The video actually fails to start to play if the init segment is
prepended with a lot of 'Found duplicated MOOV Atom. Skipped it' errors
popping up.
2017-02-10 20:24:03 +00:00
Ricardo Constantino
5fbad204a6
ytdl_hook: reenable support for length-less segments in EDL
...
They're unsupported only in MP4 DASH mode.
2017-02-06 16:50:28 +00:00
wm4
19551200d5
ytdl_hook: fix EDL syntax
...
All entries must be separated by ";" or "\n". The parser just doesn't
enforce it if an entry uses quoting.
2017-02-05 16:02:22 +01:00
Ricardo Constantino
7e6b37be07
ytdl_hook: Add non-dash fallbacks to default formats
2017-02-04 22:34:47 +01:00
wm4
61202bb364
ytdl_hook, edl: implement pseudo-DASH support
...
We use the metadata provided by youtube-dl to sort-of implement
fragmented DASH streaming.
This is all a bit hacky, but hopefully a makeshift solution until
libavformat has proper mechanisms. (Although in danger of being one
of those temporary hacks that become permanent.)
2017-02-04 22:34:38 +01:00
Ricardo Constantino
a46fc5e5eb
ytdl: support segmented dash
2017-02-04 22:19:21 +01:00
Ricardo Constantino
e017c24174
ytdl_hook: refactor edl track joining
...
Only used once for now.
Also, support switched format strings, like bestaudio+bestvideo.
2017-01-30 16:21:44 +00:00
Ricardo Constantino
6dafc85187
ytdl_hook: respect --no-audio, don't force-select track
2017-01-30 15:01:07 +00:00
Ricardo Constantino
2a7d2d1bc9
ytdl_hook: fix opening hitbox.tv rtmp stream
...
Worked with librtmp, but ffrtmp needs to set rtmp_swfurl in addition
to rtmp_swfverify, even if they're the same value.
2017-01-29 01:45:13 +00:00
Ricardo Constantino
d303ebd9b6
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
2017-01-25 15:40:56 +00:00
Ricardo Constantino
03ea61c895
ytdl_hook: sort chapters by time
...
mpv doesn't work well with unordered chapters.
ex: https://youtu.be/DIKPUL6b4N8
2016-11-15 22:58:43 +00:00
Ricardo Constantino
13259f35c8
ytdl_hook: Add title to playlist items if available
2016-10-15 01:33:27 +01:00
Maurycy Skier
e9c43258b8
ytdl_hook: add chapters by parsing video's description
2016-10-06 21:18:43 +01:00
Ricardo Constantino
6487ba4864
ytdl_hook: Set aspect ratio for anamorphic video
2016-09-28 21:16:40 +02:00
Ricardo Constantino
6ba2bbd090
ytdl_hook: temporarily force disable dash segments formats
2016-09-22 20:34:42 +02:00
Ricardo Constantino
60a0815b4c
ytdl_hook: don't bother adding subtitles if duration isn't known
...
EDL doesn't work with subtitles with unknown length.
2016-09-13 09:23:00 +02:00
Ricardo Constantino
5edd6a8caa
ytdl_hook: Support playlist entries without subtitles
...
Fixes missing subtitle tracks if the first entry didn't have any.
Previously it just checked for the first entry in the playlist for
requested languages and if that entry happened to not have subtitles
they also wouldn't show up for the other entries.
It will skip languages if the first entry with subs has less or
different languages than the others.
Unrelated to http_dash_segments.
2016-09-13 09:22:55 +02:00
Ricardo Constantino
5bcb22beea
ytdl: Error out with http_dash_segments
...
Unsupported for now.
2016-07-30 19:02:39 +02:00
Ricardo Constantino
256d9d2b89
ytdl: fix brightcove urls
2016-05-30 16:57:43 +02:00
Ricardo Constantino
4ff2a60632
ytdl_hook: support multi-arc subtitles
...
While at it, pass durations of segments from ytdl if available.
2016-05-23 15:14:14 +02:00