A collection of FFmpeg wrapper scripts
| bin | ||
| lib | ||
| flake.lock | ||
| flake.nix | ||
| README.org | ||
ffutils
This is a collection of ffmpeg wrapper scripts. Currently the following scripts are available:
| ffconv | Convert multiple media files from one format to another |
| ffcut | Extract a part of a media file |
All are created with the sf script framework.
Dependencies
Installation
Scripts
ffconv
ffconf converts multiple media files from one format to another.
This is done recursively so the files can be in any directory structure.
$ ffconv mp3 opus Converting 4 files from mp3 to opus Processing file 4/4: Alphaville - Big in Japan done
Warning: The default behavior removes the original files.
Use the --keep or --move flags to keep the original files or move them to another directory.
Usage
Usage: ffconv [OPTIONS] FROM_FORMAT TO_FORMAT
Convert multiple media files from one format to another.
Subdirectories are visited recursively.
POSITIONAL ARGUMENTS
FROM_FORMAT From format
TO_FORMAT To format
OPTIONS
-d, --directory DIRECTORY Convert files in DIRECTORY (default: current work
directory)
-k, --keep Keep original files
-l, --list List files which match the FROM_FORMAT
-m, --move DIRECTORY Move old files to DIRECTORY (omits --keep)
-h, --help Show this help message and exit
EXAMPLES
ffconv mp3 opus Convert all mp3 files to opus
ffconv -m trash mp4 mkv Convert all mp4 to mkv and move the original
ones to './trash'
ffconv -d ~/music -l wma mp3 List all wma files from '~/music' and ask for
converting them to mp3
ffcut
ffcut extracts a part of a media file.
$ ffcut --from 00:15:00 --to 00:16:30 video.mp4 Cutting file video.mp4 The extracted part was saved to cutted_video.mp4
Usage
Usage: ffcut [OPTIONS] FILE
Extract a part of a file.
POSITIONAL ARGUMENTS
FILE File which will be cutted
OPTIONS
-f, --from TIMESTAMP/SECONDS Extract from TIMESTAMP/SECONDS (default: 0)
-o, --out FILE Save extracted part to FILE (default:
cutted_<filename>)
-t, --to TIMESTAMP/DURATION Extract to TIMESTAMP/DURATION (default: end)
-h, --help Show this help message and exit
EXAMPLES
ffcut -t 5 video.mp4 -o cut.webm Extract the first five seconds of
'video.mp4' to 'cut.webm'
ffcut -f 00:10:30 -t 00:14:15 video.mp4 Extract the part from 00:10:30 to
00:14:15 from 'video.mp4'