问题
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