Commit Graph

166 Commits (c54ed3455cc8acd865d3d8584efbe9067227ce2d)

Author SHA1 Message Date
Mike Lang 9e8cb7bee8 Make ensure_directory() work with paths with no directory component 2 weeks ago
Mike Lang 8832197ab1 add diamond wipe 2 weeks ago
Mike Lang 9d45833ed1 fix returning wrong thing 2 weeks ago
Mike Lang 3bbedde112 download_media: Handle relative urls in redirect 2 weeks ago
Mike Lang e8ff4ed144 fix parsing certain imgur album links 2 weeks ago
Mike Lang fd0f0399fc Don't use ExceptionGroup because upgrading python is too painful 2 weeks ago
Mike Lang 2fcbff3b44 Fix full cuts not using custom transitions properly 2 weeks ago
Christopher Usher d3fa140995 Another typo fix 3 weeks ago
Christopher Usher 843ee5dca5 Fixing incomplete changes to calculate_shift 3 weeks ago
Christopher Usher d6f976ac0f Bug fixes and improvements in response to comments on the PR 3 weeks ago
Christopher Usher a0953ecdcb renamed one_off 3 weeks ago
Christopher Usher bd89655190 code to compute what shift a time is in 3 weeks ago
Dan Collins 3b737f8155 Add 'batman logo wipe' transition 3 weeks ago
Mike Lang a0ca96aff6 download_media: Get imgur links working and add test script 3 weeks ago
Mike Lang c2ff2dfbb1 download_imgur_url: Clarify not handling i.imgur.com 3 weeks ago
Mike Lang 83f18eda84 download_media: Special casing for imgur 3 weeks ago
Mike Lang 39c7215910 No longer resize frames to template size before cropping
This was originally done to ensure the crop settings worked no matter what the source resolution was,
but in practice the source resolution is stable (1080p) and the double-resize loses a lot of quality
if you actually want to scale *up* the cropped image.
3 weeks ago
Thomas Chick 3cbd44bd17 Switch squeezeh and squeezev descriptions.
My bad, had the videos in front of me and still stuffed it. `squeezeh` squeezes the video to *become* horizontal, not horizontally. Ditto `squeezev`.
1 month ago
Thomas Chick 0dfffc19c2 Document remaining transitions, deprecate fadefast and fadeslow.
It turns out that `fadefast` and `fadeslow` both take about twice as long as `fade` to do a job so similar there's no good reason to keep either in our accepted transitions list, especially when the former is so misleadingly named. (Amusingly, in my testing, `fadefast` was actually the slower of the two.)
1 month ago
Christopher Usher e0fc1eaf08 Refactor get_thumbnail and other fixes and improvments 1 month ago
Christopher Usher f814945dbd Updating thumbnail generation to use database for templates and allow crop and
location to be varied
1 month ago
Mike Lang ff8475dc48 Disable type registration when buscribe connects to the DB
Because those types don't exist in the buscribe DB.
1 month ago
Mike Lang 9dfb00f4ab chat_archiver: Logic for checking and downloading media links 2 months ago
Mike Lang 2855ec759d download_media: Add pdf to default allowed content types
We want to capture linked PDFs in addition to videos and images
2 months ago
Mike Lang b46c577014 download_media: Add function for checking if a URL has been downloaded before 2 months ago
Mike Lang 352c9e9081 download_media: Get data from potentially malicious URLs and store in the filesystem
This is suitable for taking arbitary URLs from chat, etc and trying to fetch them.
It downloads them to a filepath that contains a hash of the URL and content.
2 months ago
Mike Lang 23ad78d592 Record in database when end time is "--"
We need this so that reverse sync reproduces these values correctly.

To handle this in the database, we have a composite type (dashed: boolean, value: timestamp).
Value is always valid and is equivalent to the old timestamp column,
but must be equal to start_time if dashed is true.

