Skip to content

fix: ship with ffmpeg #1641

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Conversation

tribhuwan-kumar
Copy link
Contributor

/claim #1640

need to tested it by building on windows

description

brief description of the changes in this pr.

related issue: #

how to test

add a few steps to test the pr in the most time efficient way.

if relevant add screenshots or screen captures to prove that this PR works to save us time (check Cap).

if you are not the author of this PR and you see it and you think it can take more than 30 mins for maintainers to review, we will tip you between $20 and $200 for you to review and test it for us.

Copy link

vercel bot commented Mar 18, 2025

Someone is attempting to deploy a commit to the louis030195's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

🧪 testing bounty created!

a testing bounty has been created for this PR: view testing issue

testers will be awarded $20 each for providing quality test reports. please check the issue for testing requirements.

@tribhuwan-kumar
Copy link
Contributor Author

tribhuwan-kumar commented Mar 18, 2025

used as resource, according to this

let resources_folder = exe_folder.join("../Resources");

@louis030195

& at windows ffmpeg is already being shipped

@tribhuwan-kumar
Copy link
Contributor Author

tribhuwan-kumar commented Mar 18, 2025

@louis030195

https://master.dl.sourceforge.net/project/avbuild/macOS/ffmpeg-7.0-macOS-default.tar.xz?viasf=1

the default macos version of ffmpeg causing this broken pipe error

image

i think we should ship ffmpeg same as the sidecar does

@tribhuwan-kumar
Copy link
Contributor Author

that version of ffmpeg doesn't supports -preset args

 bin  ffmpeg -i input.mp4 -vcodec libx264 -preset fast output.mp4
ffmpeg version 786d4af-avbuild Copyright (c) 2000-2024 the FFmpeg developers
  built with Apple clang version 16.0.0 (clang-1600.0.26.3)
  configuration: --extra-version=avbuild --disable-doc --disable-debug --enable-shared --enable-runtime-cpudetect --disable-vulkan --enable-libxml2 --disable-libxcb --disable-xlib --disable-postproc --enable-cross-compile --arch=a
rm64 --target-os=darwin --install_name_dir='@rpath' --cc=clang --enable-pic --extra-cflags='-I=/usr/include/libxml2 -arch arm64 -mmacosx-version-min=11.0' --extra-ldflags='-arch arm64 -mmacosx-version-min=11.0 -Wl,-dead_strip -Wl,
-rpath,@loader_path -Wl,-rpath,@executable_path/../Frameworks -Wl,-rpath,@loader_path/Libraries -Wl,-rpath,@loader_path/../lib'
  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
Unrecognized option 'preset'.

@divanshu-go
Copy link
Contributor

divanshu-go commented Mar 18, 2025

@divanshu-go
Copy link
Contributor

@louis030195 here is the PR for Linux #1643

@tribhuwan-kumar
Copy link
Contributor Author

yes, i did same as the ffmpeg-sidecar does

@louis030195
Copy link
Collaborator

can someone test on blank macos vm the app build and make sure screenpipe works and use this ffmpeg

@tribhuwan-kumar
Copy link
Contributor Author

tribhuwan-kumar commented Mar 25, 2025

screenpipe works and use this ffmpeg

ffmpeg is same as the sidecar's ffmpeg, just need to ensure about ffprobe

@louis030195
Copy link
Collaborator

can someone test on blank macos vm the app build and make sure screenpipe works and use this ffmpeg

still

won't merge until i have screen recording on a blank vm which shows it works

@tribhuwan-kumar
Copy link
Contributor Author

can someone test on blank macos vm the app build and make sure screenpipe works and use this ffmpeg

still

won't merge until i have screen recording on a blank vm which shows it works

@kumarvivek1752

could you test it on mac vm?
make sure you don't have any ffmpeg installed from prior

@kumarvivek1752
Copy link
Contributor

@kumarvivek1752

could you test it on mac vm?
make sure you don't have any ffmpeg installed from prior

sure..

@louis030195
Copy link
Collaborator

also i'd appreciate merging this today / tomorrow before hackathon

happy to provide tips/bounties for any help

@tribhuwan-kumar
Copy link
Contributor Author

also i'd appreciate merging this today / tomorrow before hackathon

happy to provide tips/bounties for any help

i've tested a build on my machine, lets see what @kumarvivek1752 says!

@kumarvivek1752
Copy link
Contributor

@tribhuwan-kumar @louis030195
I tested your pr on mac 15.3.2 and it worked as expected
behaviour I observed :

  • If the ffmpeg binary is not downloaded on external bin then it will download and copy to screenpipe environment.
  • If it is present, then it will copy to screenpipe environment.

screencast of my testing:

2025-03-27.08-58-55.mov

after building ffmpeg and screen recording is working but the app keeps spaming me to add permission, although I allowed it. but this issue is not related to this pr. I'll create a separate issue for this

@tribhuwan-kumar
Copy link
Contributor Author

@kumarvivek1752

did you check the ffprobe? is there any error --debug related to it??

@kumarvivek1752
Copy link
Contributor

@tribhuwan-kumar
yes found no issues

added to all ffprobe command in screenpipe-server/src/video_utils.rs

  let output = Command::new(&ffprobe_path)
        .args([
            "-v",
            "quiet",
            "-print_format",
            "json",
            "-select_streams",
            "v:0", // Select first video stream
            "-show_entries",
            "stream=r_frame_rate", // Only request frame rate information
            "--debug",
            video_path,
        ])
        .output()
        .await?;

logs:

2025-03-28T10:48:02.676474Z  INFO screenpipe_audio::transcription::handle_new_transcript: device External Microphone (input) received transcription Some(" But it's not the police who can't do it.")
2025-03-28T10:48:02.677446Z  INFO screenpipe_audio::transcription::transcription_result: Detected speaker: Speaker { id: 1, name: "", metadata: "" }
2025-03-28T10:48:02.677500Z  INFO screenpipe_audio::transcription::transcription_result: device External Microphone (input) inserting audio chunk: "/Users/vivek/.screenpipe/data/External Microphone (input)_2025-03-28_05-17-44.mp4"
2025-03-28T10:48:07.536422Z  INFO screenpipe_server::video: Finishing FFmpeg process for monitor 2 after 30 frames
2025-03-28T10:48:11.202558Z  INFO screenpipe_server::video: Starting new video chunk: /Users/vivek/.screenpipe/data/monitor_2_2025-03-28_05-18-11.mp4 for monitor 2
2025-03-28T10:48:11.202620Z  INFO screenpipe_server::video: Starting FFmpeg process for file: /Users/vivek/.screenpipe/data/monitor_2_2025-03-28_05-18-11.mp4
2025-03-28T10:48:11.216057Z  INFO screenpipe_server::video: New FFmpeg process started for file: /Users/vivek/.screenpipe/data/monitor_2_2025-03-28_05-18-11.mp4 (monitor 2)
2025-03-28T10:48:11.216595Z  INFO screenpipe_server::video: Video stats for monitor 2: processed 31 frames in 1 chunks over 761s (0.04 avg fps)
2025-03-28T10:48:18.722171Z  INFO screenpipe_server::resource_monitor: Runtime: 1122s, Memory: 14% (2.24 GB / 16.00 GB), Virtual: 395.49 GB, CPU: 196%
2025-03-28T10:48:20.454319Z  INFO screenpipe_audio::transcription::handle_new_transcript: device External Microphone (input) received transcription Some(" -")
2025-03-28T10:48:20.454470Z  INFO screenpipe_audio::audio_manager::manager: Received audio from device: "External Microphone"
2025-03-28T10:48:20.455277Z  INFO screenpipe_audio::transcription::transcription_result: Detected speaker: Speaker { id: 2, name: "", metadata: "" }
2025-03-28T10:48:20.455303Z  INFO screenpipe_audio::transcription::transcription_result: device External Microphone (input) inserting audio chunk: "/Users/vivek/.screenpipe/data/External Microphone (input)_2025-03-28_05-17-44.mp4"
2025-03-28T10:48:20.564394Z  INFO screenpipe_audio::speaker::prepare_segments: device: External Microphone (input), speech ratio: 0, min_speech_ratio: 0.05, audio_frames: 512042, speech_frames: 0
2025-03-28T10:48:20.564788Z  INFO screenpipe_audio::audio_manager::manager: Received audio from device: "Display 2"
2025-03-28T10:48:20.674063Z  INFO screenpipe_audio::speaker::prepare_segments: device: Display 2 (output), speech ratio: 0, min_speech_ratio: 0.05, audio_frames: 511956, speech_frames: 0
2025-03-28T10:48:28.117773Z  INFO screenpipe_audio::audio_manager::device_monitor: Device Display 2 (output) disconnected
2025-03-28T10:48:28.117833Z  INFO screenpipe_audio::device::device_manager: Stopping device: Display 2 (output)
2025-03-28T10:48:29.935000Z  INFO screenpipe_server::video: Queue stats for monitor 2: processed 35 frames in 780.2s (0.04 fps), queue sizes: video=0/30, ocr=0/30
2025-03-28T10:48:30.398609Z  INFO screenpipe_audio::device::device_manager: starting recording for device: Display 2 (output)
2025-03-28T10:48:30.506744Z  INFO screenpipe_audio::core::run_record_and_transcribe: starting continuous recording for Display 2 (output) (30s segments)


@tribhuwan-kumar
Copy link
Contributor Author

cc: @louis030195

@louis030195
Copy link
Collaborator

the test was supposed to be:

  • get a build somehow of this PR (app)
  • new vm raw with the .dmg
  • install .dmg
  • run app
  • it uses the ffmpeg packaged in the files (and is not installing through ffmpeg sidecar)
  • recording into mp4 works
  • endpoint and stuff that uses ffmpeg work (use cmd shift f to search ffmpeg)

@tribhuwan-kumar
Copy link
Contributor Author

the test was supposed to be:

  • get a build somehow of this PR (app)
  • new vm raw with the .dmg
  • install .dmg
  • run app
  • it uses the ffmpeg packaged in the files (and is not installing through ffmpeg sidecar)
  • recording into mp4 works
  • endpoint and stuff that uses ffmpeg work (use cmd shift f to search ffmpeg)

I'm testing it myself!!

@tribhuwan-kumar
Copy link
Contributor Author

@louis030195

https://drive.google.com/drive/folders/1aSuiD34ImC6xbfz2J1J7NIB0hZW_kPZP?usp=sharing

this drive folder includes the .dmg build and a demonstration video
& i properly ensure that it uses the packaged ffmpeg from the .dmg build.

@lessuselesss
Copy link

lessuselesss commented Mar 29, 2025

the test was supposed to be:

  • get a build somehow of this PR (app)
  • new vm raw with the .dmg
  • install .dmg
  • run app
  • it uses the ffmpeg packaged in the files (and is not installing through ffmpeg sidecar)
  • recording into mp4 works
  • endpoint and stuff that uses ffmpeg work (use cmd shift f to search ffmpeg)

just doing this now myself:

- [ ] get a build somehow of this PR (app)
@tribhuwan-kumar somehow the screenpipe desktop app I'm downloading from your google drive complains that the application is corrupt when I try to move it to /Applications. I've changed networks, rebooted and tried todwnoading I different environments (vm) ... I guess I'll try to build it myself.

  • new vm raw with the .dmg
  • install .dmg
  • run app
  • it uses the ffmpeg packaged in the files (and is not installing through ffmpeg sidecar)
  • recording into mp4 works
  • endpoint and stuff that uses ffmpeg work (use cmd shift f to search ffmpeg)

@tribhuwan-kumar
Copy link
Contributor Author

somehow the screenpipe desktop app I'm downloading from your google drive complains that the application is corrupt

I think the apple requires some license. that's why that dmg complaints about being corrupt. try building yourself it'll not take too much time

@louis030195
Copy link
Collaborator

@louis030195

https://drive.google.com/drive/folders/1aSuiD34ImC6xbfz2J1J7NIB0hZW_kPZP?usp=sharing

this drive folder includes the .dmg build and a demonstration video & i properly ensure that it uses the packaged ffmpeg from the .dmg build.

is that a clean, fresh VM?

@tribhuwan-kumar
Copy link
Contributor Author

@louis030195

https://drive.google.com/drive/folders/1aSuiD34ImC6xbfz2J1J7NIB0hZW_kPZP?usp=sharing

this drive folder includes the .dmg build and a demonstration video & i properly ensure that it uses the packaged ffmpeg from the .dmg build.

is that a clean, fresh VM?

no,

but there is no ffmpeg installed in that machine

@lessuselesss
Copy link

lessuselesss commented Mar 30, 2025

screenpipe throws an error in the logs as it still seems to try to fetch ffmpeg, but

I can confirm that the fresh vm without ffmpeg does indeed capture video. I'll upload a video in a moment.

https://youtu.be/7W-tN1FX06k

@tribhuwan-kumar
Copy link
Contributor Author

screenpipe throws an error in the logs as it still seems to try to fetch ffmpeg

what's the error?? can you share log?

@lessuselesss
Copy link

lessuselesss commented Mar 30, 2025

Of course! both logs are attached, but screenpipe.2025-03-30.log is the one you're looking for.

screenpipe-app.2025-03-30.log
screenpipe.2025-03-30.log

Also, an important note... went back into the vm and did a "which ffmpeg" again, still nothing on PATH.. but figured I should maybe double check to see if there is a binary in ~/.local/bin/ like I've seen previously.

indeed there is an ffmpeg (that's been downloaded?) there...

It should be be bundled into the screenpipe binary as of this pr, right?

Do you also have a standalone ffmpeg binary in ~/.local/bin/ as well?

@tribhuwan-kumar
Copy link
Contributor Author

Also, an important note... went back into the vm and did a "which ffmpeg, but figured I should maybe double check to see if if there was a binary in ~/.local/bin/and indeed there is an ffmpeg (that's been downloaded?) there....

the ffmpeg you're seeing in ~/.local/bin is downloaded by ffmpeg sidecar, which isn't supposed to do.
please ensure you've correctly build by merging this pr

git remote add upstream [email protected]:mediar-ai/screenpipe.git             #assuming you've ssh setup
git fetch upstream
git fetch upstream pull/1641/head:test-1641                                 #fetch this pr
git checkout test-1641                                                      #checkout the pr branch
git merge upstream/main                                                     #merge it with latest screenpipe

the other way you can ensure is your local branch should include the change of this pr

@lessuselesss

@lessuselesss
Copy link

@tribhuwan-kumar I'd like to thank you for providing a better workflow to get me to where I needed, and want to apologize for making what seems to be an incorrect assumption: forking the repo you pushed the PR from I guess isn't equal to cloning screenpipe main and doing a git checkout on the pr(?).

A bit embarrassing to have wasted your time and concern.

It does indeed look like ffmpeg is bundled properly and is working on macOS - well done!

Thought the pr had an issue for about an hour though as nothing started recording until a TTS model was available and I gave my terminal permissions to accessibility/microphone/screen sharing ... which frankly was a bit surprising to have to do.

@tribhuwan-kumar
Copy link
Contributor Author

no worries @lessuselesss

It does indeed look like ffmpeg is bundled properly and is working on macOS - well done!

can you provide a screen recording?

Thought the pr had an issue for about an hour though as nothing started recording until a TTS model was available and I gave my terminal permissions to accessibility/microphone/screen sharing ... which frankly was a bit surprising to have to do.

also, can you ensure that it should download only model not the ffmpeg?

@lessuselesss
Copy link

lessuselesss commented Mar 31, 2025

@tribhuwan-kumar

I'll go get some wifi so I can show you what I'm seeing here now (...it's not recording anything atm).

also, can you ensure that it should download only model not the ffmpeg?

Can you phrase this a different way, I'm not sure I follow.

@tribhuwan-kumar
Copy link
Contributor Author

@lessuselesss

screenpipe requires a model to transcribe audio & ocr, so when that model isn't available locally, it'll download that model,
but now, in this pr we're including ffmpeg binary in build, so it shouldn't be downloading ffmpeg,
it should only download model if that doesn't exist.

  • first compile the backend with cargo build --release
  • then change directory to screenpipe-app-tauri
  • now run bun i && bun tauri build
  • install the .dmg build of screenpipe app
  • launch the app
  • check log
  • ensure it writes video & audio files
  • additionally check /Applications/screenpipe.app/Contents/MacOS/ contains ffmpeg and ffprobe binary or not

@lessuselesss
Copy link

@tribhuwan-kumar - that all makes sense, o, thats basically

@tribhuwan-kumar
Copy link
Contributor Author

@tribhuwan-kumar - that all makes sense, o, thats basically

@lessuselesss any updates?

@lessuselesss
Copy link

@tribhuwan-kumar For sure!

I just got it working...

screenpipe requires a model to transcribe audio & ocr, so when that model isn't available locally, it'll download that model

I understand the logic behind this, when everything is ready to start populating the db then its good to go I guess the only feedback I have is that, while yes there is a mention that all models need to be downloaded when going through the onboarding.

The UX is never explicit about which models are needed, currently available, or what's left to bootstrap the rest. Everything was giving me a green light last night after I just ran the cli command ... then red after rebooting... then today was spent with me trying to find out why every 3-5 seconds I was being re-prompted to give accessibility permissions with zero indication of why (they were already approved)

Anyway, I'll be less windy here and maybe put in a suggestion that, if permissions are granted but models that embed/process said inputs aren't available, maybe we could be using a yellow circle 🟡 with a tooltip?

I hope I get better at this lol, thanks for your help

@tribhuwan-kumar
Copy link
Contributor Author

@lessuselesss if you're facing permission issue, try revoking and giving permission again

@lessuselesss
Copy link

lessuselesss commented Apr 1, 2025

Indeed I did that.

It didn't make a difference until the Ollama was actually serving a model.

@tribhuwan-kumar
Copy link
Contributor Author

Indeed I did that.

It didn't make a difference until the Ollama was actually serving a model.

so any update??

is it writing the video & audio files ot not?
if possible please share a screen recording

@lessuselesss
Copy link

lessuselesss commented Apr 12, 2025

I just uploaded the the screencasts to YouTube, my apologies it's taken so long to get back about this.

I went through the instructions in the Testing bounty, but wasn't able to complete the meeting portions due to constraints.

#1642

@tribhuwan-kumar
Copy link
Contributor Author

@lessuselesss could you provide that youtube video link?

@lessuselesss
Copy link

lessuselesss commented Apr 13, 2025

I thought I'd included it in the testing bounty submission, my bad!

https://youtube.com/playlist?list=PLZ_V08C5xK4MewGwEjk9TCKRq5FqIYnEJ&si=DOC5V4l5Dl4Q-agb

If this is fine, may I go ahead with running the same testing regimen on Windows?

If you have other feedback please let me know.

@tribhuwan-kumar
Copy link
Contributor Author

cc: @louis030195

@lessuselesss
Copy link

lessuselesss commented Apr 17, 2025

Hello,

I'm trying to build the desktop app the pre_build scripts seem to be trying to reference npm(?

PS C:\dev\screenpipe\screenpipe-app-tauri> bun install
bun install v1.2.10 (db2e7d7f)

Checked 780 installs across 783 packages (no changes) [9.80s]
PS C:\dev\screenpipe\screenpipe-app-tauri> bun tauri build
$ tauri build
     Running beforeBuildCommand `bun run build`
$ bun scripts/pre_build.js
cwd C:\dev\screenpipe\screenpipe-app-tauri\src-tauri
wget found at: wget
Copying screenpipe binary...
Screenpipe binary copied successfully from C:\dev\screenpipe\target\release\screenpipe.exe

Commands to build 🔨:
bun install
bun tauri build
checking bun binary for tauri...
88 |    console.log('checking bun binary for tauri...');
89 |
90 |    let bunSrc, bunDest1, bunDest2;
91 |    if (platform === 'windows') {
92 |            // Get and log npm global prefix
93 |            const npmGlobalPrefix = (await $`npm config get prefix`.text()).trim();
                    ^
ShellError: Failed with exit code 1
 exitCode: 1,
   stdout: "",
   stderr: "bun: command not found: npm\n",

      at new ShellError (12:16)
      at new ShellPromise (77:16)
      at BunShell (192:35)
      at <anonymous> (C:\dev\screenpipe\screenpipe-app-tauri\scripts\pre_build.js:93:34)
      at copyBunBinary (C:\dev\screenpipe\screenpipe-app-tauri\scripts\pre_build.js:87:29)
      at C:\dev\screenpipe\screenpipe-app-tauri\scripts\pre_build.js:476:7

Bun v1.2.10 (Windows x64)
error: script "prebuild" exited with code 1
beforeBuildCommand `bun run build` failed with exit code 1
       Error beforeBuildCommand `bun run build` failed with exit code 1
error: script "tauri" exited with code 1

Installing npm via bun gets me further but its still failing to build.

PS C:\dev\screenpipe\screenpipe-app-tauri> bun tauri build
$ tauri build
     Running beforeBuildCommand `bun run build`
$ bun scripts/pre_build.js
cwd C:\dev\screenpipe\screenpipe-app-tauri\src-tauri
wget found at: wget
Copying screenpipe binary...
Screenpipe binary copied successfully from C:\dev\screenpipe\target\release\screenpipe.exe

Commands to build 🔨:
bun install
bun tauri build
checking bun binary for tauri...
88 |    console.log('checking bun binary for tauri...');
89 |
90 |    let bunSrc, bunDest1, bunDest2;
91 |    if (platform === 'windows') {
92 |            // Get and log npm global prefix
93 |            const npmGlobalPrefix = (await $`npm config get prefix`.text()).trim();
                    ^
ShellError: Failed with exit code 1
 exitCode: 1,
   stdout: "",
   stderr: "bun: command not found: npm\n",

      at new ShellError (12:16)
      at new ShellPromise (77:16)
      at BunShell (192:35)
      at <anonymous> (C:\dev\screenpipe\screenpipe-app-tauri\scripts\pre_build.js:93:34)
      at copyBunBinary (C:\dev\screenpipe\screenpipe-app-tauri\scripts\pre_build.js:87:29)
      at C:\dev\screenpipe\screenpipe-app-tauri\scripts\pre_build.js:476:7

Bun v1.2.10 (Windows x64)
error: script "prebuild" exited with code 1
beforeBuildCommand `bun run build` failed with exit code 1
       Error beforeBuildCommand `bun run build` failed with exit code 1
error: script "tauri" exited with code 1
PS C:\dev\screenpipe\screenpipe-app-tauri> winget uninstall CoreyButler.NVMforWindows
Found NVM for Windows 1.2.2 [CoreyButler.NVMforWindows]
Starting package uninstall...
Successfully uninstalled
PS C:\dev\screenpipe\screenpipe-app-tauri> bin add npm
bin : The term 'bin' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the
name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ bin add npm
+ ~~~
    + CategoryInfo          : ObjectNotFound: (bin:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\dev\screenpipe\screenpipe-app-tauri> bun
Bun is a fast JavaScript runtime, package manager, bundler, and test runner. (1.2.10+db2e7d7f7)

Usage: bun <command> [...flags] [...args]

Commands:
  run       ./my-script.ts       Execute a file with Bun
            lint                 Run a package.json script
  test                           Run unit tests with Bun
  x         bun-repl             Execute a package binary (CLI), installing if needed (bunx)
  repl                           Start a REPL session with Bun
  exec                           Run a shell script directly with Bun

  install                        Install dependencies for a package.json (bun i)
  add       elysia               Add a dependency to package.json (bun a)
  remove    browserify           Remove a dependency from package.json (bun rm)
  update    @shumai/shumai       Update outdated dependencies
  outdated                       Display latest versions of outdated dependencies
  link      [<package>]          Register or link a local npm package
  unlink                         Unregister a local npm package
  publish                        Publish a package to the npm registry
  patch <pkg>                    Prepare a package for patching
  pm <subcommand>                Additional package management utilities

  build     ./a.ts ./b.jsx       Bundle TypeScript & JavaScript into a single file

  init                           Start an empty Bun project from a built-in template
  create    elysia               Create a new project from a template (bun c)
  upgrade                        Upgrade to latest version of Bun.
  <command> --help               Print help text for command.

Learn more about Bun:            https://bun.sh/docs
Join our Discord community:      https://bun.sh/discord
PS C:\dev\screenpipe\screenpipe-app-tauri> bun install npm
bun add v1.2.10 (db2e7d7f)

installed [email protected] with binaries:
 - npm
 - npx

1 package installed [23.25s]
PS C:\dev\screenpipe\screenpipe-app-tauri> bun tauri build
$ tauri build
     Running beforeBuildCommand `bun run build`
$ bun scripts/pre_build.js
cwd C:\dev\screenpipe\screenpipe-app-tauri\src-tauri
wget found at: wget
Copying screenpipe binary...
Screenpipe binary copied successfully from C:\dev\screenpipe\target\release\screenpipe.exe

Commands to build 🔨:
bun install
bun tauri build
checking bun binary for tauri...
npm global prefix: C:\Users\lessu\AppData\Local\Temp\bun-node-db2e7d7f7
found bun using system command at: C:\Users\lessu\AppData\Local\Temp\bun-node-db2e7d7f7\bun.exe
searching bun in these locations:
- C:\Users\lessu\AppData\Local\Temp\bun-node-db2e7d7f7\bun.exe
- C:\Users\lessu\.bun\bin\bun.exe
- C:\Users\lessu\AppData\Local\Temp\bun-node-db2e7d7f7\node_modules\bun\bin\bun.exe
- C:\Users\lessu\AppData\Local\Temp\bun-node-db2e7d7f7\bun.exe
- C:\Users\lessu\AppData\Local\Temp\bun-node-db2e7d7f7\bin\bun.exe
- C:\Users\lessu\AppData\Local\bun\bun.exe
- C:\Program Files\bun\bun.exe
- C:\Program Files (x86)\bun\bun.exe
- bun.exe
found bun at: C:\Users\lessu\.bun\bin\bun.exe
copying bun from: C:\Users\lessu\.bun\bin\bun.exe
copying bun to: C:\dev\screenpipe\screenpipe-app-tauri\src-tauri\bun-x86_64-pc-windows-msvc.exe
bun binary already exists for tauri.
$ next build
   ▲ Next.js 15.1.4

   Creating an optimized production build ...
 ✓ Compiled successfully

./app/page.tsx
42:6  Warning: React Hook useEffect has a missing dependency: 'loadUser'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
203:6  Warning: React Hook useEffect has missing dependencies: 'openStatusDialog', 'setActiveProfile', 'setShowChangelogDialog', 'setShowOnboarding', 'toast', and 'updateSettings'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
227:6  Warning: React Hook useEffect has a missing dependency: 'reloadStore'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./components/model-download-tracker.tsx
221:6  Warning: React Hook useEffect has missing dependencies: 'ffmpegInstalling' and 'ffmpegToastRef'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./components/onboarding/api-setup.tsx
152:11  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/onboarding/dev-configuration.tsx
88:6  Warning: React Hook useEffect has a missing dependency: 'devInstructionsData'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
93:9  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/onboarding/dev-or-non-dev.tsx
109:9  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/onboarding/explain-instructions.tsx
27:9  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/onboarding/introduction.tsx
28:9  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/onboarding/personalize.tsx
84:9  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/onboarding/pipe-store.tsx
145:11  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element
151:11  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/onboarding/pipes.tsx
22:9  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/onboarding/status.tsx
251:13  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/onboarding/usecases-selection.tsx
97:9  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/pipe-store/pipe-card.tsx
187:6  Warning: React Hook useEffect has missing dependencies: 'pipe' and 'setPipe'. Either include them or remove the dependency array. If 'setPipe' changes too often, find the parent component that defines it and wrap that definition in useCallback.  react-hooks/exhaustive-deps
285:6  Warning: React Hook useCallback has missing dependencies: 'handleOpenWindow', 'isLoading', 'onToggle', and 'pipe'. Either include them or remove the dependency array. If 'onToggle' changes too often, find the parent component that defines it and wrap that definition in useCallback.  react-hooks/exhaustive-deps

./components/pipe-store-markdown.tsx
106:15  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element
106:15  Warning: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.  jsx-a11y/alt-text

./components/pipe-store.tsx
1157:5  Warning: React Hook useCallback has a missing dependency: 'handleUpdatePipe'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
1176:6  Warning: React Hook useEffect has a missing dependency: 'fetchStorePlugins'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
1180:6  Warning: React Hook useEffect has a missing dependency: 'fetchPurchaseHistory'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
1184:6  Warning: React Hook useEffect has a missing dependency: 'fetchInstalledPipes'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
1191:6  Warning: React Hook useEffect has a missing dependency: 'fetchInstalledPipes'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
1269:6  Warning: React Hook useEffect has missing dependencies: 'fetchPurchaseHistory' and 'handleInstallPipe'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
1312:6  Warning: React Hook useEffect has missing dependencies: 'checkLogin' and 'handleUpdatePipe'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./components/settings/account-section.tsx
140:6  Warning: React Hook useEffect has missing dependencies: 'loadUser' and 'settings.user'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
272:6  Warning: React Hook useEffect has missing dependencies: 'profileForm.bio', 'profileForm.contact', 'profileForm.github_username', and 'profileForm.website'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./components/settings/ai-presets.tsx
399:6  Warning: React Hook useEffect has missing dependencies: 'fetchModels' and 'settingsPreset?.apiKey'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
905:17  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/settings/ai-section.tsx
257:6  Warning: React Hook useEffect has a missing dependency: 'fetchModels'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./components/settings/data-import-section.tsx
138:6  Warning: React Hook useEffect has a missing dependency: 'scanForVideos'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
266:6  Warning: React Hook useEffect has a missing dependency: 'checkOllama'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./components/settings/recording-settings.tsx
193:6  Warning: React Hook useEffect has missing dependencies: 'handleUpdate' and 'toast'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
300:6  Warning: React Hook useEffect has missing dependencies: 'handleSettingsChange' and 'settings'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./components/settings/shortcut-row.tsx
86:6  Warning: React Hook useEffect has a missing dependency: 'handleEnableShortcut'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./lib/hooks/use-pipes.tsx
308:6  Warning: React Hook useEffect has missing dependencies: 'loading' and 'pipes'. Either include them or remove the dependency array. You can also do a functional update 'setPipes(p => ...)' if you only need 'pipes' in the 'setPipes' call.  react-hooks/exhaustive-deps

./lib/hooks/use-settings.tsx
390:5  Warning: React Hook useEffect has missing dependencies: 'settings.user?.contact', 'settings.user?.email', 'settings.user?.github_username', 'settings.user?.name', and 'settings.user?.website'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/app/api-reference/config/eslint#disabling-rules
 ✓ Linting and checking validity of types
   Collecting page data  ...SyntaxError: Unexpected token ','
    at anonymous (null)
    at <anonymous> (C:\dev\screenpipe\screenpipe-app-tauri\.next\server\webpack-runtime.js:1:1428)
    at <anonymous> (C:\dev\screenpipe\screenpipe-app-tauri\.next\server\webpack-runtime.js:1:887)
    at reduce (null)
    at <anonymous> (C:\dev\screenpipe\screenpipe-app-tauri\.next\server\webpack-runtime.js:1:868)
    at map (null)
    at <anonymous> (C:\dev\screenpipe\screenpipe-app-tauri\.next\server\webpack-runtime.js:1:1189)
    at <anonymous> (C:\dev\screenpipe\screenpipe-app-tauri\.next\server\app\_not-found\page.js:1:2101)
    at <anonymous> (C:\dev\screenpipe\screenpipe-app-tauri\.next\server\app\_not-found\page.js:1:2148)
    at anonymous (null)

> Build error occurred
Error: Failed to collect page data for /_not-found
    at processTicksAndRejections (null)
    at processTicksAndRejections (null) {
  type: 'Error'
}
error: script "build" exited with code 1
beforeBuildCommand `bun run build` failed with exit code 1
       Error beforeBuildCommand `bun run build` failed with exit code 1
error: script "tauri" exited with code 1

It still fails to build, If anyone eose was able to build this on window and would be willing to share the exe so I'm able to test it, please let me know.

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

Successfully merging this pull request may close these issues.

5 participants