Repository navigation
Conversation
The provider stores 1080p as 1088 rows, 720p as 736 and 360p as 384, without a crop in the SPS, so downloads show a green bar at the bottom. download() now probes the chosen variant with ffprobe, retried up to 3 times, and adds h264_metadata=crop_bottom with the difference to the ffmpeg copy. Streams that are not h264 or are already the label height are copied as before. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
|
Can you demonstrate this affecting any other anime than cyberpunk edgerunners? I'd prefer not to merge this workaround if this is just a oneoff |
The crop now applies to any h264 or hevc variant that decodes 1 to 31 rows taller than its quality label, which is the most an encoder pads to reach a 16 or 32 row multiple. hevc uses hevc_metadata. Variants 32 or more rows taller are real pictures and download unchanged: the 360p label on many hianime uploads is a 480-row picture. The probe now runs before the yt-dlp branch, and a padded variant goes to the ffmpeg branch, which can crop. Labels without a "p" suffix, such as "1080", are read too. ffprobe is retried only when it gives no answer, so clean streams cost one probe. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Author
|
Thinking about it more, this should be fixed on hianime's side, not in ani-cli. It's their new encoder that skipped the crop, and only on uploads from around Oct 20 plus one on Oct 25, so a workaround here would mostly sit unused. I'm closing this PR. If you have a way to reach the hianime folks, it'd be worth asking them to re-encode these: Cyberpunk: Edgerunners 2 (all 10 eps), Nia Liston ep 3, Shiotaiou no Satou-san ep 3, Choujun! Choujou-senpai ep 3, Battle Spirits [Re] Zekkai No Ku ep 3 and Kanata kara ep 4. I used Claude Code to check about 115 shows and everything else looks fine. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Template
Type of change
Description
Fixes #1979.
Checklist
-chistory and continue work-ddownloads work-e(select episode) aka-r(range selection) works-Sselect index works-qquality works-ssyncplay works-vvlc works--duband regular (sub) mode both work--nextep-countdowncountdown to next ep works-hhelp info is up to dateAdditional Testcases
(these do not block a merge)
--skipani-skip works--no-detachno detach works--exit-after-playauto exit after playing worksCopy Pasta