feat: add -bg-anim flag for per-frame 1-bit animation backgrounds#8
Open
Lufftre wants to merge 1 commit into
Open
feat: add -bg-anim flag for per-frame 1-bit animation backgrounds#8Lufftre wants to merge 1 commit into
Lufftre wants to merge 1 commit into
Conversation
Load gzip-compressed .bitanim files (uint16le width/height header + packed 1-bit frames) and use them as per-frame background patterns. Nearest-neighbor scaling to any output resolution. Compatible with all output formats and text overlay.
Collaborator
|
Nice extension. However, you need to add some tests, e.g. using a sample file in testdata in order to get the same level of test coverage as the repo currently has. Is this format used somewhere else, so that there is some example content? Otherwise it may be good to add some script or program to generate it, e.g. by using ffmpeg with an appropriate filter to get the 1-bit content, and then some extra processing steps after that. One could of course think about many other extensions, but I think that most of them could hopefully be done by using the projects API and not extending the CLI apps themselves. Extending to beyond palette of colors requires some changes, though... |
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.
Summary
-bg-anim <file>flag to hi264gen for loading 1-bit animation files as per-frame backgroundsBitAnimloader inpkg/yuv/bitanim.goreads gzip-compressed packed-bit frames with nearest-neighbor scaling to any output resolutionFormat
The
.bitanimformat is a gzip-compressed binary: 4-byte header (uint16le width, uint16le height in macroblocks) followed byceil(W*H/8)bytes per frame (1 bit per block, MSB first). Frame count is inferred from data length.Usage
Test plan