浏览代码

[liveleak] Clarify rationale for restoring raw video

Sergey M․ 10 年之前
父节点
当前提交
afa1ded425
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      youtube_dl/extractor/liveleak.py

+ 3 - 0
youtube_dl/extractor/liveleak.py

@@ -95,6 +95,9 @@ class LiveLeakIE(InfoExtractor):
             'url': s['file'],
             'url': s['file'],
         } for i, s in enumerate(sources)]
         } for i, s in enumerate(sources)]
         for i, s in enumerate(sources):
         for i, s in enumerate(sources):
+            # Removing '.h264_*.mp4' gives the raw video, which is essentially
+            # the same video without the LiveLeak logo at the top (see
+            # https://github.com/rg3/youtube-dl/pull/4768)
             orig_url = re.sub(r'\.h264_.+?\.mp4', '', s['file'])
             orig_url = re.sub(r'\.h264_.+?\.mp4', '', s['file'])
             if s['file'] != orig_url:
             if s['file'] != orig_url:
                 formats.append({
                 formats.append({