https://github.com/paperclover/f
a slightly nicer cli to use ffmpeg. presets over fine tuning.
https://github.com/paperclover/f
Last synced: 4 months ago
JSON representation
a slightly nicer cli to use ffmpeg. presets over fine tuning.
- Host: GitHub
- URL: https://github.com/paperclover/f
- Owner: paperclover
- Created: 2020-07-23T21:17:43.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-01T14:51:49.000Z (over 4 years ago)
- Last Synced: 2025-02-07T00:52:42.569Z (4 months ago)
- Language: TypeScript
- Homepage:
- Size: 223 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# f
## 1. what the *f* is that name
f stands for ffmpeg. i wanted a very short alias for converting media with ffmpeg. so why not
call it f.## 2. what does it do
it converts media files using presets defined in [`presets.ts`](./src/presets.ts).cli usage is `f [presets] [files]`, but the ordering doesn't matter.
- `f mp4 test1.mov test2.mov` (preset first)
- `f test1.mov test2.mov mp4` (preset last)you can do multiple things at once, just keep the order of preset and files the same.
- `f mp3 test1.mov mp4 test2.mov` (preset first)
- `f test1.mov mp3 test2.mov mp4` (preset last)also, it looks like this
## 3. how do i add presets
modify source and recompile## 4. development tutorial and breakdown
setup
- run `npm i -D`
- run `tsc` or `npm run build` to build
- run `tsc -w` or `npm start` to watch build
- run `npm link` to get development version of f in your path
- run `node dist/cli` to run f, or `f` if you linked it
files
- **src/cli.ts** - the cli for parsing the args you pass on the command line
- **src/presets.ts** - the presets with args for ffmpeg
- **src/job-runner.ts** - the thing that runs ffmpeg and parses its output
- **src/render.ts** - thing that outputs the progress bars
- **src/index.ts** - an api combining all the stuff if you import the node module as a node module. why