I found out that the most important thing is the video bitrate.
Not even the frame rate MUST be 24 fps as I tested with other values like 30 and it worked.
You need to make sure the bitrate is 3MB or lower, or it will not run.
Usually if you are encoding in one pass the target bitrate will not be respected so the video will actually be way above it, you can see when you open the video properties on windows and to the details tab.
I had to test multiple bitrate values until the final video was actually below 3000 kbps, then it ran.
Try to use a software that you can use CBR instead of VBR to encode the video.