5

I have tried multiple modules for playing mov videos from react native app in android. But none worked. Any idea?

  • react-native-video-player (error can't play this video)
  • react-native-media-player (java error)
  • react-native-android-video-player (java error)
  • react-native-video (not playing mov)
  • react-simple-video-player (no supported react native) react-native-video-controls (not playing mov)
  • react-native-video-player (not playing mov)
Harikrishnan
  • 9,688
  • 11
  • 84
  • 127

2 Answers2

2

.MOV does not work for me, too.

convert the video file:

ffmpeg -i A.MOV -vcodec copy -acodec copy out.mp4

or

https://github.com/taltultc/react-native-mov-to-mp4

Well, if you want to convert big video files so ffmpeg will do great work on server side, but for small video size convert to mp4 will not drain the battery cuz it take only few seconds.

0

As officially stated in the Android documentation Google Android does not support .mov format.

https://developer.android.com/guide/topics/media/media-formats

There are libraries that try to convert the files on the fly but they usually produce a file without the video stream or with unsynced audio.

My advice is to convert the file server side and then send it to the users.

You should use ffmpeg

https://www.ffmpeg.org/

For Mac:

brew install ffmpeg

For Linux

sudo apt install ffmpeg

And then:

ffmpeg -i input.mov -acodec copy -vcodec copy output.m4v
twboc
  • 1,452
  • 13
  • 17