Skip to content

ffmpeg python - Unable to change the bitrate of Mp3 audiofile  #383

@KishanGosh

Description

@KishanGosh

Hi all,

I used this python code for converting a wav file to mp3 file, All parameters are changed as per the given input but if i try changing bit rate to 128kbps , the resultant file shows is just 64kbps. I have tried changing all formats of input file(wav, aac,mp3) but not able to change the bitrate more than 64kbps.

stream = ffmpeg.input('D:/Projects/Wav file/Demo/109-Sin_1500_48000Hz-PCM_24_Ch-6.wav')
stream = ffmpeg.output(stream, 'D:/Projects/Wav file/Demo/testm6.mp3',acodec ='libmp3lame',audio_bitrate='128k', ar=44100,ac=2)
stream = ffmpeg.overwrite_output(stream)
ffmpeg.run_async(stream)

Even tried "ab=128k or ab=128000" instead of audio_bitrate

Resultant file : bitrate is 64kbps
Given input : 128kbps

What might be th factor i am missing here ?
Why ffmpeg is not changing the bitrate more than 64kbps ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions