Skip to content

Seeking Multichannel Ogg FLAC Files Does Not Handle Run-Length Encoding Correctly. #262

@smith3390s

Description

@smith3390s

I am working on a recording/playback system that is designed to encode and decode Vorbis, SPEEX, and FLAC. This is a multichannel system - typically 8 channels but could be up to 24 or 32. The system relies on the Xiph.org libraries for the Ogg container services and the encode/decode libraries. I am using the latest release of libFLAC – 1.3.2. At this time, recording and playback is working great for SPEEX.

The use-case for this system is to record speech from one or more microphones and to log an event when a microphone becomes active. Usually, only one microphone is active at a time but there are rare occasions when speakers interrupt each other. The event log is then available during playback to instantly seek to a specific speaker event. This works as expected when the encoding is SPEEX.

When playing a FLAC encoded file, seeking results in what sounds like unexpected 'dead' time, 'lost' or 'dropped' audio sections, or 'overlapping' audio. My guess is that since there is typically only one channel with active audio at a time, FLAC encodes using run-length encoding for the 'empty' channels and this results in some irregular frames in the data stream. And I'm guessing that the seek methods are not designed to handle this. As an experiment, I created a test recording with all channels always active – sections of speech interspersed with ‘silence’ in the form of a very low level noise signal. This created a multi-channel, multi-event recording that I could then play back and seeking worked correctly.

I recently pulled the latest FLAC source and rebuilt the libraries. I still encounter the same seeking issues when sections of channel audio are encoded using run-length encoding.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions