Skip to content
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

[ie/bilibili] Extract Dolby Vision & Dolby Audio #8142

Merged
merged 5 commits into from Sep 21, 2023

Conversation

ClosedPort22
Copy link
Contributor

@ClosedPort22 ClosedPort22 commented Sep 18, 2023

IMPORTANT: PRs without the template will be CLOSED

Description of your pull request and other information

Fixes #4050

This PR adds the ability to extract Dolby Audio formats and improves the extraction of HDR and Dolby Vision formats when the user is logged in and has an active premium subscription.

> python '.\yt-dlp\yt_dlp\__main__.py' -v -F --cookies .\sess.txt -I 1 https://www.bilibili.com/video/BV1oL411c77X
[debug] Command-line config: ['-v', '-F', '--cookies', '.\\sess.txt', '-I', '1', 'https://www.bilibili.com/video/BV1oL411c77X']
[debug] Encodings: locale utf-8, fs utf-8, pref utf-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.07.06 [b532a3481] (source)
[debug] Lazy loading extractors is disabled
[debug] Git HEAD: 2d2a73b99
[debug] Python 3.10.0 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1l  24 Aug 2021)
[debug] exe versions: ffmpeg 6.0-full_build-www.gyan.dev (setts), ffprobe 6.0-full_build-www.gyan.dev, rtmpdump 2.3
[debug] Optional libraries: brotli-1.0.9, certifi-2021.10.08, pycrypto-3.15.0, sqlite3-2.6.0
[debug] Proxy map: {}
[debug] Loaded 1866 extractors
[BiliBili] Extracting URL: https://www.bilibili.com/video/BV1oL411c77X
[BiliBili] 1oL411c77X: Downloading webpage
[BiliBili] BV1oL411c77X: Extracting videos in anthology
[BiliBili] Downloading playlist BV1oL411c77X - add --no-playlist to download just the video BV1oL411c77X
[download] Downloading playlist: [杜比视界·杜比全景声]官方演示片合集
[BiliBili] Playlist [杜比视界·杜比全景声]官方演示片合集: Downloading 1 items
[download] Downloading item 1 of 1
[BiliBili] Extracting URL: https://www.bilibili.com/video/BV1oL411c77X?p=1
[BiliBili] 1oL411c77X: Downloading webpage
[BiliBili] BV1oL411c77X: Extracting videos in anthology
[BiliBili] 465781050: Extracting chapters
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, size, br, asr, proto, vext, aext, hasaud, source, id
[info] Available formats for BV1oL411c77X_p1:
ID     EXT RESOLUTION FPS HDR │   FILESIZE   TBR PROTO │ VCODEC          VBR ACODEC       ABR
─────────────────────────────────────────────────────────────────────────────────────────────
30250  m4a audio only         │ ≈ 38.28MiB 1668k https │ audio only          ac-3       1668k
30216  m4a audio only         │ ≈  1.55MiB   67k https │ audio only          mp4a.40.2    67k
30232  m4a audio only         │ ≈  3.05MiB  133k https │ audio only          mp4a.40.2   133k
30280  m4a audio only         │ ≈  7.56MiB  329k https │ audio only          mp4a.40.2   329k
100022 mp4 640x360     24     │ ≈  2.75MiB  120k https │ av01.0.01M.08  120k video only
30016  mp4 640x360     24     │ ≈  8.08MiB  352k https │ avc1.64001E    352k video only
30011  mp4 640x360     24     │ ≈  4.81MiB  210k https │ hev1.1.6.L120  210k video only
100023 mp4 852x480     24     │ ≈  3.35MiB  146k https │ av01.0.04M.08  146k video only
30032  mp4 852x480     24     │ ≈ 17.59MiB  766k https │ avc1.64001F    766k video only
30033  mp4 852x480     24     │ ≈  9.98MiB  435k https │ hev1.1.6.L120  435k video only
100024 mp4 1280x720    24     │ ≈  6.21MiB  271k https │ av01.0.05M.08  271k video only
30064  mp4 1280x720    24     │ ≈ 26.82MiB 1168k https │ avc1.640028   1168k video only
30066  mp4 1280x720    24     │ ≈ 15.18MiB  661k https │ hev1.1.6.L120  661k video only
100026 mp4 1920x1080   24     │ ≈ 12.81MiB  558k https │ av01.0.08M.08  558k video only
30080  mp4 1920x1080   24     │ ≈ 33.28MiB 1450k https │ avc1.640032   1450k video only
30077  mp4 1920x1080   24     │ ≈ 18.84MiB  821k https │ hev1.1.6.L120  821k video only
100027 mp4 1920x1080   24     │ ≈ 21.93MiB  956k https │ av01.0.08M.08  956k video only
30112  mp4 1920x1080   24     │ ≈ 46.99MiB 2047k https │ avc1.640032   2047k video only
30102  mp4 1920x1080   24     │ ≈ 26.44MiB 1152k https │ hev1.1.6.L120 1152k video only
100029 mp4 3840x2160   24     │ ≈ 49.26MiB 2146k https │ av01.0.12M.08 2146k video only
30120  mp4 3840x2160   24     │ ≈132.61MiB 5778k https │ avc1.4D4033   5778k video only
30121  mp4 3840x2160   24     │ ≈ 74.46MiB 3244k https │ hev1.1.6.L153 3244k video only
30126  mp4 3840x2160   24 DV  │ ≈174.99MiB 7625k https │ hvc1.2.4.L150 7625k video only
[download] Finished downloading playlist: [杜比视界·杜比全景声]官方演示片合集
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 all of the following options that apply:

  • 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?

Copilot Summary

🤖 Generated by Copilot at 2d2a73b

Summary

🎵🌈🆔

Enhance Bilibili extractor to support Dolby audio and dynamic range formats. Add new fields and documentation to yt_dlp/extractor/bilibili.py.

Bilibili extracts
acodec, dynamic_range -
New fields for sound

Walkthrough

  • Add support for extracting Dolby audio formats from Bilibili videos (link)
  • Map Bilibili video IDs to dynamic range labels, such as DV and HDR10 (link)
  • Include dynamic range information in the video format dictionary (link)

@bashonly bashonly added the site-enhancement Feature request for some website label Sep 18, 2023
@bashonly bashonly self-requested a review September 18, 2023 23:46
yt_dlp/extractor/bilibili.py Outdated Show resolved Hide resolved
yt_dlp/extractor/bilibili.py Outdated Show resolved Hide resolved
yt_dlp/extractor/bilibili.py Outdated Show resolved Hide resolved
yt_dlp/extractor/bilibili.py Outdated Show resolved Hide resolved
@bashonly bashonly added the pending-fixes PR has had changes requested label Sep 20, 2023
yt_dlp/extractor/bilibili.py Outdated Show resolved Hide resolved
@bashonly bashonly added pending-review PR needs a review and removed pending-fixes PR has had changes requested labels Sep 21, 2023
@bashonly bashonly removed the pending-review PR needs a review label Sep 21, 2023
@bashonly bashonly merged commit b84fda7 into yt-dlp:master Sep 21, 2023
16 checks passed
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
None yet
Development

Successfully merging this pull request may close these issues.

[bilibili] Dolby Vision and Dolby Atmos support
2 participants