QuickTime Player won't save edited file: The operation could not be completed I've edited an MP4 movie file in Quicktime Player Version 10.5. 

When I try to save the edited file, I get: The operation could not be completed.

Does anyone know what causes this and/or how it can be solved?

macOS Mojave 10.14.2 / Quicktime Player 10.5 / MacBook Pro (Retina, 13-inch, Early 2015)
I had a similar problem when I downloaded a youtube video, opened in Quicktime to "trim" the video and quick time would not complete the operation. 
I ran the youtube video through Vlc Crunch (free video converter)as mp4 again and then Quicktime worked fine.