dotnettools/SharpGrabber

Example converting to .mp3

hswlab opened this issue · 1 comments

Hi, can anyone tell if it is possible to convert a single .ts or .mpg4 file to mp3 with SharpGrabber? Even better would be a working code example if it is possible :)

I tried with the following code, but it doesn't seem to work with some files, or it creates files that can't be played with the VLC player. Maybe I'm on the wrong track with this solution.

var concatenator = new MediaConcatenator("D:\test.mp3") { OutputMimeType = "audio/mpeg", OutputExtension = "mp3", }; concatenator.AddSource("D:\test.ts"); concatenator.Build();

Currently I use the MediaToolkit to convert. I feel like this is unnecessary to use yet another library in the project when SharpGrabber already uses ffmpeg.

Hi
This seems like a valid example. I have to debug and try finding what the problem is.