Commit Graph

40 Commits (ae61d108dd83a951b6e8a27e1fb969682416150d)

Author SHA1 Message Date
pukkandan ae61d108dd
[cleanup] Misc cleanup 2 years ago
pukkandan bbae437723
[hls] Warn user when trying to download live HLS
We do not automatically switch to ffmpeg because the detection is not 100% accurate
2 years ago
pukkandan 14f25df2b6
[compat] Remove deprecated functions from core code 2 years ago
pukkandan c487cf0010
[cleanup] Misc 2 years ago
pukkandan 0f06bcd759
[cleanup] Minor fixes (See desc)
* [youtube] Fix `--youtube-skip-dash-manifest`
* [build] Use `$()` in `Makefile`. Closes #3684
* Fix bug in 385ffb467b
* Fix bug in 43d7f5a5d0
* [cleanup] Remove unnecessary `utf-8` from `str.encode`/`bytes.decode`
* [utils] LazyList: Expose unnecessarily "protected" attributes
and other minor cleanup
2 years ago
felix e4fa34a13e
[hls] Fix unapplied byte_range for EXT-X-MAP fragment
Cherry-picked from #3302
Authored by: fstirlitz
2 years ago
pukkandan 9b8ee23b99
[dependencies] Create module with all dependency imports 2 years ago
pukkandan f82711587c
[cleanup] Sort imports
Using https://github.com/PyCQA/isort

    isort -m VERTICAL_HANGING_INDENT --py 36 -l 80 --rr -n --tc .
2 years ago
pukkandan 86e5f3ed2e
[cleanup] Upgrade syntax
Using https://github.com/asottile/pyupgrade

1. `__future__` imports and `coding: utf-8` were removed
2. Files were rewritten with `pyupgrade --py36-plus --keep-percent-format`
3. f-strings were cherry-picked from `pyupgrade --py36-plus`

