Skip to content

Commit

Permalink
More readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jonkeane committed Jan 23, 2024
1 parent 4bdff22 commit f8bd4fa
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 4 deletions.
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,25 @@ A video clipper that takes ELAN files as it's input and generates clips based on

fflipper installs as a standard macOS application. There are two different versions for macs with apple M-based chips (e.g. M1, M2, M3) and older macs with x86 processors.

[Download for M-based macs](https://github.com/jonkeane/fflipper/releases/download/0.1.0-rc/fflipper.pkg)
#### [Download for M-based macs](https://github.com/jonkeane/fflipper/releases/download/0.1.0-rc/fflipper.pkg)

[Download for x86 macs](https://github.com/jonkeane/fflipper/releases/download/0.1.0-rc/fflipper_x86.pkg) (only needed for older macs)
#### [Download for x86 macs](https://github.com/jonkeane/fflipper/releases/download/0.1.0-rc/fflipper_x86.pkg) (only needed for older macs)

If you try one and get an error, try the other.

## Developer installation

fflipper uses the [poetry](https://python-poetry.org) for installation and dependency management. One you [install poetry](https://python-poetry.org/docs/#installation), you should be able to do the following (all from inside of the fflipper directory):

```
poetry install
poetry shell
python run_app.py
```

## Harder installation

Only use this method if you are having issues installing using the section above. This might not work depending on your system.

* Backup, alternative for M-based macs: `https://github.com/jonkeane/fflipper/releases/download/0.1.0-rc/fflipper_backup_alternative`
* Backup, alternative for x86 macs: `https://github.com/jonkeane/fflipper/releases/download/0.1.0-rc/fflipper_x86_backup_alternative` (only needed for older macs)
16 changes: 14 additions & 2 deletions fflipper/clipper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import sys, re, os, time, subprocess, errno
import sys, re, os, time, subprocess, errno, platform
from pathlib import Path
from datetime import datetime # both datetime imports needed?
from datetime import timedelta # both datetime imports needed?
Expand Down Expand Up @@ -63,8 +63,20 @@ def clipPrep(self):
# deinterlace+crop '-vf "[in] yadif=1 [o1]; [o1] crop=1464:825:324:251 [out]"'
# deinterlace '-vf "[in] yadif=1 [out]"'
dur = self.tend - self.tstart

path_to_ffmpeg = fetch_resource(Path(__file__)) / "bin" / "ffmpeg"

# if we are running outside of a bundle, we need to add one more layer
if not (getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS')):
system = platform.system().lower()
if (system == "darwin"):
plat = platform.platform()
if ("x86" in plat):
platform_dir = "macos_x86"
else:
platform_dir = "macos_arm"
path_to_ffmpeg = Path(str(path_to_ffmpeg).replace("bin", f"bin/{platform_dir}"))

cmd = [path_to_ffmpeg]

opts = []
Expand Down

0 comments on commit f8bd4fa

Please sign in to comment.