xiph / opus-tools

A set of tools to encode, inspect, and decode audio in the Opus format.
https://opus-codec.org/
Other
212 stars 78 forks source link

[Feature Request] Fixed frame- / pagesize #50

Open SciLor opened 4 years ago

SciLor commented 4 years ago

I am currently in a project were we try to encode opus files into a specific custom file format. There is a non opus file header first (usally 0x200 length). Then the real opus "file" starts.

Specialty: Every Opus Frame / Page has to start at a 0x1000 of the file or multiply of that. So the first page has to be 0x800 long, all following pages 0x1000.

Could somebody hint me how and where to implement it to opus-tools / libopusenc?

The manufacturer seemed to have use opus-tools or a custom fork of it for that:

                tags.Comment = "Lavf56.40.101";
                tags.Fields["encoder"] = "opusenc from opus-tools 0.1.9";
                tags.Fields["encoder_options"] = "--quiet --bitrate 96 --vbr";
                tags.Fields["pad"] = new string('0', 0x138);

Our custom C# encoder tool doing extact that I think there is an extension of https://github.com/xiph/libopusenc needed Audio Format Description