Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ogg to Silk failed. #5

Open
ghost opened this issue Jul 11, 2024 · 0 comments
Open

Ogg to Silk failed. #5

ghost opened this issue Jul 11, 2024 · 0 comments

Comments

@ghost
Copy link

ghost commented Jul 11, 2024

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants