Foobar2000:Components 0.9/Command-Line Decoder Wrapper (foo input exe)

From Hydrogenaudio Knowledgebase
Jump to: navigation, search
Foobar2000_Logo.png

Description

The Command-Line Decoder Wrapper allows you to play almost any otherwise unsupported audio format through foobar2000. All you need is a standalone command-line decoder executable that converts your files to one of the supported formats, such as WAV. Such decoders are available for nearly every audio format in existence.

In certain cases, the Command-Line Decoder Wrapper is a superior alternative to the available native foobar2000 decoders if the native decoders are plagued by bugs; this component is inherently multi-instance safe and makes foobar2000 immune to crashes caused by buggy decoders.

Using FFmpeg

It is possible to use FFmpeg.exe with this component. However, spin-off of Command-Line Decoder Wrapper - FFmpeg Decoder Wrapper - is now available as a separate component. It works in similar manner, but was specialized for use with FFmpeg/FFprobe rather than arbitrary command-line decoders; among other things it supports seeking by FFmpeg -ss and reading of tags via FFprobe.

Drawbacks

When decoding to temporary files (%d): Because the whole file is decoded in advance, this component stalls for a while before playback of each file can begin. To avoid playback interruptions when changing songs, you might want to increase your playback buffer length (in Preferences / Playback / Output).

When decoding via stdout (no %d): Slow seeking within the decoded audio. Playback will start instantly in most cases though.

Usage

Before using, you must configure the component for use with specific decoders. The decoder configuration page consists of four fields:

Format name

The name you wish to refer to the format by. It will be reported in %codec% of relevant files.

Decode command

The command line to execute when decoding your files. Refer to the individual decoder's manual for details.

Use %s to specify the source file and %d to specify the destination file. If you do not include %d, foobar2000 will expect the decoder to write to stdout.

Examples:

  • For TAK files: takc -d %s %d
  • For any format supported by FFmpeg, live decoding (faster but wrong duration shown): ffmpeg -i %s -f W64 -
  • For any format supported by FFmpeg, decode whole file first (slower): ffmpeg -i %s %d

File type mask

A wildcard-pattern that defines what files should be fed to this decoder.

Example: *.TAK for TAK files.

Multiple patterns may be specified per one decoder, delimited by semicolon.

This is intentionally kept separate from "format name" to allow alternate extensions and prefix extensions.

Since version 0.5 of the component, you can specify protocols, eg. rtmp://*

Decoder output format

Format (to be exact: file type extension) that this decoder produces.

This value should be set to WAV (the default) in most cases. Some exotic decoders may only support decoding to another format, hence this has been made configurable.

Write tag types

Tag types to write to when the user attempts to edit tags on the file.

USE WITH CAUTION - this feature may damage your files if used incorrectly; enable only after checking file format specifications for the file format you're dealing with!

You do not need to enable this to read tags from your files, the Command-Line Decoder Wrapper component will attempt to read popular tag types (ID3v1/v2, APEv2) from your files regardless of this setting.

Use the bottom pane of the preferences page to specify folders containing your decoder binaries. If your binaries are present in %PATH%, there's no need to do so.

Link