1.1.1 • Published 5 years ago
ffmpeg-f v1.1.1
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.
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
tscornpm run buildto build - run
tsc -wornpm startto watch build - run
npm linkto get development version of f in your path - run
node dist/clito run f, orfif 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