wang-bin / avbuild

ffmpeg花式编译. build tool for all platforms: iOS, android, raspberry pi, win32, uwp, linux, macOS etc.
https://sourceforge.net/projects/avbuild/files
GNU Lesser General Public License v3.0
574 stars 110 forks source link

Enable mp3 encoder #69

Open thewh1teagle opened 5 months ago

thewh1teagle commented 5 months ago

I'm using avbuild in the (wip) project nova, which utilizes yt-dlp to download audio and video content.

When running yt-dlp with the arguments -x --audio-format mp3, it attempts to re-encode the audio to mp3 but then throws the following error:

ERROR: Postprocessing: audio conversion failed: Error opening output files: Encoder not found 

Upon investigating, I found that the ffmpeg build does not have mp3 support enabled, as indicated by the output of ffmpeg --codec.

Could you please enable mp3 support in ffmpeg?

Thanks!

wang-bin commented 5 months ago

which platform? lite build or default build?

thewh1teagle commented 5 months ago

which platform? lite build or default build?

I tried with ffmpeg-6.1-windows-desktop-vs2022ltl-default on Windows, though I use it on macOS too with ffmpeg-6.1-macOS-default

wang-bin commented 5 months ago

on windows you can use mp3_mf encoder。on other platforms libmp3lame is required, the build system is legacy, i'm not sure when I will add it.

thewh1teagle commented 5 months ago

on windows you can use mp3_mf encoder。on other platforms libmp3lame is required, the build system is legacy, i'm not sure when I will add it.

Can I help by creating a pull request? Having libmp3lame available everywhere would be helpful if it's not too heavy.

wang-bin commented 5 months ago

You can create a pull request in https://github.com/wang-bin/devpkgs , I build dependencies using cmake in that repo. mp3lame does not support cmake, so you have to write yourself in https://github.com/wang-bin/devpkgs/tree/main/projects

github actions will build the dependencies, then I will manually upload dependecies to https://sourceforge.net/projects/avbuild/files/dep/dep.7z/download , which will be used by avbuild. enabling libmp3lame in ffmpeg is quit easy.

louis030195 commented 4 months ago

also interested for https://github.com/louis030195/screen-pipe

wang-bin commented 4 months ago

why mp3? why not aac?

louis030195 commented 4 months ago

PS: i switched to aac few days ago

thewh1teagle commented 1 month ago

why mp3? why not aac?

I'm interested in mp3 because that's the only encoding that works on some mp3 device players.