The only place we directly reference this column outside sheetsync is thrimshim, where we
always consider the value only.
3 months ago
Mike Lang e50adbf2da Fix a bug where transitions past the first are not timed correctly
The video offset is timed relative to the full video up until that point, not the previous range.
3 months ago
Mike Lang d4de1f94be Add descriptions to xfade transitions 3 months ago
Mike Lang d5f73c226c GoogleAPIClient: Improve error reporting 3 months ago
Mike Lang 6b0a025812 Add transition support to fast cuts 4 months ago
Mike Lang c8724a1e63 rewrite fast cuts to support transitions being allowed later
In theory there should be no change in actual output for no-transition cuts,
even though we're handling the logic in a very different way.

This doesn't actually allow transitions, but sets up most of what is needed
4 months ago
Mike Lang 066d10f94a Full cut: Support video transitions
We support all preset transitions in the xfade filter,
as well as a handful of "custom" ones we define.

We only support an audio cross-fade. We may want to support J and L audio cuts (switch audio
before/after the transition) later.
4 months ago
Mike Lang 5fbdaf8422 full cuts: Support multiple ranges
This allows full cuts to support multiple ranges in the same way fast cuts do,
by using multiple inputs to ffmpeg and concat filters joining them.

This will be easy to add transitions to later as this is "just" replacing a concat filter
with an xfade + afade filter.
4 months ago
Mike Lang cc789caa7e Move ffmpeg_cut_segment to new ffmpeg_cut_many() system 4 months ago
Mike Lang ba36338db4 Add simpler wrapper for ffmpeg_cut_segments() for single-input case
Also change ffmpeg_cut_many() arg order so common cases can have a default value.
4 months ago
Mike Lang e65145bcad Replace ffmpeg_cut_stdin() with ffmpeg_cut_many()
This is a more featureful wrapper around ffmpeg with notable differences:
- It's used as a context manager, and so can manage its own cleanup
- It takes care of input feeding
- It can handle multiple inputs (via pipes), instead of one (via stdin)

This drastically reduces the setup and cleanup code required for most basic usage,
and the multi-input support will be used in followup changes.
4 months ago
Mike Lang d571bbe81e ffmpeg_cut_stdin: Remove cut_start and duration built-in args
Of 4 users of this function, all but one set them to None.
We're about to replace that one usage with something else, so it makes more sense
to not have them as options at all and just have the user add to the encode args manually.
4 months ago
ZeldaZach 8bbc72184c Support hot reload of Zulip Schedule
- Move sheets API into common dir, since multi use
- Live download from Google Sheets using Config
- Falls back on old schedule if new one can't be downloaded for some reason
4 months ago
Mike Lang 264545eb9d CachedIterator: Fix bug where state can change while taking the lock
Resulting in a case where we grab the wrong result, or even try to get the next item
after the iterator has already been discarded.
7 months ago
Mike Lang 1857a998c9 reduce overhead of gevent.idle() by only yielding once per 1000 segments 7 months ago
Mike Lang 8ede4622ca CachedIterator: Re-serve any errors encountered while iterating
instead of the second one to reach the error treating it as a successful end of iterator.
7 months ago
Mike Lang 2a1f7207a8 Allow a fudge factor when checking for gaps/overlaps between segments
Sometimes in the wild (particularly on youtube) segments may not be timed perfectly, so allow up to 10ms of gap or overlap
to be counted as "equal" for purposes of finding the best segment.
1 year ago
Mike Lang c65eb2eae3 Add a default timeout on google APIs 1 year ago
Mike Lang cd4d08adc1 Yield after each segment when doing fast/smart cuts
To avoid blocking for long periods
1 year ago
Mike Lang e689626815 Add a small time range around the timestamp when extracting a frame
This should hopefully result in frames on the edge of timestamps being extracted
from a combination of the neighboring segment and the naive one,
so that we don't get errors extracting a frame.
1 year ago
Mike Lang 5a0704d3d7 Reject bustimes with negative minutes 1 year ago
Mike Lang 30f05b0656 thumbnails: Add a CLI for generating them directly 1 year ago
Mike Lang 80c9be0baf cutter: Get archive cut working 1 year ago
Mike Lang 5e7904dab3 wip: archive cut 1 year ago