[英]ffmpeg video compressed but not playing in browser
I have integrated ffmpeg4android lib
. 我已经集成了
ffmpeg4android lib
。 Video compressing is working fine but video is not playing in browser except safari browser. 视频压缩可以正常工作,但是在野生动物园浏览器以外的浏览器中无法播放视频。 after uploading to server.
上传到服务器后。 I have used following command.
我已经使用以下命令。
ffmpeg -y -i <input file.mp4> -strict experimental -r 30 -ab 48000 -ac 2 -ar 22050 -vcodec mpeg4 -b 2097k <output file.mp4>
Please Help me. 请帮我。 Thank you in advance.
先感谢您。
Look at the table "Browser compatibility". 查看表“浏览器兼容性”。 https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats
https://developer.mozilla.org/zh-CN/docs/Web/HTML/Supported_media_formats
It seems like you're using and unsupported flavour of mp4, due to the usage of an uncommon codec. 由于使用了不常见的编解码器,您似乎正在使用不受支持的mp4版本。 I suggest you to use the video format H.264 and MP3 in MP4.
我建议您在MP4中使用视频格式H.264和MP3。
You may convert your video in this format.. 您可以将视频转换为此格式。
ffmpeg -i mpeg4_video.mp4 -c:v libx264 libx264_from_mpeg4.mp4
This would definitely work in all browsers... 这绝对适用于所有浏览器...
JWPlayer recommended! JWPlayer推荐!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.