Ecasound Input Seeking Using Time Offsets

This article explains how to specify input seeking using time offsets in Ecasound directly from the command line. Ecasound is a versatile multitrack audio processing tool for Unix-like environments, and it provides dedicated command-line parameters to set the read position of an input file. By utilizing the -y option, users can skip unwanted portions of audio files and start playback, recording, or processing from precise timestamps.

The -y Option for Input Seeking

To define a starting time offset for an audio file, Ecasound uses the -y command-line option. The -y parameter must precede the input definition (-i) to which it applies.

The general syntax is:

ecasound -y:offset -i:input_file [other options] -o:output_file

The offset value specifies where Ecasound begins reading the audio stream. If you do not specify -y, Ecasound begins reading the input at 0 seconds.

Time Format Options

The offset parameter accepts time values in multiple standard formats:

Practical Examples

1. Basic Playback from a Specific Offset

To play an audio file starting at the 45-second mark:

ecasound -y:45 -i:track.wav -o:alsa

2. Seeking and Setting Processing Duration

Input seeking is frequently paired with the -t option, which defines processing duration. To start reading a file at minute 2:00 and process only 30 seconds of audio:

ecasound -y:02:00 -t:30 -i:source.flac -o:clipped.wav

3. Seeking Multiple Inputs Independently

When using multiple audio inputs within different chains, you can specify independent time offsets for each input by placing a distinct -y flag directly before each -i argument:

ecasound -a:1 -y:10.5 -i:track1.wav -a:2 -y:25.0 -i:track2.wav -a:all -o:alsa

In this setup, track1.wav begins processing at 10.5 seconds, while track2.wav begins at 25.0 seconds. Both chains route simultaneously to the output.