AC3Filter tools
AC3Filter tools is a set of command-line tools for manipulating audio files. It includes AC3 encoder and decoder, SPDIF format converter, parametric filter, graphic equalizer and more.
ac3enc
Simple AC3 encoder tool. It takes a WAV file at input and makes AC3 file. WAV file must have PCM format (16/24/32bit and floating point formats are supported). Multi-channel WAV files are supported (for example, files generated by valdec utility, see below).
Example: encode input.wav file into output.ac3 with 448kbps bitrate
> ac3enc input.wav output.ac3 -br:448000
bsconvert
Bitstream converter utility. This utility converts files between numerous MPA/AC3/DTS stream types: SPDIF padded, 8/14/16bit big/low endian. By default, it converts any stream type to the most common byte stream.
Example: detect and print actual file format:
> bsconvert file.dts
Example: convert AC3/WAV file (multi-channel AudioCD format) to usual AC3 file:
> bsconvert track1.wav track1.ac3
Example: convert DTS file to 14bit format:
> bsconvert input.dts output.dts 14le
equalizer
Simple graphic equalizer.
Example: Attenuate frequencies below 100Hz by 6dB, gain the band with the center at 200Hz by 3dB and leave everything after 500Hz unchanged.
> equalizer a.wav b.wav -f1:100 -g1:-6 -f2:200 -g2:3 -f3:500
filter
Simple parametric filter.
Example: Band-pass filter from 100Hz to 8kHz with transition width of 100Hz. Attenuate all other frequencies (0-50Hz and 8050Hz to nyquist frequency) by 100dB.
> filter in.wav out.wav -bandpass -f:100 -f2:8000 -df:100 -a:100
Example: Low-pass half of the total bandwidth with 1% transition bandwidth. Note, that in normalized form nyquist frequency is 0.5 (not 1.0!), so half of the bandwidth is 0.25 and 1% of the bandwidth is 0.005. For 48kHz input, this means low-pass filter with 12kHz cutoff frequency and 240Hz transition band width.
> filter in.wav out.wav -lowpass -f:0.25 -df:0.005
gain
Just gain the wave.
Example:
> gain a.wav b.wav -gain:-10
mpeg_demux
MPEG Program stream demuxer. This utility allows to extract individual streams from MPEG file.
Example: print file information to know what streams the file contains:
>mpeg_demux.exe test.mpg MPEG Program Stream demuxer This utility is a part of AC3Filter project (http://ac3filter.net) Copyright (c) 2007 by Alexander Vigovsky Found stream bf (Private stream 2) Found stream e0 (MPEG Video stream) Found stream c0 (MPEG Audio stream) Found stream c1 (MPEG Audio stream) Found stream bd (Private stream 1) Found substream 82 (AC3 Audio substream) Found substream 83 (AC3 Audio substream) Found substream 84 (AC3 Audio substream) Found substream 8d (DTS Audio substream) Found substream a6 (LPCM Audio substream)
File in this example contains 1 video stream and 7 audio streams of different formats.
Example: extract sub-stream 83 from a file:
> mpeg_demux test.mpg -d test.ac3 -ss:83
noise
Noise generator. You can playback some noise or generate a WAV file with noise. It supports PCM 16/24/32 bit or PCM float formats. It can generate multi-channel noise.
Example: generate 10 seconds of 6 channel 32bit noise:
> noise 10000 -spk:6 -fmt:2 -w noise.wav
resample
Sample rate conversion utility. You can specify transition band width and attenuation level.
Example: Resample to 48kHz
> resample a.wav b.wav -rate:48000
Example: High-quality resample (sensible only for at least 24bit files)
> resample a.wav b.wav -rate:48000 -a:150 -q:0.999 -r:48000
Example: Fast resample
> resample a.wav b.wav -rate:48000 -a:80 -q:0.80 -r:48000
spdife
This utility encapsulates AC3/DTS/MPEG Audio stream into SPDIF stream according to IEC 61937 standard.
Example: Convert an AC3 file to a WAV file to write multi-channel AudioCD
> spdifer track1.ac3 track1.wav -wav
swab
This utility just swaps swaps byte order in a file. Bytes 0 1 2 3 ... are reordered as 1 0 3 2 ...
Example:
> swab input output
valdec
Multi-functional file player, decoder and processor. This utility may be used for:
- Detect a file type
- To playback a file (AC3/DTS files are supported)
- Decode a file into raw/wav format. All output formats and processing options available in AC3Filter are supported!
Example: Detect and print file details and playback it:
E:\samples\ac3>valdec test.ac3 -i File: test.ac3 Size: 15020032 Length: 4:28 Frames: 8381 Frame interval: 1792 Bitrate: 448kbps Stream format: AC3 3/2.1 (5.1) 48000Hz Bitstream type: byte stream Frame size: 1792 Samples: 1536 Bitrate: 448kbps SPDIF stream type: 0x1 Frame interval: 1792 Actual bitrate: 448kbps Opening audio output PCM16 3/2.1 (5.1) 48000... 1.9% Frs: 176 Err: 0 Time: 0:03.187 Level: -30 dB FPS: 55 CPU: 0.0%
Example: Decode a file into multi-channel 24bit WAV file with +10dB gain:
> valdec test.ac3 -wav file.wav -spk:0 -fmt:1 -gain:10
wavdiff
Finds the difference between 2 audio files. Calculates amplitude difference and RMS difference. Can compare files of different types, like PCM16 and PCM Float (number of channels and sample rate must match). Can write the difference into the difference file. May check maximum difference for automated testing.
Example: Comapre a.wav and b.wav and write the difference into c.wav
> wavdiff a.wav b.wav -diff c.wav

