Just to warn YouTubers on the Shotcut forum. I created a 4K UHD (3840 × 2160) mp4 video with the H.265 (HEVC) codec. I checked it played OK using VLC - all perfect. I then uploaded it to YouTube. No matter whether I played the YT SD version or the 4K version, multiple short (2 or 3 seconds) segments were missing from the video and others were duplicated. I redid the shotcut export as H.264 and the upload produced a successful trancoding on YouTube.
The original footage was filmed as a 360 degree video using my Insta360 X3 camera. I then used the Insta360 Studio app to perform keyframe rotations. Since I split the video into 2 clips to delete a couple of seconds and since Insta360 Studio will not stitch the 2 clips together I had to export them as 2 mp4 files. I then used Shotcut to provide an intro, and outro and to export the whole video.
The bug is obviously with YouTube, not Shotcut. I exported several HEVC encoded videos from Shotcut, each one played perfectly in VLC and each was corrupted as above after being uploaded to YouTube. I have reported this to YouTube.
The moral of this tale is to upload H.624 to YouTube, not H.265.