简体   繁体   English

如何快速播放mp4音频文件?

[英]How to play mp4 Audio files in swift?

I have some Audio files in mp4 format - which I used thinking this would be the best format for use on both iOS and Android devices. 我有一些mp4格式的音频文件-我曾经以为这是在iOS和Android设备上使用的最佳格式。 However they do not play with either AVAudioPlayer or AVPlayer. 但是,它们不能与AVAudioPlayer或AVPlayer一起播放。 Is there another player that may handle it, or some way (in Swift) to covert them to mp3? 是否有其他播放器可以处理它,或以某种方式(在Swift中)将其隐藏到mp3中? Note this only an issue with mp4 audio only files - mp4 videos are fine. 请注意,这只是mp4音频文件的一个问题-mp4视频很好。

AvPlayer可以播放mp4文件,但是如果将它们编码为AMR_NB,则不能播放,而需要将其编码为AAC。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM