Transcode is a command-line tool that converts whole directories of video files in one run. It wraps Lisa Melton’s Video Transcoding and applies the same workflow to every video in a directory, so a folder of clips takes a single command instead of one invocation per file.
Transcode can:
-
Convert an entire directory to
.m4vin a single run. -
Select the main audio and burned-in subtitle stream for each file.
-
Extract audio to
.mp3. -
Scan files to list their available audio and subtitle streams.
-
Print a summary table of the results.
It recognizes these input formats: avi, flv, m2ts, m4v, mkv,
mp4, mpg, mpeg, mov, ts, webm, vob, and wmv.
The tool runs on macOS, GNU/Linux, Windows, and other Unix-like systems. It is packaged as a Ruby gem and requires Ruby 3.2 or later. See Installing Ruby if Ruby 3.2+ is not available on your platform.
Install with:
gem install transcodeSee Video Transcoding’s requirements for external dependencies.
transcode [options]
-a, --act Perform actual encoding.
-u, --aud aud Audio stream numbers.
-d, --dir dir Source directory to transcode.
-m, --mp3 Convert files to MP3.
-o, --out out Output directory.
-s, --sca Scan files in the directory.
-t, --sub sub Subtitle stream numbers.
-i, --tit tit Specific title number.
-v, --version Show version.
-w, --wid wid Width of the table.Transcode performs a dry run by default.
It prints the commands it would run and a summary table without changing any
files.
Pass --act to perform the encoding.
Without --dir and --out, Transcode reads from and writes to the current
directory.
The --aud and --sub options take comma-separated stream numbers, either
one value applied to every file or one value per file.
Scan the source directory to inspect the available audio and subtitle streams:
transcode --sca --dir [source]Transcode three files from [source] to [destination] with the selected
audio and subtitle streams.
Add --act once the plan looks right:
transcode \
--act \
--aud 1,3,1 \
--dir [source] \
--out [destination] \
--sub 2,1,3Extract the audio of every file in the current directory to .mp3:
transcode --mp3 --acttranscode is copyright David Rabkin and available under a
Zero-Clause BSD license.