6

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.

Ankita Shah
  • 1,866
  • 16
  • 31

2 Answers2

3

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.

Alberto Schiabel
  • 1,049
  • 10
  • 23
  • But not problem with format. Because without compress video played fine. But I tried to compress and upload it.Then it's not playing. – Ankita Shah Sep 26 '16 at 06:59
1

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!