Skip to content

Add utility function for video compression#149

Open
MKVarun wants to merge 5 commits into
neuroinformatics-unit:mainfrom
MKVarun:video-compression
Open

Add utility function for video compression#149
MKVarun wants to merge 5 commits into
neuroinformatics-unit:mainfrom
MKVarun:video-compression

Conversation

@MKVarun
Copy link
Copy Markdown

@MKVarun MKVarun commented Mar 30, 2026

Description

What is this PR
This PR follows PR #145 to add video compression utility.

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
This PR addresses one of the feature requests in #67 and closes #10

What does this PR do?
This PR adds a utility function to compress videos using ffmpeg.

References

Issue #10 related to #67

How has this PR been tested?

The code has been tested locally with a sample video file and checked if it is compressing files.

Is this a breaking change?

No.

Does this PR require an update to the documentation?

I've added docstrings in the function.

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

@MKVarun MKVarun mentioned this pull request Mar 30, 2026
@MKVarun MKVarun marked this pull request as ready for review April 3, 2026 08:45
@MKVarun
Copy link
Copy Markdown
Author

MKVarun commented Apr 3, 2026

I've added a compress_video utility function to compress video files to apply SLEAP recommended setting. I've added tests for all the new functionality as well. I'm not sure if while testing I have to create a dummy video file on the fly and test for compression or whether that is standard testing practice. For now I mocked successful compression output.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.49%. Comparing base (33adaa5) to head (9a5915d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #149      +/-   ##
==========================================
+ Coverage   99.45%   99.49%   +0.03%     
==========================================
  Files           8        9       +1     
  Lines         554      589      +35     
==========================================
+ Hits          551      586      +35     
  Misses          3        3              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Apply a reasonable compression to a video

1 participant