简体   繁体   English

Android媒体控制器无法播放iOS录制的视频的声音

[英]Android media controller doesn't play sound for iOS recorded videos

I am currently developing a video streaming feature for one of my android apps. 我目前正在为我的一个Android应用程序开发视频流功能。 I am using android media framework for the purpose. 我正在为此目的使用android媒体框架。 Videos are streamed from an nginx server . 视频是从Nginx服务器流式传输的。 Android recorded videos works fine but iOS recorded videos plays only the video not the sound . Android录制的视频可以正常工作,但iOS录制的视频只能播放视频,而不能播放声音

It happens because the android support limited codecs in-built like mp3,mp4,mpeg. 发生这种情况是因为android支持内置的有限编解码器,例如mp3,mp4,mpeg。

While iphone support most of codecs. 虽然iPhone支持大多数编解码器。

What is the way to resolve this? 解决该问题的方法是什么?

MP4 for video and MP3 for audio are widely accepted and work on both platforms. 用于视频的MP4和用于音频的MP3被广泛接受,并且可以在两种平台上使用。

So you need do some stuff at the server. 因此,您需要在服务器上做一些事情。 Implement the ffmpeg library that will convert all the videos to MP4 and audio to MP3. 实现ffmpeg库,该库会将所有视频转换为MP4,将音频转换为MP3。

We are doing same mechanism to resolve this issue. 我们正在采用相同的机制来解决此问题。

Some more information to understand the problem 一些更多的信息来了解问题

Refer stackoverflow answer here 在这里参考stackoverflow答案

Hope This may help you to get the rid of your problem 希望这可以帮助您摆脱问题

Happy Coding! 编码愉快!

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

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