Ffmpeg video compressed but not playable in browser

I turned on ffmpeg4android lib. Video compression works fine, but video does not play in a browser other than the Safari browser. after uploading to the server. I used the 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.

+4
source share
2 answers

Look at the Browser Compatibility table. https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats

It seems that you are using the unsupported taste of mp4 due to the use of an unusual codec. I suggest you use the H.264 and MP3 video formats in MP4.

+2

.

ffmpeg -i mpeg4_video.mp4 -c:v libx264 libx264_from_mpeg4.mp4

...

JWPlayer!

0

Source: https://habr.com/ru/post/1655602/


All Articles