Skip to content
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

Add Video/GIF Modification extension #12068

Closed

Conversation

tonypinkevych
Copy link
Contributor

@tonypinkevych tonypinkevych commented Apr 29, 2024

Description

Motivation

I got tired of moving between different apps when I need something small like converting or optimizing a video. That's why I started using the ffmpeg cli. But it doesn't really fit because I have to memorize all the tricky parts of their cli. So I decided to create a simple wrapper around it.

What it does

The extension allows you to optimize, convert and resize video and gif files using ffmpeg and ffprobe. At the moment the extension only works with a selection in the Finder.

How it works

On first run, the extension will download the ffmpeg and ffprobe binaries from https://www.osxexperts.net. I have not found any other public hosting of binaries for Intel and Silicon chips. So I am open to recommendations for security improvements.

The fetching mechanism can be checked at binary.ts file. The endpoints and sha256 hashes at ffmpeg.ts and ffprobe.ts respectively.

The binaries will then be stored in environment.supportPath and used from there.

Screencast

video-gif-modification.mp4

Checklist

- feat: add progress for other commands
- fix: nan issue
- chore: rename command
- refactor: rename variables
- chore: update icons
- chore: remove subtitles
- chore: update icon
- chore: remove dot
- chore: remove loggable
- fix: lint issues
- refactor: to use standard finder selector
- chore: add logs
- chore: update downloading title
- feat: add progress tracking
- chore: clenaup names
- chore: add unique names on conflicts
- chore: setup better gif compression
- refactor: to use objects
- chore: add logfile
- feat: add resize-mp4 command
- feat: add optimize-mp4 command
- feat: add convert-to command
- feat: add ffmpeg cli download
- chore: initial setup
@raycastbot raycastbot added the new extension Label for PRs with new extensions label Apr 29, 2024
@raycastbot
Copy link
Collaborator

Congratulations on your new Raycast extension! 🚀

We will aim to make the initial review within five working days. Once the PR is approved and merged, the extension will be available on our Store.

@tonypinkevych tonypinkevych changed the title Add video-gif-modification extension Add Video/GIF Modification extension Apr 29, 2024
- chore: update how progress system works
- feat: add toast and trimmed.string objects
- chore: tidying up
- chore: return original string if it\'s not trimmed
- chore: improve finder frontmost app message
- chore: improve error handling
- refactor: size validation
- refactor: move \`extension\` abstraction into a file
- chore: remove legacy screenshots
- chore: show hud instead of toast when processing finished
- chore: update convert command to make it more usable
@tonypinkevych
Copy link
Contributor Author

tonypinkevych commented Apr 30, 2024

Upd: in recent updates the extension has become more convenient for power keyboards users. In addition, it now correctly notifies the user when video successfully encoded in the background.

@tonypinkevych
Copy link
Contributor Author

Just found this extension: #11894 by @pablopunk.
Looks like we came up with the same idea at the same time 😁

I'm not sure raycast needs two extensions in the store with the same functionality. As I see the only difference is the entry point and UX. You can close my PR @pernielsentikaer if you see fit, because yafw is already published in the store.

@pablopunk
Copy link
Contributor

@tonypinkevych Mine only focuses on compressing videos. If you'd like, you could make a PR to add more commands and I'll happily review it 🙌🏻. Also, I'm not installing ffmpeg automatically, that could be added too. Latest code is here

@pernielsentikaer
Copy link
Collaborator

I don't know www.osxexperts.net, it sounds a bit dangerous just to trust the files from that page, or?

I agree, merging it into the current would be nice

@tonypinkevych
Copy link
Contributor Author

@pernielsentikaer This site comes highly recommended on reddit, so I don't know. We can keep the local version of ffmpeg installed by homebrew. But that would reduce the number of potential users because of the external dependency.

I'll do another PR to extend yafw behavior in a few days. I will close this PR as soon as the new one is ready.

@tonypinkevych tonypinkevych marked this pull request as draft May 2, 2024 15:17
@tonypinkevych tonypinkevych mentioned this pull request May 3, 2024
5 tasks
@tonypinkevych
Copy link
Contributor Author

All code moved to #12147

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new extension Label for PRs with new extensions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants