Skip to content
/ smol Public

Application to compress video and image, built with tauri

Notifications You must be signed in to change notification settings

muhsalaa/smol

Repository files navigation

Tauri + React + Typescript

This template should help get you started developing with Tauri, React and Typescript in Vite.

Installing

  • to install the release app just go to the release folder and download the .dmg file
  • you must still install ffmpeg by yourself

Dev Setup

  • follow instruction here https://tauri.app/v1/guides/getting-started/prerequisites/
    • install rust by command curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
    • run source "$HOME/.cargo/env"
  • install deps yarn
  • run tauri dev env yarn tauri dev
    • this will run the desktop debug app and provide url to debug in browser
    • since this is creating desktop app, care only using tauri API.
  • to build run yarn tauri build

ffmpeg

  • this application depends on ffmpeg for video compression.
  • install ffmpeg, the easiest way is using brew brew install ffmpeg
  • follow other way to install on their site

Recommended IDE Setup

gotcha

  • in browser sometimes you got error # window.__TAURI_IPC__ is not a function thats because you run tauri window on browser, it will run ok on desktop app.
  • in dev mode, when drag n drop, the compressed image or video might output twice. This because useEffect run twice in dev mode.
  • in production build macios, there is no PATH in bundle (causing file not found error), see here. to fix this use tauri-fix-rs.
    • in src-tauri/cargo.toml add
      [dependencies.fix-path-env]
      git = "https://github.com/tauri-apps/fix-path-env-rs"
      branch = "dev"
    • in src-tauri/src/main.rs add fix_path_env::fix(); to init of main function

About

Application to compress video and image, built with tauri

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published