Extractors are left untouched (except removing header) to avoid unnecessary merge conflicts
2 years ago
nyuszika7h 6b993ca765
[hls] Better FairPlay DRM detection (#1661)
Authored by: nyuszika7h
3 years ago
pukkandan 03b4de722a
[downloader] Fix slow progress hooks
Closes #1301
3 years ago
pukkandan 49e7e9c3ce
[docs,build] Change all pycryptodome references to pycryptodomex 3 years ago
shirt 7687c8ac6e
[HLS] Fix decryption issues (#1117)
* Unpad HLS fragments with PKCS#7 according to datatracker.ietf.org/doc/html/rfc8216
* media_sequence should only be incremented in for media fragments
* The native decryption should only be used if ffmpeg is unavailable since it is significantly slower. Closes #1086

Authored by: shirt-dev, pukkandan
3 years ago
pukkandan d9d8b85747
[fragment] Fix range header when using `-N` and media sequence (#1048)
Authored by: shirt
3 years ago
pukkandan 57aa7b8511
[hls] Byterange + AES128 is supported by native downloader 3 years ago
pukkandan edf65256aa
[hls,aes] Fallback to native implementation for AES-CBC
and detect `Cryptodome` in addition to `Crypto`

Closes #935
Related: #938
3 years ago
Felix S 7a6742b5f9
[webvtt] Fix timestamp overflow adjustment (#698)
In some streams, empty segments may appear with a bogus, non-monotone MPEG timestamp.
This should not be considered as an overflow

Authored by: fstirlitz
3 years ago
Felix S 25a3f4f5d6
[webvtt] Merge daisy-chained duplicate cues (#638)
Fixes: https://github.com/yt-dlp/yt-dlp/issues/631#issuecomment-893338552

Previous deduplication algorithm only removed duplicate cues with
identical text, styles and timestamps.  This change also merges
cues that come in ‘daisy chains’, where sequences of cues with
identical text and styles appear in which the ending timestamp of
one equals the starting timestamp of the next.

This deduplication algorithm has the somewhat unfortunate side effect
that NOTE blocks between cues, if found, will be emitted in a different
order relative to their original cues.  This may be unwanted if perfect
fidelity is desired, but then so is daisy-chain deduplication itself.
NOTE blocks ought to be ignored by WebVTT players in any case.

Authored by: fstirlitz
3 years ago
pukkandan a46a815b05
[cleanup] Fix linter in 96fccc101f 3 years ago
pukkandan 96fccc101f [downloader] Allow streaming unmerged formats to stdout using ffmpeg
For this to work:
1. The downloader must be ffmpeg
2. The selected formats must have the same protocol
3. The formats must be downloadable by ffmpeg to stdout

Partial solution for: https://github.com/ytdl-org/youtube-dl/issues/28146, https://github.com/ytdl-org/youtube-dl/issues/27265
3 years ago
pukkandan dbf5416a20 [cleanup] Refactor some code 3 years ago
pukkandan 3ba7740dd8
[downloader] Pass `info_dict` to `progress_hook`s 3 years ago
pukkandan bd4d1ea398
[cleanup] Minor refactoring of `fragment` 3 years ago
pukkandan 8e897ed283
[fragment] Return status of download correctly 3 years ago
pukkandan 4c7853de14
[fragment] Merge during download for `-N`, and refactor `hls`/`dash` (#364) 3 years ago
pukkandan e06ca6ddac
[hls] Decrypt fragment when reading from disk
Closes #373
3 years ago
pukkandan d89da64b1d
[hls,dash] When using `concurrent_fragment_downloads`, do not keep the fragment content in memory
Partial fix for #359
This is a temporary solution until #364 can be implemented
3 years ago
pukkandan 5dcd8e1d88
[hls] Disable external downloader for `webtt` 3 years ago
pukkandan 000ee7ef34
[fragment] Make sure first segment is not skipped 3 years ago
pukkandan 6ef6bcbd6b
[fragment] Ensure the file is closed on error 3 years ago
Felix S 15828bcf25 [downloader/hls] Handle MPEG-2 PES timestamp overflow 3 years ago
Felix S 333217f43e [downloader/hls] Remove duplicate cues using a sliding window of candidates 3 years ago
Felix S 4a2f19abbd [downloader/hls] Assemble single-file WebVTT subtitles from HLS segments 3 years ago
pukkandan 88728713c8
Py2 compatibility for `FileNotFoundError` 3 years ago
pukkandan 52a8a1e1b9
Option to choose different downloader for different protocols
* Renamed `--external-downloader-args` to `--downloader-args`
* Added `native` as an option for the downloader
* Use similar syntax to `--downloader-args` etc. Eg: `--downloader dash:native --downloader aria2c`
* Deprecated `--hls-prefer-native` and `--hls-prefer-ffmpeg` since the same can now be done with `--downloader "m3u8:native"` and `m3u8:ffmpeg` respectively
* Split `frag_urls` protocol into `m3u8_frag_urls` and `dash_frag_urls`
* Standardize shortening of protocol names with `downloader.shorten_protocol_name`
3 years ago
pukkandan beb4b92a66
More consistent warning messages (#173)
Co-authored by: Damiano Amatruda <damiano.amatruda@outlook.com>
3 years ago
shirt 4cf1e5d2f9
Native concurrent downloading of fragments (#166)
* Option `--concurrent-fragments` (`-N`) to set the number of threads

Related: #165

Known issues:
* When receiving Ctrl+C, the process will exit only after finishing the currently downloading fragments
* The download progress shows the speed of only one thread

Authored by shirt-dev
3 years ago
pukkandan 0a473f2f0f
More improvements to HLS/DASH external downloader code
* Fix error when there is no `protocol` in `info_dict`
* Move HLS byte range detection to `Aria2cFD` so that the download will fall back to the native downloader instead of ffmpeg
* Fix bug with getting no fragments in DASH
* Convert `check_results` in `can_download` to a generator
3 years ago
shirt-dev d7009caa03
Improve HLS/DASH external downloader code (#162)
Authored by: shirt
3 years ago
Pccode66 7a5c1cfe93
Completely change project name to yt-dlp (#85)
* All modules and binary names are changed
* All documentation references changed
* yt-dlp no longer loads youtube-dlc config files
* All URLs changed to point to organization account

Co-authored-by: Pccode66
Co-authored-by: pukkandan
3 years ago