mp4grep 0.1.3 for Linux
mp4grep in OCaml. Installation and dependencies:
Installation
-
Install Opam
-
Create a new switch (version of the compiler) by running
opam switch create mp4grep 4.12.0+domains+effects
. This version is necessary as mp4grep will be updated to take advantage of multicore domains in OCaml. -
Install parmap on your new switch:
opam install parmap
. -
Download mp4grep, untar/zip it, and cd into its directory.
-
Execute
source configure.sh --prefix [location to install mp4grep]
. On Linux a good choice might be~/.local/bin
, which is often in your $PATH. -
Run
make install
. -
You will need to specify your Vosk-compatible transcription model and directory for cached transcriptions by setting MP4GREP_MODEL and MP4GREP_CACHE. You'll probably want to export them in your .bashrc or .zshrc as well:
export MP4GREP_MODEL=/full/path/of/model
,export MP4GREP_CACHE=/full/path/of/cache/dir
.
mp4grep-convert
The mp4grep executable only takes single-channel, 16000 Hz wav files as input. Running make install
also provides you with mp4grep-convert
, which is a Bash script that will take directories or audio files as its arguments, extract audio files from directories, and convert them to wav files using ffmpeg.
Dependencies
OCaml 4.12.0+domains+effects, parmap 1.2.4, and ffmpeg. The Makefile assumes that you have installed parmap using Opam, and looks under OPAM_INSTALL_PREFIX for it. You will have to modify the topmost ocamlc
command in the Makefile if you have installed it another way.