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

Example converting to .mp3 #90

Open
hswlab opened this issue Jun 15, 2023 · 1 comment
Open

Example converting to .mp3 #90

hswlab opened this issue Jun 15, 2023 · 1 comment

Comments

@hswlab
Copy link

hswlab commented Jun 15, 2023

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.

@javidsho
Copy link
Contributor

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

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

2 participants