Currently I'm using Handbrake on my computers to rip DVDs, it's free and has a good, extensive feature set. Primarily use h.264 (video) and mp3 (audio) as most devices support those two codecs on a hardware level for playback (hardware support being less battery-draining than hardware/software support). AAC (audio) is fine too though.
Using h.265 typically gives you just as good/often better quality than h.264 while also resulting in significantly smaller file sizes but note that you might want to experiment with resolution levels as higher res, h.265 video will really tap your phone's resources. An example being a h.265 video ripped at 720 will play fine on my old S3 but the same video at 1280 will be sporadic, jerky, and video/audio out of sync. Your S8 has much more horsepower so you'll be able to get by with much higher resolutions but do some tests anyway.
Regarding media players on your S8 I'll recommend either MX Player (go for the pay-for version, the free version is pretty ad-heavy) or VLC (free and no ads). Both can handle a very, wide range of file types and codecs. I give a slight edge to MX Player as its Settings menus have a lot more options so if you like to tweak things relative to hardware and software support, there's a lot there. And as far as their user interfaces, both have some really nice features. I have both on my phone and it's hard to say that one is that much better than the other.