Why video made with iOS can't be read on Android but the inverse works
If you do not want your users to download a player to show the videos, then you have no other choice but to create videos with the H.264 Baseline profile. This is because the stock Android player does not support anything higher.

iOS on the other hand does support the Main and High profile. While not listed in the iOS specifications, the iPhone 4S and upwards should support it.

It could very well be that your Samsung's video app records High profile video and can also play it (because Samsung included a non-stock player*). In any case, converting to Baseline profile would ensure that the video is playable on all devices.

ffmpeg -i input.mp4 -c:v libx264 -profile:v baseline -pix_fmt yuv420p -crf 23 output.mp4


That should do it. You can change the CRF parameter to change quality. Check the x264 encoding guide for more.

* Disclaimer: I don't own a Samsung Android phone. No idea if they have a non-stock player.