Last few seconds of audio cutting out of clips imported into iMovie
Recently I've started recording videos using OBS. I record them as .mp4's, and when I do "Get Info" on the recorded clips, the codecs are AAC and H.264. I can watch them with Preview/QuickTime and have no issues with audio or video - they always play correctly.
When I import those clips into iMovie, however, some of them will occasionally lose the last 1-3ish seconds of audio. This appears to be random - if delete and then reimport clips, the ones where the audio cuts out might change, although it does seem some clips tend to more consistently cut out.
I've noticed this happening just watching clips immediately upon import, before I even add them to the movie itself, and it also seems that when I add clips and trim them, it can cause other clips to drop more audio, so even if I trim out bits of dropped audio, trimming other clips might still retroactively cause more audio to drop. The worst thing is that this doesn't seem to just be an iMovie playback issue - when I export videos, they still have the dropped audio.
All of this leads me to think it's a codec problem, but it looks like the video codecs are supported by iMovie, and QuickTime plays them perfectly every time. I found this thread - https://discussions.apple.com/thread/251239488 - and am planning to try Handbrake, but haven't gotten a chance to yet. It seems really strange to me that I would need to, though, when I'm already using .mp4 files with AAC.
Hopefully Handbrake can fix this, but right now it's making iMovie mostly unusable. I wanted to reach out and see if anyone had other suggestions to this, or had similar issues with iMovie?
MacBook Pro 15", macOS 10.14