ffmpeg video compressed but not playing in browser

喜你入骨 提交于 2019-12-10 15:39:38

问题


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.


回答1:


Look at the table "Browser compatibility". https://developer.mozilla.org/en-US/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. I suggest you to use the video format H.264 and MP3 in MP4.




回答2:


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!



来源:https://stackoverflow.com/questions/39658508/ffmpeg-video-compressed-but-not-playing-in-browser

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