我如何解码mp3并用ezstream将其编码为aac [英] How can i decode an mp3 and encode it as aac with ezstream

查看:282
本文介绍了我如何解码mp3并用ezstream将其编码为aac的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我当前的ezstream配置

This is my current ezstream config

<ezstream>
   <url>http://localhost:8000/test</url>
   <sourcepassword>password</sourcepassword>
   <format>MP3</format>
   <filename>playlist.m3u</filename>
   <reencode>
      <enable>1</enable>
      <encdec>
         <format>MP3</format>
         <match>.mp3</match>
         <decode>madplay -b 16 -R 44100 -S -o raw:- "@T@"</decode>
         <encode>lame --preset cbr 32 -r -s 44.1 --bitwidth 16 - -</encode>
      </encdec>
   </reencode>
</ezstream>

它正在安装到一个icecast服务器,它的解码和编码mp3到更低的比特率,我正在尝试将其编码为aac而不是mp3,希望质量提高,因为我听说aac比mp3更低的比特率。

It's mounting to an icecast server, its decoding and encoding mp3 to a lower bitrate, I'm trying to encode it to aac instead of mp3 in hopes that the quality improves as i heard that aac is better than mp3 for lower bitrates.

我想知道的是如果我可以使用诸如FFmpeg之类的aac编码器,而不是lame mp3编码器,并获得最终用户而不是mp3的aac,如果这样,我应该传递给FFmpeg的参数,以便它与我当前的配置一起使用。

What i would like to know is if i can use an aac encoder such as FFmpeg instead of the lame mp3 encoder and get an aac to the end user instead of mp3, if so what parameters should i pass to FFmpeg so that it works with my current config.

推荐答案

Icecast不正式支持AAC由于许可。

Icecast doesn't officially support AAC due to licensing.


Icecast是一个流媒体服务器,目前支持Ogg(Vorbis和Theora),Opus,WebM和MP3音频流。

Icecast is a streaming media server which currently supports Ogg (Vorbis and Theora), Opus, WebM and MP3 audio streams.

非官方 它可能会工作在通槽模式下,但您需要尝试看为自己。

Unofficially it might work in pass-trough mode, but you need to try and see for yourself.

对于FFmpeg AAC ecoding,您应该使用 Fraunhofer FDK AAC库(libfdk_aac)。在 ADTS 中,您还需要像AAC这样的可流式格式。

For FFmpeg AAC ecoding you should use the Fraunhofer FDK AAC library (libfdk_aac). You also need a streamable format like AAC in ADTS.

根据您的示例,它似乎使用stdout进行转码。如果您使用madplay将MP3转换为PCM,您应该可以使用以下方式将其编码为AAC:

Based on your example it seems it uses stdout to transcode. If you converted the MP3 to PCM using madplay you should be able to encode it to AAC using something like this:

<encode>ffmpeg -f s16le -ar 44.1k -ac 2 -i - -b:a 32k -ar 44.1k -f adts -</encode>

这篇关于我如何解码mp3并用ezstream将其编码为aac的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