Skip to content

Ogg to Silk failed. #5

@ghost

Description

Code used

using Konata.Codec.Audio;
using Konata.Codec.Audio.Codecs;

namespace Demo;

class Program {
    static async Task Main(string[] args) {
        using Stream input = File.OpenRead("C:/Users/Dark-/Downloads/test.mp3");
        using Stream output = File.OpenWrite("C:/Users/Dark-/Downloads/output.silk");
        AudioPipeline pipeline = [new VorbisCodec.Decoder(input), new AudioResampler(AudioInfo.SilkV3()), new SilkV3Codec.Encoder(), output];
        if (await pipeline.Start()) Console.WriteLine("Success");
        else Console.WriteLine("Faild");
    }
}

throw an exception

Unhandled exception. System.ArgumentException: Could not load the specified container! (Parameter 'containerReader')
   at NVorbis.VorbisReader..ctor(Stream stream, Boolean closeOnDispose)
   at Konata.Codec.Audio.Codecs.VorbisCodec.Decoder..ctor(Stream file)
   at Demo.Program.Main(String[] args) in D:\.Code\CSharp\Demo\src\Program.cs:line 10
   at Demo.Program.<Main>(String[] args)

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