mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-01-09 21:10:10 +09:00
Merge 0f0a0b9289
into c5098961b0
This commit is contained in:
commit
0ebfc2887b
@ -1,5 +1,8 @@
|
|||||||
[![Build Status](https://github.com/ytdl-org/youtube-dl/workflows/CI/badge.svg)](https://github.com/ytdl-org/youtube-dl/actions?query=workflow%3ACI)
|
# In this fork
|
||||||
|
|
||||||
|
This fork adds an extractor for recording lectures from a https://livestream.kuleuven.be/ stream.
|
||||||
|
|
||||||
|
# youtube-dl
|
||||||
|
|
||||||
youtube-dl - download videos from youtube.com or other video platforms
|
youtube-dl - download videos from youtube.com or other video platforms
|
||||||
|
|
||||||
@ -238,6 +241,8 @@ Alternatively, refer to the [developer instructions](#developer-instructions) fo
|
|||||||
url,ffmpeg,httpie,wget
|
url,ffmpeg,httpie,wget
|
||||||
--external-downloader-args ARGS Give these arguments to the external
|
--external-downloader-args ARGS Give these arguments to the external
|
||||||
downloader
|
downloader
|
||||||
|
--ffmpeg-out-override ARGS Give these arguments to the ffmpeg
|
||||||
|
instead of `-c copy`
|
||||||
|
|
||||||
## Filesystem Options:
|
## Filesystem Options:
|
||||||
-a, --batch-file FILE File containing URLs to download ('-'
|
-a, --batch-file FILE File containing URLs to download ('-'
|
||||||
|
@ -433,6 +433,7 @@
|
|||||||
- **KonserthusetPlay**
|
- **KonserthusetPlay**
|
||||||
- **KrasView**: Красвью
|
- **KrasView**: Красвью
|
||||||
- **Ku6**
|
- **Ku6**
|
||||||
|
- **KULLive**
|
||||||
- **KUSI**
|
- **KUSI**
|
||||||
- **kuwo:album**: 酷我音乐 - 专辑
|
- **kuwo:album**: 酷我音乐 - 专辑
|
||||||
- **kuwo:category**: 酷我音乐 - 分类
|
- **kuwo:category**: 酷我音乐 - 分类
|
||||||
|
@ -312,6 +312,9 @@ def _real_main(argv=None):
|
|||||||
postprocessor_args = None
|
postprocessor_args = None
|
||||||
if opts.postprocessor_args:
|
if opts.postprocessor_args:
|
||||||
postprocessor_args = compat_shlex_split(opts.postprocessor_args)
|
postprocessor_args = compat_shlex_split(opts.postprocessor_args)
|
||||||
|
ffmpeg_out_override = None
|
||||||
|
if opts.ffmpeg_out_override:
|
||||||
|
ffmpeg_out_override = compat_shlex_split(opts.ffmpeg_out_override)
|
||||||
match_filter = (
|
match_filter = (
|
||||||
None if opts.match_filter is None
|
None if opts.match_filter is None
|
||||||
else match_filter_func(opts.match_filter))
|
else match_filter_func(opts.match_filter))
|
||||||
@ -429,6 +432,7 @@ def _real_main(argv=None):
|
|||||||
'hls_prefer_native': opts.hls_prefer_native,
|
'hls_prefer_native': opts.hls_prefer_native,
|
||||||
'hls_use_mpegts': opts.hls_use_mpegts,
|
'hls_use_mpegts': opts.hls_use_mpegts,
|
||||||
'external_downloader_args': external_downloader_args,
|
'external_downloader_args': external_downloader_args,
|
||||||
|
'ffmpeg_out_override': ffmpeg_out_override,
|
||||||
'postprocessor_args': postprocessor_args,
|
'postprocessor_args': postprocessor_args,
|
||||||
'cn_verification_proxy': opts.cn_verification_proxy,
|
'cn_verification_proxy': opts.cn_verification_proxy,
|
||||||
'geo_verification_proxy': opts.geo_verification_proxy,
|
'geo_verification_proxy': opts.geo_verification_proxy,
|
||||||
|
@ -469,7 +469,10 @@ class FFmpegFD(ExternalFD):
|
|||||||
elif isinstance(conn, compat_str):
|
elif isinstance(conn, compat_str):
|
||||||
args += ['-rtmp_conn', conn]
|
args += ['-rtmp_conn', conn]
|
||||||
|
|
||||||
args += ['-i', url, '-c', 'copy']
|
args += ['-i', url]
|
||||||
|
|
||||||
|
ffmpeg_out_override = self.params.get('ffmpeg_out_override')
|
||||||
|
args += ffmpeg_out_override if ffmpeg_out_override else ['-c', 'copy']
|
||||||
|
|
||||||
if self.params.get('test', False):
|
if self.params.get('test', False):
|
||||||
args += ['-fs', compat_str(self._TEST_FILE_SIZE)]
|
args += ['-fs', compat_str(self._TEST_FILE_SIZE)]
|
||||||
|
@ -576,6 +576,7 @@ from .konserthusetplay import KonserthusetPlayIE
|
|||||||
from .krasview import KrasViewIE
|
from .krasview import KrasViewIE
|
||||||
from .kth import KTHIE
|
from .kth import KTHIE
|
||||||
from .ku6 import Ku6IE
|
from .ku6 import Ku6IE
|
||||||
|
from .kuleuven_live import KULLiveIE
|
||||||
from .kusi import KUSIIE
|
from .kusi import KUSIIE
|
||||||
from .kuwo import (
|
from .kuwo import (
|
||||||
KuwoIE,
|
KuwoIE,
|
||||||
|
29
youtube_dl/extractor/kuleuven_live.py
Normal file
29
youtube_dl/extractor/kuleuven_live.py
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from .common import InfoExtractor
|
||||||
|
|
||||||
|
|
||||||
|
class KULLiveIE(InfoExtractor):
|
||||||
|
_VALID_URL = r'(?:(?:https?://(?:www\.)?livestream.kuleuven\.be/\?pin=)|kulive:)(?P<id>[0-9]+)'
|
||||||
|
|
||||||
|
def _real_extract(self, url):
|
||||||
|
pin = self._match_id(url)
|
||||||
|
|
||||||
|
json_res = self._download_json(
|
||||||
|
"https://icts-p-toledo-streaming-video-live-backend.cloud.icts.kuleuven.be/api/viewers/" + pin,
|
||||||
|
pin,
|
||||||
|
'Requesting stream URL',
|
||||||
|
errnote='The stream with pin %s does not exist or has not started yet' % pin,
|
||||||
|
fatal=True)
|
||||||
|
|
||||||
|
m3u8_url = json_res['streamUrl']
|
||||||
|
|
||||||
|
formats = self._extract_m3u8_formats(m3u8_url, pin, 'mp4')
|
||||||
|
|
||||||
|
return {
|
||||||
|
'id': pin,
|
||||||
|
'title': 'kul-stream',
|
||||||
|
'is_live': True,
|
||||||
|
'formats': formats,
|
||||||
|
}
|
@ -523,6 +523,10 @@ def parseOpts(overrideArguments=None):
|
|||||||
'--external-downloader-args',
|
'--external-downloader-args',
|
||||||
dest='external_downloader_args', metavar='ARGS',
|
dest='external_downloader_args', metavar='ARGS',
|
||||||
help='Give these arguments to the external downloader')
|
help='Give these arguments to the external downloader')
|
||||||
|
downloader.add_option(
|
||||||
|
'--ffmpeg-out-override',
|
||||||
|
dest='ffmpeg_out_override', metavar='ARGS',
|
||||||
|
help='Give these arguments to the ffmpeg instead of `-c copy`')
|
||||||
|
|
||||||
workarounds = optparse.OptionGroup(parser, 'Workarounds')
|
workarounds = optparse.OptionGroup(parser, 'Workarounds')
|
||||||
workarounds.add_option(
|
workarounds.add_option(
|
||||||
|
Loading…
Reference in New Issue
Block a user