Commit Graph

40 Commits (2a4f2e82dbeeb0c9130883c83dac689d5260c871)

Author SHA1 Message Date
Simon Sawicki f2a4ea1794
[pp/embedthumbnail] Fix postprocessor (#10248)
* [compat] Improve `imghdr.what` detection
* [pp/embedthumbnail] Improve imghdr fail message
* [pp/embedthumbnail] Fix AtomicParsley error handling

Authored by: Grub4K
5 months ago
sepro add96eb9f8
[cleanup] Add more ruff rules (#10149)
Authored by: seproDev

Reviewed-by: bashonly <88596187+bashonly@users.noreply.github.com>
Reviewed-by: Simon Sawicki <contact@grub4k.xyz>
5 months ago
pukkandan 47ab66db0f
[docs] Misc Cleanup (#8977)
Closes #8355, #8944

Authored by: bashonly, Grub4k, Arthurszzz, seproDev, pukkandan

Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
Co-authored-by: bashonly <bashonly@protonmail.com>
Co-authored-by: Arthurszzz <minecraftgamerarthur@gmail.com>
Co-authored-by: Simon Sawicki <accounts@grub4k.xyz>
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
8 months ago
Neurognostic 8a4cd12c8f
[pp/EmbedThumbnail] Support `m4v` (#7583)
Authored by: Neurognostic
1 year ago
Lesmiscore 0f0875ed55
[postprocessor/EmbedThumbnail,postprocessor/FFmpegMetadata] Fix error on attaching thumbnails and info json for mkv/mka (#6647)
Authored by: Lesmiscore

Current yt-dlp code never hit this bug, but would hit once filename sanitization gets better
2 years ago
Noah e02e6d86db
[embedthumbnail] Fix thumbnail name in mp3 (#5163)
Authored by: How-Bout-No
2 years ago
pukkandan b5e9a641f5
[postprocessor/embedthumbnail] Detect libatomicparsley.so 2 years ago
pukkandan f0c9fb9682
[utils] `Popen`: Refactor to use contextmanager
Fixes https://github.com/yt-dlp/yt-dlp/issues/3531#issuecomment-1156223597
2 years ago
pukkandan 5792c950bf
[compat] Implement `compat.imghdr`
Python 3.11 deprecates `imghdr` module
3 years ago
pukkandan 43d7f5a5d0
[EmbedThumbnail] Do not obey `-k` 3 years ago
pukkandan 1d485a1a79
[cleanup] Misc fixes
Closes #3565, https://github.com/yt-dlp/yt-dlp/issues/3514#issuecomment-1105944364
3 years ago
Evan Spensley 7774db5bf9
[EmbedThumbnail] Disable thumbnail conversion for mkv (#3512)
Closes #3209
Authored by: evansp
3 years ago
pukkandan 9b8ee23b99
[dependencies] Create module with all dependency imports 3 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 .
3 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
3 years ago
pukkandan f894294636
[EmbedThumbnail] Do not remove id3v1 tags 3 years ago
pukkandan 397235c52b
[ffmpeg] Standardize use of `-map 0`
Closes #2182
3 years ago
pukkandan 77cee0f188
[EmbedThumbnail] Prefer AtomicParsley over ffmpeg if available 3 years ago
pukkandan d3c93ec2b7
Don't create console for subprocesses on Windows (#1261)
Closes #1251
3 years ago
Paul Wrubel d75201a873
Use `os.replace` where applicable (#793)
When using 
```py
os.remove(encodeFilename(filename))
os.rename(encodeFilename(temp_filename), encodeFilename(filename))
```
the `os.remove` need not be atomic and so can be executed arbitrarily compared to the immediately following rename call. It is better to use `os.replace` instead

Authored by: paulwrubel
3 years ago
pukkandan 00034c146a
[embedthumbnail] Fix `_get_thumbnail_resolution` 3 years ago
pukkandan 15a4fd53d3
[thumbnailsconvertor] Treat `jpeg` as `jpg` 3 years ago
pukkandan e858a9d6d3
[EmbedThumbnail] Add compat-option `embed-thumbnail-atomicparsley`
to force use of atomicparsley for embedding thumbnails in mp4

Related: #411
3 years ago
pukkandan 8326b00aab
Allow `images` formats
Necessary for #343.

* They are identified by `vcodec=acodec='none'`
* These formats show as the worst in `-F`
* Any postprocessor that expects audio/video will be skipped
* `b*` and all related selectors will skip such formats
* This commit also does not add any selector for downloading such formats. They have to be explicitly requested by the `format_id`. Implementation of a selector is left for when #389 is resolved
3 years ago
pukkandan 337e0c62f8
[embedthumbnail] Correctly escape filename
Closes #352
The approach in [1] is faulty as can be seen in the test cases
1. bff857a8af
4 years ago
pukkandan 885cc0b75c
[embedthumbnail] Embed if any thumbnail was downloaded, not just the best 4 years ago
Oliver Freyermuth f17c702270
[ard] Allow URLs without `-` before id
https://github.com/ytdl-org/youtube-dl/pull/29091

Authored by: olifre
4 years ago
pukkandan acdecdfaef
[embedthumbnail] Embed in `mp4`/`m4a` using mutagen
Code from: https://github.com/ytdl-org/youtube-dl/pull/23525
Co-authored by: tripulse , pukkandan
4 years ago
louie-github a927acb1ec
[ThumbnailsConvertor] Support conversion to `png` and make it the default (#333)
PNG, being a lossless format, should be a better default here compared to JPG since we won't be compressing to a lossy format and losing some of the original image data
PNG is also supported for embedding in all the formats similar to JPEG

Authored by: louie-github
4 years ago
pukkandan 28b0eb0f65
[cleanup] See desc
* Remove struct from `embedthumbnail`
* Use bullet lists in readme where numbered list don't make sense
* Fix error introduced in 9c2b75b561 when `ie_result` is `None`
4 years ago
pukkandan 95131b2176
[embedthumbnail] Add `flac` support and refactor `mutagen` code
https://github.com/ytdl-org/youtube-dl/pull/28894, https://github.com/ytdl-org/youtube-dl/pull/24310
Authored by: tripulse
4 years ago
pukkandan 4d224a3022
[embedthumbnail] Fix bug where jpeg thumbnails were converted again
Closes #297
4 years ago
pukkandan 8fa43c73d8
Add option `--convert-thumbnails`
Closes: https://github.com/yt-dlp/yt-dlp/issues/99 https://github.com/yt-dlp/yt-dlp/issues/102
4 years ago
pukkandan 56d868dbb7
Allow running some `postprocessors` before actual download 4 years ago
pukkandan beb4b92a66
More consistent warning messages (#173)
Co-authored by: Damiano Amatruda <damiano.amatruda@outlook.com>
4 years ago
pukkandan dcf64d43e0
[movefiles] Fix bugs and make more robust 4 years ago
pukkandan ca87974543
[embedthumbnail] Set mtime correctly
Related: https://github.com/yt-dlp/yt-dlp/issues/67
4 years ago
pukkandan e92caff5d5
Refactor (See desc)
* Create `FFmpegPostProcessor.real_run_ffmpeg` that can accept multiple input/output files along with switches for each
* Rewrite `cli_configuration_args` and related functions
* Create `YoutubeDL._ensure_dir_exists` - this was previously defined in multiple places
4 years ago
pukkandan 0e0040519b [embedthumbnail] Fix bug with deleting original thumbnail (Closes #113)
:ci skip dl
4 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
4 years ago