I'm loading a video file (mp4) to MATLAB using VideoReader and making some edits. When done, I'm trying to write (using VideoWriter) an mp4 file, however I lose quality (in spite of changing quality to 100). I tried exporting as AVI and converting with ffmpeg, but ideally I would like to skip that part and get an extract directly from MATLAB.
Any ideas how to preserve that quality?