Seems like MKV is the way to go, haven't been able to corrupt it.
I also use ffmpeg to change the mkv container to mp4 so i can edit the files.
This code will convert all the MKV files in the folder losslessly.
for %%a in ("*.mkv") do ffmpeg -i ^"%%a^" -c copy -map 0 %%~na.mp4