media-tools/to_opus
2023-07-26 23:38:46 +02:00
..
README.md small bugfixes and a better README 2023-07-25 16:29:30 +02:00
to_opus.sh fixed an bug, when encoding .mkv to .mkv 2023-07-26 23:38:46 +02:00

to_opus

This script converts all audiostreams in all files with given file extension in your current working directory and all subdirectories to opus. The Script will choose an automatic bitrate for every audiostream dependent on the number of channels and the original bitrate. See https://wiki.xiph.org/Opus_Recommended_Settings for more information about this.

If used on containers with video- or multiple audiostreams, this skript will only convert the audiostream and copy all streams in a Matroska container.

Flags

-e defines the extension of the files that should be converted
-d deletes original files after conversion
-h show help (not implemented)

Examples

convert all files to opus
bash to_opus.sh -e "*"

convert all files with .mp3-extension and .flac-extension to opus and deletes original files after that
bash to_opus.sh -e mp3 -e flac

convert the audiostream of an movie
bash to_opus.sh -e mp4

Dependencies

  • ffmpeg
  • Bash 4^

Why opus?

Opus is an open format and royalty free. It is FOSS. It is supported on most platforms and has a better quality per bitrate then formats like mp3 or Vorbis.

Opus Quality comparison with other formats