FLAC as it is lossless.
For CDs have a look at the EAC program as it is free and will make sure all details on the CD are 100% accurate.
For vinyl try Audacity, as it is also free and has features that will allow you to improve any dodgy records. (Most users have some that are less than perfect) NOTE: Make sure you manually input all the record details so that your streamer can easily find them, also do the same for CDs where the information is not automatically recognised.
Have fun
Bill