aditya18thm wrote:
I also think the GPU is failing.
If that is the case, and the Mac otherwise works, then one option is to use a workflow that encodes H.265 with CPU instead GPU.
For example you might do it with Handbrake, Shutter Encoder or ffmpeg.
I prefer ffmpeg via the Terminal. ffmpeg does not handle metadata (locations, captions etc) correctly so you must babysit it with exiftool. There are two options for that. I prefer the 1st where ffmpeg does not even try to preserve metadata and exiftool then copies metadata from the originals and also sets the file dates. In the examples below input is .mov and output is .mp4 (for other suffixes you must modify the commands):
Convert .mov to H.265 .mp4:
ffmpeg -i input.mov -c:v libx265 -crf 28 -preset medium -timecode 00:00:00:00 -tag:v hvc1 -c:a copy output.mp4
Convert .mov to H.265 .mp4 in batch mode:
for i in *.mov; do ffmpeg -i "$i" -c:v libx265 -crf 28 -preset medium -timecode 00:00:00:00 -tag:v hvc1 -c:a copy "${i%.*}".mp4; done
Copy metadata from the originals:
exiftool -m -overwrite_original -ext mp4 -api QuickTimeUTC=1 -api LargeFileSupport=1 -tagsFromFile %-.0f.mov -All:All '-Track*Date<QuickTime:CreateDate' '-Media*Date<QuickTime:CreateDate' '-FileCreateDate<QuickTime:CreateDate' '-FileModifyDate<QuickTime:CreateDate' .
...
Convert .mov to H.265 .mp4 and copy metadata (which needs fixing):
ffmpeg -i input.mov -c:v libx265 -crf 28 -preset medium -timecode 00:00:00:00 -tag:v hvc1 -c:a copy -movflags use_metadata_tags -map_metadata 0 output.mp4
Convert .mov to H.265 .mp4 in batch mode (which needs fixing):
for i in *.mov; do ffmpeg -i "$i" -c:v libx265 -crf 28 -preset medium -timecode 00:00:00:00 -tag:v hvc1 -c:a copy -movflags use_metadata_tags -map_metadata 0 "${i%.*}".mp4; done
Fix metadata:
exiftool -m -overwrite_original -ext mp4 -api LargeFileSupport=1 -Keys:All= -tagsFromFile @ -Keys:All .
Those '-crf 28 -preset medium' are the defaults. If you want more compression, and faster encoding increase -crf (The range is exponential, so increasing the CRF value +6 results in roughly half the bitrate / file size. Sane range is 17–28. Consider 18 to be visually lossless.) or use fast (Other options are ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, placebo. Compared to medium, veryslow requires 280% of the original encoding time, with only minimal improvements over slower in terms of quality).