Ankita Shah
Ankita Shah

Reputation: 1904

ffmpeg video compressed but not playing in browser

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.

Upvotes: 6

Views: 2137

Answers (2)

AbuHuraira Lakdawala
AbuHuraira Lakdawala

Reputation: 786

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!

Upvotes: 1

Alberto Schiabel
Alberto Schiabel

Reputation: 1139

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.

Upvotes: 3

Related Questions