I tried out ly2video with a lilypond file where I set the midi file extension to the standard .mid
#(ly:set-option 'midi-extension "mid")
ly2video is looking for .midi hardcoded so cli.py:1565 gave me the error "Failed to generate MIDI file".
Maybe ly2video could parse for that Scheme command, or at least rewrite the error message to inform the user of exactly which file it is looking for, and not assume that the midi file was not generated. For example instead of showing sanitisedLyFileName, show midiPath so one can check themselves.