[Libav-user] Fwd: fixed vs floating point mp3 encoder

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Libav-user] Fwd: fixed vs floating point mp3 encoder

Lina Sharifi

Hi,
I am using ffmpeg integrated with libmp3lame for encoding (AV_CODEC_ID_MP3), Is there an option for to enable fixed point (integer) encoder? Probably a codec flag?

Thanks,
Lina


_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: fixed vs floating point mp3 encoder

Carl Eugen Hoyos-2
2017-02-04 17:58 GMT+01:00 Lina Sharifi <[hidden email]>:

> I am using ffmpeg integrated with libmp3lame for encoding
> (AV_CODEC_ID_MP3), Is there an option for to enable
> fixed point (integer) encoder? Probably a codec flag?

There is one encoder that takes different sample_fmts.
You have to choose one when initializing the encoder,
make sure that the encoder really accepts it and feed
the correct data.
(s16p, s32p and floatp are supported)

Not necessarily related: We do not guarantee that future
versions of FFmpeg take the same sample_fmts than
current FFmpeg, they have changed in the past (without
version bump)!
(That's why your code has to check the fmt.)

Carl Eugen
_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: fixed vs floating point mp3 encoder

Lina Sharifi
Thanks, that was the answer that helped me. I have a S16 raw data, I am able to successfully convert it to S32P or FLTP (by swr_convert) and feed it to the mp3 encoder. Should I expect to have different audio quality between float and int version? Is there any other differences between the two implementations?

On Sat, Feb 4, 2017 at 2:38 PM, Carl Eugen Hoyos <[hidden email]> wrote:
2017-02-04 17:58 GMT+01:00 Lina Sharifi <[hidden email]>:

> I am using ffmpeg integrated with libmp3lame for encoding
> (AV_CODEC_ID_MP3), Is there an option for to enable
> fixed point (integer) encoder? Probably a codec flag?

There is one encoder that takes different sample_fmts.
You have to choose one when initializing the encoder,
make sure that the encoder really accepts it and feed
the correct data.
(s16p, s32p and floatp are supported)

Not necessarily related: We do not guarantee that future
versions of FFmpeg take the same sample_fmts than
current FFmpeg, they have changed in the past (without
version bump)!
(That's why your code has to check the fmt.)

Carl Eugen
_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user


_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user