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_fileThe 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:
- Seconds: Specified as a decimal or integer number
of seconds (e.g.,
-y:30for 30 seconds, or-y:12.5for 12.5 seconds). - Timecode format: Specified as
hh:mm:ssormm:ss(e.g.,-y:01:30to seek to one minute and thirty seconds, or-y:01:15:00for one hour and fifteen minutes). - Samples: Specified by appending an
sto the number (e.g.,-y:44100sto seek exactly 44,100 samples into the file).
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:alsa2. 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.wav3. 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:alsaIn 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.