ffmpeg视频压缩但不能在浏览器中播放 [英] ffmpeg video compressed but not playing in browser
问题描述
我已经集成了 ffmpeg4android lib
。视频压缩工作正常,但除浏览器浏览器外,视频无法在浏览器中播放。上传到服务器后。我使用了以下命令。
I have integrated 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.
推荐答案
查看表浏览器兼容性。 https://developer.mozilla.org/en-US/docs/Web / HTML / Supported_media_formats
Look at the table "Browser compatibility". https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats
由于使用了不寻常的编解码器,似乎您使用和不支持mp4的风格。我建议你在MP4中使用视频格式H.264和MP3。
It seems like you're using and unsupported flavour of mp4, due to the usage of an uncommon codec. I suggest you to use the video format H.264 and MP3 in MP4.
这篇关于ffmpeg视频压缩但不能在浏览器中播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!