Releases: lance13c/github-video-compressor
0.0.5
Background
This app compresses video files over 50MB in the Github pull requests. Taking 350MB videos down to less than 100MB.
It is helpful if you accidentally record more than 100MB (the github limit) for a demo video you wish to put in a Github PR.
Enjoy larger video uploads, while keeping your proprietary company data from leaving your machine.
Limitations / Requirements
- The application currently only works on MacOS with M-series chips.
- The Chrome Browser (other chromium based browsers are unsupported right now, but can work with manually manifest file changes)
How to Install
If something doesn't work, please post about your problem in a reply. Thank you.
This installation video file went from 231.7MB to 20.82MB
gvc-288699017-output-M.-.Github.Video.Compressor.Installation.mp4
- Unzip the folder you downloaded.
- Transfer "GithubVideoCompressor.app" into your Applications folder. Right-click "GithubVideoCompressor.app" and press "Open." A warning message will pop up, click "Open". It may take a few attempts to open it. Just keep trying. It should eventually work. The app does take 3 seconds to boot the UI.
- When the app opens, follow the three installation steps in the app.
- Once installed, completely close the application. The compression cannot work if the app is running in the background.
Benefits
- Security - All compressing happens local on your machine. Avoid accidentally uploading proprietary company data to potentially malicious "free" video compression servers.
- Usability - It just works. It handles the whole compression pipeline out of the box. Attach or drop a video file in the Github pull request comment or description box, and it will compress and upload the video the same way Github does. (Only compresses videos above 50MB)
- No Background App - The desktop app only boots and runs when it is in use. It is never takes up machine resources unnecessarily.
- Speed - Compression combined with the upload time should be nearly equivalent or faster than directly uploading 50MB videos to Github (depends on internet speed and computer resources).
Troubleshooting
- The log file can be found here on Mac: ~/Library/Application Support/github_video_compressor_app/logs.
- If the manifest file is edited or updated after installing the chrome extension. The chrome extension might need to be toggled on and off.
- You can also check chrome extension errors in the service worker
chrome://extensions/
, and click the linkInspect views service worker
link. You may need to enable "Developer mode" in the top right corner of the Chrome Extensions manager.
How it works
This combines a Chrome extension with a desktop application to provide the fastest native video compression available.
When you drop a video into a Github PR, the chrome extension detects that video and captures it. The chrome extension then sends a Native Messaging request to the desktop app to boot. The desktop app sends back a token used for authentication and starts a local HTTP server on port 7777
. The chrome extension then sends the video to the HTTP server authenticating the connection with the token. The desktop application compresses the video with your machine's native ffmpeg
and returns the compressed video to the chrome extension via an HTTP response. Then it will attempt to upload the video to Github, and then insert the correct link to that video back in the comment/description textarea.
Other considerations.
Why not use ffmpeg-wasm?
What is the purpose of using the Native Message API.
These were all deliberate choices that will be discussed in an upcoming blog post.
Possible Future Improvements
- Better chrome extension error notifications.
- Knowing if the chrome extension is working or not (it is currently not clear if it is running).
v0.0.4
This app compresses video files over 50Mb in the Github PR. Taking 350MB videos down to less than 100MB.
It is helpful if you accidentally record more than 100MB for a demo video you wish to put in a Github PR.
Note: The chrome extension is still on version 0.0.2 and is in process of updating the 0.0.4. Both versions will work, but version 0.0.2 does not show when it is uploading. When a video is compressed I recommend waiting around 4-6 seconds before submitting it. This bug is fixed in the chrome extension version 0.0.4 which is coming soon.
Available Installations
- MacOS with m-series chips
How to Install
- Unzip the compressed folder.
- Move the application to the "Applications" folder on the Mac computer.
- Open the app and follow the steps.
- Close the app, and try it out.
Change Log
- UI overhaul
- Easier installation
- Works with the official chrome extension
Troubleshooting
The log file can be found here on Mac: ~/Library/Application Support/github_video_compressor_app/logs
.
If the manifest file is edited or updated after installing the chrome extension. The chrome extension might need to be toggled on and off.
Where did version 0.0.2 and 0.0.3 go?
Don't worry about it.
0.0.1 - Alpha
Changes
Barebones build
It contains the following:
- A MacOS App
- Chrome extension
- Chrome native messaging manifest file
Setup Instructions
Only works on ARM Macs.
-
brew install
ffmpeg
-
Drag the
GithubVideoCompressor.app
into the Applications Folder -
Try to run the
GithubVideoCompressor
App. It will ask if it is safe, say yes. -
You will need to go into Settings -> Security and accept GithubVideoCompressor to run.
-
Install the Chrome extension by going to Manage Extensions in Chrome.
-
In the top right corner, toggle
Developer Mode
on the manage extensions page to on. -
Click "Load unpacked", navigate to the extensions folder, and click select.
-
Navigate to
~/Library/Application\ Support/Google/Chrome/NativeMessagingHosts
. Copy the manifest filecom.dominic_cicilio.github_video_compressor.json
into theNativeMessagingHosts
folder. -
Edit the
com.dominic_cicilio.github_video_compressor.json
-
Change
allowed_origins
to be
"allowed_origins": ["chrome-extension://CHROME_EXTENSION_ID/"]
The chrome extension ID can be found by navigating to the extension in the chromeManage Extensions
page and clicking the "Details" button on the extension. There will be anID
section in the details. It will look like "mbijanlnfbjlsajbjhaikfllmllahbhd". After changing, save the file. -
Toggle the github video chrome extension off and then back on.
👏 🥳 It should be working!!! Please post a PR with detailed issues if you have any. Thanks!