HydrogenAudio

Hosted Forums => foobar2000 => Development - (fb2k) => Topic started by: terdex on 2024-04-20 06:41:11

Title: converting .flac to .mp3 with the SDK
Post by: terdex on 2024-04-20 06:41:11
Converting files is a feature of foobar2000 that it seems to me should be accessible through the SDK, for example, if you have a pointer to a file that's in FLAC format you can call a built-in function to write it to an output in a MP3 codec file.

Is this possible?? have I missed this entirely?
Title: Re: converting .flac to .mp3 with the SDK
Post by: fooball on 2024-04-20 08:14:21
Does FB2K include any codecs built in??  Why would it?  Just call FFMPEG.
Title: Re: converting .flac to .mp3 with the SDK
Post by: terdex on 2024-04-20 20:36:31
Does FB2K include any codecs built in??  Why would it?  Just call FFMPEG.

well (i was under the impression) it does, because you can use foobar to convert files. If you right click on a track or a set of tracks, you can go to convert > select output type.

It's true that you can use ffmpeg as an external encoder from the normal foobar program. You can also call ffmpeg or lame from c++ or use the libffmpeg libraries from c++.
Title: Re: converting .flac to .mp3 with the SDK
Post by: sveakul on 2024-04-20 22:16:09
If you have installed Foobar with the conversion option you can install and use the Free Encoder Pack (https://www.foobar2000.org/encoderpack (https://www.foobar2000.org/encoderpack)) to set you up with a range of encoders that are called up/selected as you described.
Title: Re: converting .flac to .mp3 with the SDK
Post by: fooball on 2024-04-21 00:35:07
If you right click on a track or a set of tracks, you can go to convert > select output type.
That's as maybe, but it's only calling up standard library routines to do that (eg LAME).
Title: Re: converting .flac to .mp3 with the SDK
Post by: Case on 2024-04-21 06:53:59
The file format conversion is provided by a component and none of its features are exposed by the SDK. And without optional third party encoder binaries the Converter can only write WAV files.

If you need to encode audio yourself, for example to make a streaming component, you'll need to include the required encoding library and functionality in your component.
Title: Re: converting .flac to .mp3 with the SDK
Post by: terdex on 2024-04-21 21:39:30
The file format conversion is provided by a component and none of its features are exposed by the SDK. And without optional third party encoder binaries the Converter can only write WAV files.

If you need to encode audio yourself, for example to make a streaming component, you'll need to include the required encoding library and functionality in your component.

gotcha that makes sense.