Should I use the MP3 or AAC codec for a .mp4 file?

蹲街弑〆低调 提交于 2020-08-22 09:30:46

问题


We have an encoding process in place using ffmpeg on Mac OS X. This process will take a source video and a couple files from that: .m3u8 video, .mp4 video and .mp3 audio file.

By default we've used the video from our m3u8 process which is a h264 (via libx264) video with AAC (via libfaac) audio.

We are mostly using these videos on mobile devices (hence the m3u8 files) but we also use the .mp4 files for Android, Windows Phone, etc. More and more we also need to offer these same videos on the web via either a flash player or HTML5 player.

Therefore, we'd like to have the best audio/video codec combo for all these uses ... where I'm confused is to what is "standard" for a .mp4 file?

If the .mp4 uses the mp3 codec then it plays just fine everywhere but QuickTime, in QuickTime the video plays but there is not audio (works just fine in VLC player tho.)

I've been told it's due to how QuickTime uses file extensions to assume information about the video instead of trying to actually get the codec data from the file? This does make some sense, if we encode the same file but use AAC for the audio codec then it works just fine in QuickTime.

So --- what's the "correct" or "ideal" audio/video codec combo --- is it best and safe to use AAC (i.e. will it work on a broad range of devices) even though it's not a "free" codec?


回答1:


Compatibility issues set aside, you might want to take into account the quality loss induced by transcoding from mp3 to aac. As your original audio is mp3 encoded, you will have a better end result by remuxing the mp3 bitstream instead of transcoding to aac (even if aac is better than mp3 at a given bitrate).

If your workflow requires lowering the bitrate of the original mp3, then my point looses relevance.




回答2:


AAC is preferred because many modern devices such as tablets and mobile phones might have hardware decoders for it which will result in better battery and lower CPU consumption. Same applies to h264.




回答3:


http://en.wikipedia.org/wiki/HTML5_video - scroll down for a compatibility table. Seems like either MP3 or AAC work well with H.264




回答4:


Definitely use the AAC codec, as you said, it works on a wider range of devices and it is better for use in HTML5



来源:https://stackoverflow.com/questions/9168954/should-i-use-the-mp3-or-aac-codec-for-a-mp4-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!