Skip to content

[extractor/youtube] Add the first 3 characters of client name in format_note #6254

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 11, 2023

Conversation

Lesmiscore
Copy link
Contributor

@Lesmiscore Lesmiscore commented Feb 16, 2023

IMPORTANT: PRs without the template will be CLOSED

Description of your pull request and other information

This PR adds the client names to format_note returned by the Youtube extractor for convenience
If you wish to enforce this to all the formats (MPD and HLS), a little rewrite would be required

p.s. make a release before reviewing this

$ ./yt-dlp.sh -s test:youtube_2 --extractor-args youtube:player_client=all -F
[TestURL] Extracting URL: test:youtube_2
[TestURL] Test URL: https://www.youtube.com/watch?v=BaW_jenozKc&v=yZIXLfi8CZQ
[youtube] Extracting URL: https://www.youtube.com/watch?v=BaW_jenozKc&v=yZIXLfi8CZQ
(snip)
[info] Available formats for BaW_jenozKc:
ID      EXT  RESOLUTION FPS CH │   FILESIZE   TBR PROTO │ VCODEC          VBR ACODEC      ABR ASR MORE INFO
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
233     mp4  audio only        │                  m3u8  │ audio only          unknown             Default
234     mp4  audio only        │                  m3u8  │ audio only          unknown             Default
249-drc webm audio only      2 │   62.24KiB   52k https │ audio only          opus        52k 48k low, DRC, TVH, webm_dash
250-drc webm audio only      2 │   80.49KiB   67k https │ audio only          opus        67k 48k low, DRC, TVH, webm_dash
139     m4a  audio only      2 │   58.59KiB   48k https │ audio only          mp4a.40.5   48k 22k low, AND, m4a_dash
249     webm audio only      2 │   58.17KiB   48k https │ audio only          opus        48k 48k low, AND, webm_dash
250     webm audio only      2 │   76.07KiB   63k https │ audio only          opus        63k 48k low, AND, webm_dash
140-drc m4a  audio only      2 │  157.22KiB  130k https │ audio only          mp4a.40.2  130k 44k medium, DRC, TVH, m4a_dash
251-drc webm audio only      2 │  138.80KiB  115k https │ audio only          opus       115k 48k medium, DRC, TVH, webm_dash
140     m4a  audio only      2 │  154.06KiB  128k https │ audio only          mp4a.40.2  128k 44k medium, AND, m4a_dash
251     webm audio only      2 │  138.96KiB  116k https │ audio only          opus       116k 48k medium, AND, webm_dash
17      3gp  176x144     12  1 │   55.79KiB   45k https │ mp4v.20.3       45k mp4a.40.2    0k 22k 144p, AND
269     mp4  256x144     15    │ ~214.75KiB  172k m3u8  │ avc1.4D400C    172k video only
160     mp4  256x144     15    │  135.08KiB  113k https │ avc1.4d400c    113k video only          144p, AND, mp4_dash
603     mp4  256x144     30    │ ~127.69KiB  102k m3u8  │ vp09.00.11.08  102k video only
278     webm 256x144     30    │   52.22KiB   44k https │ vp9             44k video only          144p, AND, webm_dash
229     mp4  426x240     30    │ ~386.34KiB  309k m3u8  │ avc1.4D4015    309k video only
133     mp4  426x240     30    │  294.27KiB  246k https │ avc1.4d4015    246k video only          240p, AND, mp4_dash
604     mp4  426x240     30    │ ~ 99.87KiB   80k m3u8  │ vp09.00.20.08   80k video only
242     webm 426x240     30    │   33.27KiB   28k https │ vp9             28k video only          240p, AND, webm_dash
230     mp4  640x360     30    │ ~553.39KiB  443k m3u8  │ avc1.4D401E    443k video only
134     mp4  640x360     30    │  349.59KiB  292k https │ avc1.4d401e    292k video only          360p, AND, mp4_dash
18      mp4  640x360     30  2 │ ~525.60KiB  420k https │ avc1.42001E    420k mp4a.40.2    0k 44k 360p, AND
605     mp4  640x360     30    │ ~255.57KiB  204k m3u8  │ vp09.00.21.08  204k video only
243     webm 640x360     30    │   75.55KiB   63k https │ vp9             63k video only          360p, AND, webm_dash
231     mp4  854x480     30    │ ~  1.10MiB  898k m3u8  │ avc1.4D401F    898k video only
135     mp4  854x480     30    │  849.41KiB  710k https │ avc1.4d401f    710k video only          480p, AND, mp4_dash
606     mp4  854x480     30    │ ~375.46KiB  300k m3u8  │ vp09.00.30.08  300k video only
244     webm 854x480     30    │  165.49KiB  138k https │ vp9            138k video only          480p, AND, webm_dash
22      mp4  1280x720    30  2 │ ~  1.82MiB 1493k https │ avc1.64001F   1493k mp4a.40.2    0k 44k 720p, AND
232     mp4  1280x720    30    │ ~  1.99MiB 1631k m3u8  │ avc1.4D401F   1631k video only
136     mp4  1280x720    30    │    1.60MiB 1366k https │ avc1.4d401f   1366k video only          720p, AND, mp4_dash
609     mp4  1280x720    30    │ ~756.27KiB  605k m3u8  │ vp09.00.31.08  605k video only
247     webm 1280x720    30    │  504.68KiB  420k https │ vp9            420k video only          720p, AND, webm_dash
270     mp4  1920x1080   30    │ ~  2.52MiB 2061k m3u8  │ avc1.640028   2061k video only
137     mp4  1920x1080   30    │    2.11MiB 1803k https │ avc1.640028   1803k video only          1080p, AND, mp4_dash
614     mp4  1920x1080   30    │ ~  1.29MiB 1057k m3u8  │ vp09.00.40.08 1057k video only
248     webm 1920x1080   30    │  965.31KiB  804k https │ vp9            804k video only          1080p, AND, webm_dash
[info] BaW_jenozKc: Downloading 1 format(s): 248+251
Template

Before submitting a pull request make sure you have:

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check one of the following options:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

@pukkandan pukkandan added the site-enhancement Feature request for some website label Feb 17, 2023
@pukkandan
Copy link
Member

If you wish to enforce this to all the formats (MPD and HLS), a little rewrite would be required

That would be nice

@Lesmiscore
Copy link
Contributor Author

[info] Available formats for BaW_jenozKc:
ID      EXT  RESOLUTION FPS CH │   FILESIZE   TBR PROTO │ VCODEC          VBR ACODEC      ABR ASR MORE INFO
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
233     mp4  audio only        │                  m3u8  │ audio only          unknown             Default, IOS
234     mp4  audio only        │                  m3u8  │ audio only          unknown             Default, IOS
249-drc webm audio only      2 │   62.24KiB   52k https │ audio only          opus        52k 48k low, DRC, TVH, webm_dash
250-drc webm audio only      2 │   80.49KiB   67k https │ audio only          opus        67k 48k low, DRC, TVH, webm_dash
139     m4a  audio only      2 │   58.59KiB   48k https │ audio only          mp4a.40.5   48k 22k low, AND, m4a_dash
249     webm audio only      2 │   58.17KiB   48k https │ audio only          opus        48k 48k low, AND, webm_dash
250     webm audio only      2 │   76.07KiB   63k https │ audio only          opus        63k 48k low, AND, webm_dash
140-drc m4a  audio only      2 │  157.22KiB  130k https │ audio only          mp4a.40.2  130k 44k medium, DRC, TVH, m4a_dash
251-drc webm audio only      2 │  138.80KiB  115k https │ audio only          opus       115k 48k medium, DRC, TVH, webm_dash
140     m4a  audio only      2 │  154.06KiB  128k https │ audio only          mp4a.40.2  128k 44k medium, AND, m4a_dash
251     webm audio only      2 │  138.96KiB  116k https │ audio only          opus       116k 48k medium, AND, webm_dash
17      3gp  176x144     12  1 │   55.79KiB   45k https │ mp4v.20.3       45k mp4a.40.2    0k 22k 144p, AND
269     mp4  256x144     15    │ ~214.75KiB  172k m3u8  │ avc1.4D400C    172k video only          IOS
160     mp4  256x144     15    │  135.08KiB  113k https │ avc1.4d400c    113k video only          144p, AND, mp4_dash
603     mp4  256x144     30    │ ~127.69KiB  102k m3u8  │ vp09.00.11.08  102k video only          IOS
278     webm 256x144     30    │   52.22KiB   44k https │ vp9             44k video only          144p, AND, webm_dash
229     mp4  426x240     30    │ ~386.34KiB  309k m3u8  │ avc1.4D4015    309k video only          IOS
133     mp4  426x240     30    │  294.27KiB  246k https │ avc1.4d4015    246k video only          240p, AND, mp4_dash
604     mp4  426x240     30    │ ~ 99.87KiB   80k m3u8  │ vp09.00.20.08   80k video only          IOS
242     webm 426x240     30    │   33.27KiB   28k https │ vp9             28k video only          240p, AND, webm_dash
230     mp4  640x360     30    │ ~553.39KiB  443k m3u8  │ avc1.4D401E    443k video only          IOS
134     mp4  640x360     30    │  349.59KiB  292k https │ avc1.4d401e    292k video only          360p, AND, mp4_dash
18      mp4  640x360     30  2 │ ~525.60KiB  420k https │ avc1.42001E    420k mp4a.40.2    0k 44k 360p, AND
605     mp4  640x360     30    │ ~255.57KiB  204k m3u8  │ vp09.00.21.08  204k video only          IOS
243     webm 640x360     30    │   75.55KiB   63k https │ vp9             63k video only          360p, AND, webm_dash
231     mp4  854x480     30    │ ~  1.10MiB  898k m3u8  │ avc1.4D401F    898k video only          IOS
135     mp4  854x480     30    │  849.41KiB  710k https │ avc1.4d401f    710k video only          480p, AND, mp4_dash
606     mp4  854x480     30    │ ~375.46KiB  300k m3u8  │ vp09.00.30.08  300k video only          IOS
244     webm 854x480     30    │  165.49KiB  138k https │ vp9            138k video only          480p, AND, webm_dash
22      mp4  1280x720    30  2 │ ~  1.82MiB 1493k https │ avc1.64001F   1493k mp4a.40.2    0k 44k 720p, AND
232     mp4  1280x720    30    │ ~  1.99MiB 1631k m3u8  │ avc1.4D401F   1631k video only          IOS
136     mp4  1280x720    30    │    1.60MiB 1366k https │ avc1.4d401f   1366k video only          720p, AND, mp4_dash
609     mp4  1280x720    30    │ ~756.27KiB  605k m3u8  │ vp09.00.31.08  605k video only          IOS
247     webm 1280x720    30    │  504.68KiB  420k https │ vp9            420k video only          720p, AND, webm_dash
270     mp4  1920x1080   30    │ ~  2.52MiB 2061k m3u8  │ avc1.640028   2061k video only          IOS
137     mp4  1920x1080   30    │    2.11MiB 1803k https │ avc1.640028   1803k video only          1080p, AND, mp4_dash
614     mp4  1920x1080   30    │ ~  1.29MiB 1057k m3u8  │ vp09.00.40.08 1057k video only          IOS
248     webm 1920x1080   30    │  965.31KiB  804k https │ vp9            804k video only          1080p, AND, webm_dash

@@ -3736,6 +3740,8 @@ def _extract_formats_and_subtitles(self, streaming_data, video_id, player_url, l
if is_damaged:
self.report_warning(
f'{video_id}: Some formats are possibly damaged. They will be deprioritized', only_once=True)

client_name = (traverse_obj(query, ('c', 0, {str})) or fmt.get(STRAMING_DATA_CLIENT_NAME) or '')[0:3].upper()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With 3 chars, we can't tell web_embedded etc apart. Maybe use thw whole string?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason behind 3 characters is that it's narrow enough not to cause break lines in my console and it's long enough to identify which device is problematic, at first glance
And if we need the whole string, it should be done by editing code as needed

Lesmiscore and others added 2 commits February 17, 2023 22:22
Co-authored-by: pukkandan <pukkandan.ytdlp@gmail.com>
@pukkandan
Copy link
Member

  1. There is no distinction b/w web, web_embeeded etc
  2. It's sometimes giving clientName and other times the friendly name yt-dlp uses

What do you think about this?

diff --git a/yt_dlp/extractor/youtube.py b/yt_dlp/extractor/youtube.py
index cfad8b325..397e68137 100644
--- a/yt_dlp/extractor/youtube.py
+++ b/yt_dlp/extractor/youtube.py
@@ -250,6 +250,11 @@ def _split_innertube_client(client_name):
     return client_name, base, variant[0] if variant else None


+def short_client_name(client_name):
+    parts = _split_innertube_client(client_name)[0].replace('embedscreen', 'e_s').split('_')
+    return ''.join(x[0] for x in parts).upper()
+
+
 def build_innertube_clients():
     THIRD_PARTY = {
         'embedUrl': 'https://www.youtube.com/',  # Can be any valid URL
@@ -3620,8 +3625,9 @@ def append_client(*client_names):
                     self.report_warning(
                         f'Skipping player response from {client} client (got player response for video "{pr_video_id}" instead of "{video_id}")' + bug_reports_message())
                 else:
-                    # set the client name in streamingData so that we can show it on -F
-                    (traverse_obj(pr, ('streamingData', {dict})) or {})[STREAMING_DATA_CLIENT_NAME] = client
+                    # Save client name for introspection later
+                    for f in traverse_obj(pr, ('streamingData', ('formats', 'adaptiveFormats'), ..., {dict})):
+                        f[STREAMING_DATA_CLIENT_NAME] = short_client_name(client)
                     prs.append(pr)

             # creator clients can bypass AGE_VERIFICATION_REQUIRED if logged in
@@ -3741,7 +3747,7 @@ def _extract_formats_and_subtitles(self, streaming_data, video_id, player_url, l
                 self.report_warning(
                     f'{video_id}: Some formats are possibly damaged. They will be deprioritized', only_once=True)

-            client_name = (traverse_obj(query, ('c', 0, {str})) or fmt.get(STREAMING_DATA_CLIENT_NAME) or '')[0:3].upper()
+            client_name = fmt.get(STREAMING_DATA_CLIENT_NAME)
             dct = {
                 'asr': int_or_none(fmt.get('audioSampleRate')),
                 'filesize': int_or_none(fmt.get('contentLength')),
@@ -3754,7 +3760,6 @@ def _extract_formats_and_subtitles(self, streaming_data, video_id, player_url, l
                     try_get(fmt, lambda x: x['projectionType'].replace('RECTANGULAR', '').lower()),
                     try_get(fmt, lambda x: x['spatialAudioType'].replace('SPATIAL_AUDIO_TYPE_', '').lower()),
                     throttled and 'THROTTLED', is_damaged and 'DAMAGED',
-                    # for convenience of seeing client name in -F without debugging
                     client_name,
                     delim=', '),
                 # Format 22 is likely to be damaged. See https://github.com/yt-dlp/yt-dlp/issues/3372
@@ -3833,7 +3838,7 @@ def process_manifest_format(f, proto, client_name, itag):

         subtitles = {}
         for sd in streaming_data:
-            client_name = (sd.get(STREAMING_DATA_CLIENT_NAME) or '')[0:3].upper()
+            client_name = sd.get(STREAMING_DATA_CLIENT_NAME)

             hls_manifest_url = 'hls' not in skip_manifests and sd.get('hlsManifestUrl')
             if hls_manifest_url:

It's compact and gives more info. Issue is that it's harder to read for those unfamilar with code

❯ yt-dlp --client=android,web,tv_embedded -qF BaW_jenozKc && yt-dlp --client=web_embedded,android_embedscreen -qF BaW_jenozKc && yt-dlp --client=mweb -qF BaW_jenozKc
ID      EXT  RESOLUTION FPS CH │   FILESIZE   TBR PROTO │ VCODEC        VBR ACODEC      ABR ASR MORE INFO
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
249-drc webm audio only      2 │   62.24KiB   52k https │ audio only        opus        52k 48k low, DRC, TE, webm_dash
250-drc webm audio only      2 │   80.49KiB   67k https │ audio only        opus        67k 48k low, DRC, TE, webm_dash
139     m4a  audio only      2 │   58.59KiB   48k https │ audio only        mp4a.40.5   48k 22k low, A, m4a_dash
249     webm audio only      2 │   58.17KiB   48k https │ audio only        opus        48k 48k low, A, webm_dash
250     webm audio only      2 │   76.07KiB   63k https │ audio only        opus        63k 48k low, A, webm_dash
140-drc m4a  audio only      2 │  157.22KiB  130k https │ audio only        mp4a.40.2  130k 44k medium, DRC, TE, m4a_dash
251-drc webm audio only      2 │  138.80KiB  115k https │ audio only        opus       115k 48k medium, DRC, TE, webm_dash
140     m4a  audio only      2 │  154.06KiB  128k https │ audio only        mp4a.40.2  128k 44k medium, A, m4a_dash
251     webm audio only      2 │  138.96KiB  116k https │ audio only        opus       116k 48k medium, A, webm_dash
17      3gp  176x144     12  1 │   55.79KiB   45k https │ mp4v.20.3     45k mp4a.40.2    0k 22k 144p, A
160     mp4  256x144     15    │  135.08KiB  113k https │ avc1.4d400c  113k video only          144p, A, mp4_dash
278     webm 256x144     30    │   52.22KiB   44k https │ vp9           44k video only          144p, A, webm_dash
133     mp4  426x240     30    │  294.27KiB  246k https │ avc1.4d4015  246k video only          240p, A, mp4_dash
242     webm 426x240     30    │   33.27KiB   28k https │ vp9           28k video only          240p, A, webm_dash
134     mp4  640x360     30    │  349.59KiB  292k https │ avc1.4d401e  292k video only          360p, A, mp4_dash
18      mp4  640x360     30  2 │ ~525.60KiB  420k https │ avc1.42001E  420k mp4a.40.2    0k 44k 360p, A
243     webm 640x360     30    │   75.55KiB   63k https │ vp9           63k video only          360p, A, webm_dash
135     mp4  854x480     30    │  849.41KiB  710k https │ avc1.4d401f  710k video only          480p, A, mp4_dash
244     webm 854x480     30    │  165.49KiB  138k https │ vp9          138k video only          480p, A, webm_dash
22      mp4  1280x720    30  2 │ ~  1.82MiB 1493k https │ avc1.64001F 1493k mp4a.40.2    0k 44k 720p, A
136     mp4  1280x720    30    │    1.60MiB 1366k https │ avc1.4d401f 1366k video only          720p, A, mp4_dash
247     webm 1280x720    30    │  504.68KiB  420k https │ vp9          420k video only          720p, A, webm_dash
137     mp4  1920x1080   30    │    2.11MiB 1803k https │ avc1.640028 1803k video only          1080p, A, mp4_dash
248     webm 1920x1080   30    │  965.31KiB  804k https │ vp9          804k video only          1080p, A, webm_dash
ID  EXT  RESOLUTION FPS CH │   FILESIZE   TBR PROTO │ VCODEC        VBR ACODEC      ABR ASR MORE INFO
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
139 m4a  audio only      2 │   58.59KiB   48k https │ audio only        mp4a.40.5   48k 22k low, AES, m4a_dash
249 webm audio only      2 │   58.17KiB   48k https │ audio only        opus        48k 48k low, WE, webm_dash
250 webm audio only      2 │   76.07KiB   63k https │ audio only        opus        63k 48k low, WE, webm_dash
140 m4a  audio only      2 │  154.06KiB  128k https │ audio only        mp4a.40.2  128k 44k medium, WE, m4a_dash
251 webm audio only      2 │  138.96KiB  116k https │ audio only        opus       116k 48k medium, WE, webm_dash
17  3gp  176x144     12  1 │   55.79KiB   45k https │ mp4v.20.3     45k mp4a.40.2    0k 22k 144p, AES
160 mp4  256x144     15    │  135.08KiB  113k https │ avc1.4d400c  113k video only          144p, WE, mp4_dash
278 webm 256x144     30    │   52.22KiB   44k https │ vp9           44k video only          144p, WE, webm_dash
133 mp4  426x240     30    │  294.27KiB  246k https │ avc1.4d4015  246k video only          240p, WE, mp4_dash
242 webm 426x240     30    │   33.27KiB   28k https │ vp9           28k video only          240p, WE, webm_dash
134 mp4  640x360     30    │  349.59KiB  292k https │ avc1.4d401e  292k video only          360p, WE, mp4_dash
18  mp4  640x360     30  2 │ ~525.60KiB  420k https │ avc1.42001E  420k mp4a.40.2    0k 44k 360p, WE
243 webm 640x360     30    │   75.55KiB   63k https │ vp9           63k video only          360p, WE, webm_dash
135 mp4  854x480     30    │  849.41KiB  710k https │ avc1.4d401f  710k video only          480p, WE, mp4_dash
244 webm 854x480     30    │  165.49KiB  138k https │ vp9          138k video only          480p, WE, webm_dash
22  mp4  1280x720    30  2 │ ~  1.82MiB 1493k https │ avc1.64001F 1493k mp4a.40.2    0k 44k 720p, WE
136 mp4  1280x720    30    │    1.60MiB 1366k https │ avc1.4d401f 1366k video only          720p, WE, mp4_dash
247 webm 1280x720    30    │  504.68KiB  420k https │ vp9          420k video only          720p, WE, webm_dash
137 mp4  1920x1080   30    │    2.11MiB 1803k https │ avc1.640028 1803k video only          1080p, WE, mp4_dash
248 webm 1920x1080   30    │  965.31KiB  804k https │ vp9          804k video only          1080p, WE, webm_dash
ID  EXT  RESOLUTION FPS CH │   FILESIZE   TBR PROTO │ VCODEC        VBR ACODEC      ABR ASR MORE INFO
────────────────────────────────────────────────────────────────────────────────────────────────────────────────
249 webm audio only      2 │   58.17KiB   48k https │ audio only        opus        48k 48k low, M, webm_dash
250 webm audio only      2 │   76.07KiB   63k https │ audio only        opus        63k 48k low, M, webm_dash
140 m4a  audio only      2 │  154.06KiB  128k https │ audio only        mp4a.40.2  128k 44k medium, M, m4a_dash
251 webm audio only      2 │  138.96KiB  116k https │ audio only        opus       116k 48k medium, M, webm_dash
17  3gp  176x144     12  1 │   55.79KiB   45k https │ mp4v.20.3     45k mp4a.40.2    0k 22k 144p, M
160 mp4  256x144     15    │  135.08KiB  113k https │ avc1.4d400c  113k video only          144p, M, mp4_dash
278 webm 256x144     30    │   52.22KiB   44k https │ vp9           44k video only          144p, M, webm_dash
133 mp4  426x240     30    │  294.27KiB  246k https │ avc1.4d4015  246k video only          240p, M, mp4_dash
242 webm 426x240     30    │   33.27KiB   28k https │ vp9           28k video only          240p, M, webm_dash
134 mp4  640x360     30    │  349.59KiB  292k https │ avc1.4d401e  292k video only          360p, M, mp4_dash
18  mp4  640x360     30  2 │ ~525.60KiB  420k https │ avc1.42001E  420k mp4a.40.2    0k 44k 360p, M
243 webm 640x360     30    │   75.55KiB   63k https │ vp9           63k video only          360p, M, webm_dash
135 mp4  854x480     30    │  849.41KiB  710k https │ avc1.4d401f  710k video only          480p, M, mp4_dash
244 webm 854x480     30    │  165.49KiB  138k https │ vp9          138k video only          480p, M, webm_dash
22  mp4  1280x720    30  2 │ ~  1.82MiB 1493k https │ avc1.64001F 1493k mp4a.40.2    0k 44k 720p, M
136 mp4  1280x720    30    │    1.60MiB 1366k https │ avc1.4d401f 1366k video only          720p, M, mp4_dash
247 webm 1280x720    30    │  504.68KiB  420k https │ vp9          420k video only          720p, M, webm_dash
137 mp4  1920x1080   30    │    2.11MiB 1803k https │ avc1.640028 1803k video only          1080p, M, mp4_dash
248 webm 1920x1080   30    │  965.31KiB  804k https │ vp9          804k video only          1080p, M, webm_dash

Also, maybe we could add it only with -v?

-                      client_name,
+                      client_name if self.get_param('verbose') else None,

cc @coletdjnz

Lesmiscore added a commit to ytdl-patched/ytdl-patched that referenced this pull request Feb 23, 2023
@pukkandan
Copy link
Member

You never replied, @Lesmiscore

@Lesmiscore
Copy link
Contributor Author

Lesmiscore commented Mar 1, 2023

  1. There is no distinction b/w web, web_embeeded etc

That's fine to me, but you don't like it?

  1. It's sometimes giving clientName and other times the friendly name yt-dlp uses

Use the YouTube's client name as always?

@coletdjnz
Copy link
Member

You could use the client integer number instead if it needs to be compact, though it's a bit less clear.

@Lesmiscore

This comment was marked as off-topic.

@pukkandan
Copy link
Member

The code in #6254 (comment) can be tweaked to pass any data about the client into where formats are built. We just need to decide how we want it to be displayed.

You could use the client integer number instead if it needs to be compact, though it's a bit less clear.

Using numeric code is worse than abbreviation (my code) imo

@pukkandan pukkandan requested a review from coletdjnz March 4, 2023 17:11
@pukkandan pukkandan merged commit c795c39 into yt-dlp:master Mar 11, 2023
elyse0 pushed a commit to elyse0/yt-dlp that referenced this pull request Mar 12, 2023
qa4FKm3mUr added a commit to qa4FKm3mUr/yt-dlp that referenced this pull request Jul 30, 2023
* [utils] Add hackish 'now' support for --download-sections

* [utils] Add microseconds to unified_timestamp

* [common] Extract start and end keys for Dash fragments

* [utils] Allow using local timezone for 'now' timestamps

* Use local timezone for download sections

* Add fixme in modified parse_chapters function

A range like '*(now-1hour)-(now-30minutes)' doesn't work

* [youtube] Support --download-sections for YT Livestream from start

* Create last_segment_url only if necessary

* Improve parse_chapters comments

* Fix linter

* [extractor/iq] Set more language codes (yt-dlp#6476)

Authored by: D0LLYNH0

* [extractor/opencast] Add ltitools to `_VALID_URL` (yt-dlp#6371)

Authored by: C0D3D3V

* [downloader/curl] Fix progress reporting

Bug in 8c53322
Closes yt-dlp#6490

* [extractor/youtube] Bypass throttling for `-f17`

and related cleanup

Thanks @AudricV for the finding

* [extractor/twitch] Fix `is_live` (yt-dlp#6500)

Closes yt-dlp#6494
Authored by: elyse0

* [extractor/cbc:gem] Update `_VALID_URL` (yt-dlp#6499)

Authored by: makeworld-the-better-one
Closes yt-dlp#6395

* Support loading info.json with a list at it's root

* [extractor/hidive] Fix login

Fixes yt-dlp#6493 (comment)

* [extractor/opencast] Fix format bug (yt-dlp#6512)

Authored by: C0D3D3V

* [extractor/rokfin] Re-construct manifest url (yt-dlp#6507)

Authored by: vampirefrog

* [extractor/youtube] Add client name to `format_note` when `-v` (yt-dlp#6254)

Authored by: Lesmiscore, pukkandan

* [extractor/youtube] Add extractor-arg `include_duplicate_formats`

* [extractor/youtube] Construct fragment list lazily

Building fragment list for all formats take significant time for large videos

* Support negative durations

* Revert "[utils] Allow using local timezone for 'now' timestamps"

This reverts commit 1799a6a.

* Add fragment count

* Fix unified_timestamp

* Remove tz_aware date code

* Add debug for selected section

* Add initial documentation

* Fix linter

* Fix linter

* Allow days in parse_duration

* Improve option documentation

* Add some documentation

* Lock less agressively

This gives a speed performance of about 30%

* Fix return values of _extract_sequence_from_mpd

* Always compute last_seq

* Support for epoch timestamps

* Update options docs

* Restore README.md

I think this is auto-generated by some script

* Add warning about --download-sections without --live-from-start

* Fix bug after merge

* Update yt_dlp/options.py

* Cleanup

---------

Co-authored-by: Elyse <26639800+elyse0@users.noreply.github.com>
Co-authored-by: Sophire <115919609+sophie0x@users.noreply.github.com>
Co-authored-by: D0LLYNH0 <67797325+D0LLYNH0@users.noreply.github.com>
Co-authored-by: Daniel Vogt <daniel-vogt@mail.de>
Co-authored-by: pukkandan <pukkandan.ytdlp@gmail.com>
Co-authored-by: makeworld <25111343+makeworld-the-better-one@users.noreply.github.com>
Co-authored-by: Daniel Vogt <c0d3d3v@mag-keinen-spam.de>
Co-authored-by: vampirefrog <vampirefrog@users.noreply.github.com>
Co-authored-by: Lesmiscore <nao20010128@gmail.com>
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Co-authored-by: bashonly <bashonly@bashonly.com>
aalsuwaidi pushed a commit to aalsuwaidi/yt-dlp that referenced this pull request Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site-enhancement Feature request for some website
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants