-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clipping subsampler refactor #275
Clipping subsampler refactor #275
Conversation
b202296
to
32fa4ea
Compare
nice, yes this is a great idea |
is this ready to go? If so could you give a high level overview of the changes? |
This is basically just a refactor. I broke the code into smaller functions, added types, only process metadata once per clip (instead of once per stream), renamed some stuff for clarity, and cleaned up the segment_times collection code. I avoided making any functional changes, but I think I see a couple of places for improvement that I'll hit in later pull requests. The ffmpeg pipe stuff is also going to come later, but I may need to refactor the other subsamplers first. |
looks much better I think the smaller functions could be an opportunity to add some more tests. What do you think? |
just merged #262 and having a bit of trouble to rebase here hmm |
probably best if you handle this rebase @MattUnderscoreZhang ; I think it's mostly about replacing the code that's doing the extract subtitle by that new function |
Yeah no prob, I just merged changes. |
@MattUnderscoreZhang did you test this to produce the same results as before? this is a lot of complex code that is changed |
Yes, I get the exact same results as before for my use case, which involves a frame rate resampling, resizing, cropping, and clipping. Plus, all the unit tests pass as expected. |
I need to add ffmpeg pipes to speed up processing, and to do that I first needed to refactor some of the code to make it easier to reason about.
For context, I'm processing webvid-10M and the codebase is currently too slow. I'm hoping to speed it up by an order of magnitude by combining subsamplers into a single ffmpeg pipe operation, and adding other optimizations.