Download Youtube premiere trailer

See original GitHub issue

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I remove or skip any mandatory* field

Checklist

  • I’m requesting a site-specific feature
  • I’ve verified that I’m running yt-dlp version 2022.10.04 (update instructions) or later (specify commit)
  • I’ve checked that all provided URLs are playable in a browser with the same IP and same login details
  • I’ve searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
  • I’ve read the guidelines for opening an issue
  • I’ve read about sharing account credentials and I’m willing to share it if required

Region

USA

Example URLs

https://www.youtube.com/watch?v=NGMvoIuEDm4

Provide a description that is worded well enough to be understood

I would like the ability to download the trailer from a youtube premiere.

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

[debug] Command-line config: ['-vU', 'https://www.youtube.com/watch?v=NGMvoIuEDm4']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.10.04 [4e0511f27] API
[debug] Lazy loading extractors is disabled
[debug] Python 3.10.6 (CPython 64bit) - Windows-10-10.0.19044-SP0
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg N-108601-gf3b5277057-20221010 (setts), ffprobe N-108601-gf3b5277057-20221010
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2022.09.24, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {}
[debug] Loaded 1697 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.10.04, Current version: 2022.10.04
yt-dlp is up to date (2022.10.04)
[debug] [youtube] Extracting URL: https://www.youtube.com/watch?v=NGMvoIuEDm4
[youtube] NGMvoIuEDm4: Downloading webpage
[youtube] NGMvoIuEDm4: Downloading android player API JSON
ERROR: [youtube] NGMvoIuEDm4: Premieres in 70 days
  File "C:\Users\mystu\scoop\apps\python\current\lib\site-packages\yt_dlp\extractor\common.py", line 674, in extract
    ie_result = self._real_extract(url)
  File "C:\Users\mystu\scoop\apps\python\current\lib\site-packages\yt_dlp\extractor\youtube.py", line 3815, in _real_extract
    self.raise_no_formats(reason, expected=True)
  File "C:\Users\mystu\scoop\apps\python\current\lib\site-packages\yt_dlp\extractor\common.py", line 1156, in raise_no_formats
    raise ExtractorError(msg, expected=expected, video_id=video_id)

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
dirkfcommented, Oct 20, 2022

This is the relevant patch against the current yt-dl HEAD:

@@ -1704,14 +1693,6 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
                 if pr and isinstance(pr, dict):
                     player_response = pr
 
-        trailer_video_id = try_get(
-            playability_status,
-            lambda x: x['errorScreen']['playerLegacyDesktopYpcTrailerRenderer']['trailerVideoId'],
-            compat_str)
-        if trailer_video_id:
-            return self.url_result(
-                trailer_video_id, self.ie_key(), trailer_video_id)
-
         def get_text(x):
             if not x:
                 return
@@ -1904,6 +1885,17 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
                         subreason, countries)
                 reason += '\n' + subreason
             if reason:
+                trailer_video_id = try_get(
+                    playability_status,
+                    (lambda x: x['errorScreen']['ypcTrailerRenderer']['unserializedPlayerResponse']['videoDetails']['videoId'],
+                     lambda x: x['errorScreen']['playerLegacyDesktopYpcTrailerRenderer']['trailerVideoId']),
+                    compat_str)
+
+                if trailer_video_id:
+                    self._downloader.report_warning('%s: returning trailer %s.' % (reason, trailer_video_id))
+                    return self.url_result(
+                        trailer_video_id, self.ie_key(), trailer_video_id)
+
                 raise ExtractorError(reason, expected=True)
 
         self._sort_formats(formats)
0reactions
dirkfcommented, Oct 24, 2022

If the trailer is listed with reduced preference and distinct format IDs, it will be selected until the actual show is available, no? And could be manually selected afterwards?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is it possible to download premiere video that will be private ...
I was trying to download a premiere video using youtube-dl GUI version from here…
Read more >
Customize your Premiere - YouTube Help
From the “Visibility” step, schedule your upload as a Premiere. Click Set up Premiere. Under “Select countdown theme,” choose a countdown timer. Show...
Read more >
Free Premiere Pro YouTube Template Downloads - Mixkit
Download from our library of free Premiere Pro Templates for YouTube. All of the templates for YouTube are ready to be used in...
Read more >
Is there a way to view a YouTube video before it premieres ...
I'm not sure if 'Premium,' users have early bird access to any YT videos. I know Premium YT users can easily download videos...
Read more >
FREE! Adobe Premiere Pro CC Epic Trailer Template - Pinterest
Adobe Premiere Pro CC Epic Trailer Template - YouTube Epic Trailer, ... 2020| DOWNLOAD FREE ZIP FILE OF LUTs of 2020 | How...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found