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

[YAFW] ... Error Message #12098

Closed
InitPatch opened this issue Apr 30, 2024 · 10 comments
Closed

[YAFW] ... Error Message #12098

InitPatch opened this issue Apr 30, 2024 · 10 comments
Labels
bug Something isn't working extension: yafw Issues related to the yafw extension extension Issues related to one of the extensions in the Store

Comments

@InitPatch
Copy link

Extension

https://www.raycast.com/pablopunk/yafw

Description

every time I use it, I get an error message

Steps To Reproduce

  1. Select a video file in Finder
  2. Open Raycast
  3. open YAFW via the "compress video" command
  4. Hit cmd+enter to compress the video

Current Behaviour

every time I use it, I get this message:
Error Some files could not be compressed.

image

I tried with different file formats (mp4, mov), but it doesn't change anything
I've installed FFMPEG via Brew, and after an auto-update of Brew, it installed FFMPEG successfully:

 ~ % ffmpeg
ffmpeg version 7.0 Copyright (c) 2000-2024 the FFmpeg developers
  built with Apple clang version 14.0.0 (clang-1400.0.29.202)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/7.0_1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopenvino --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox
  libavutil      59.  8.100 / 59.  8.100
  libavcodec     61.  3.100 / 61.  3.100
  libavformat    61.  1.100 / 61.  1.100
  libavdevice    61.  1.100 / 61.  1.100
  libavfilter    10.  1.100 / 10.  1.100
  libswscale      8.  1.100 /  8.  1.100
  libswresample   5.  1.100 /  5.  1.100
  libpostproc    58.  1.100 / 58.  1.100
Universal media converter
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

Expected Behaviour

No response

@InitPatch InitPatch added bug Something isn't working extension Issues related to one of the extensions in the Store labels Apr 30, 2024
@raycastbot raycastbot added the extension: yafw Issues related to the yafw extension label Apr 30, 2024
@raycastbot
Copy link
Collaborator

Thank you for opening this issue!

🔔 @pablopunk you might want to have a look.

💡 Author and Contributors commands

The author and contributors of pablopunk/yafw can trigger bot actions by commenting:

  • @raycastbot close this issue Closes the issue.
  • @raycastbot rename this issue to "Awesome new title" Renames the issue.
  • @raycastbot reopen this issue Reopens the issue.
  • @raycastbot assign me Assigns yourself to the issue.
  • @raycastbot good first issue Adds the "Good first issue" label to the issue.

@pablopunk
Copy link
Contributor

@InitPatch it seems they released a new major version this month (ffmpeg 7). I was using v6 to develop this extension. Let me try with v7 and try to make it compatible

@pablopunk
Copy link
Contributor

Update: v7 works fine for me. I made another PR to easily see logs in production so I can debug this one

@InitPatch
Copy link
Author

InitPatch commented Apr 30, 2024

Sweet, thanks!
I'll wait for your PR to be approved. Meanwhile, I went to the extension preferences and noticed the current path is /opt/homebrew/bin/ffmpeg. However, when I checked this path in Finder I didn't see FFMPEG in there:

image

Instead, I found it there:

image

Should I change it to /usr/local/Cellar/ffmpeg/ or /usr/local/Cellar/ffmpeg/7.0_1 in the extension preferences? ... or?

@pablopunk
Copy link
Contributor

That's a great finding @InitPatch ! I found an issue with my logic. It was using /opt/homebrew/bin/ffmpeg even if you provided another location. I'll push the fix in the same PR. Also I will add /usr/local/Cellar/ffmpeg as another possible PATH so you don't even have to change it when the fix is released.

@pablopunk
Copy link
Contributor

pablopunk commented May 2, 2024

@InitPatch can you try with the new version of the extension?

@InitPatch
Copy link
Author

InitPatch commented May 2, 2024

Hey @pablopunk,
I confirm it works now! 🙌🏼 Thank you!

One thing though. If I select more than one file in Finder, it will still display 1 task in the queue only:

image

This means I'll have to add the other file(s) by clicking on the Add file button.
Since the extension works based on a selected file in Finder, it would make sense that whatever the amount of selected video files are selected in the Finder, would be added to the queue.
As much as keeping the "Add File" button, in case you know where your files are and not in the current folder in Finder at that moment.

Another thing I'd add, is a progress bar while it compresses the video(s).
The first time I used it, I waited, like 22 sec for a 100 MB video file for instance, but I wasn't sure what would happen if I'd close the Raycast window; would it stop the job or not? Because that's for a 100 MB file but how long will it be on a bigger file or several files, right?
It turns out it does the job, even in the background, but I feel like that'd be nice to have a progress bar system, even within a floating window for instance (in the case you close the Raycast window or do something else with Raycast. See what I mean?)

Also, small thing, but since you're displaying the compressed files in quite big size, it'd be cool to have a thumbnail on the file(s), when the compression is done:

image

VS ↴

image

@pablopunk
Copy link
Contributor

Since the extension works based on a selected file in Finder, it would make sense that whatever the amount of selected video files are selected in the Finder, would be added to the queue.

that's the intention, so it's indeed a bug

Another thing I'd add, is a progress bar while it compresses the video(s).

that'd be nice. It's tricky, cause it would need to parse the stdout of ffmpeg and somehow display the progress (I think this could work)

Also, small thing, but since you're displaying the compressed files in quite big size, it'd be cool to have a thumbnail on the file(s), when the compression is done:

that was my first idea and I tried so hard to make it work but I couldn't find a way. Maybe @pernielsentikaer knows a way?

@pablopunk pablopunk mentioned this issue May 3, 2024
5 tasks
@InitPatch
Copy link
Author

I think [this](https://developers.raycast.com/utilities/icons/getprogressicon#signature) could work
No idea, I'm not a coder, just a simple user 🙃

@pablopunk
Copy link
Contributor

@InitPatch can you close this issue since the original bug was solved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working extension: yafw Issues related to the yafw extension extension Issues related to one of the extensions in the Store
Projects
None yet
Development

No branches or pull requests

3 participants