I've seen a few questions about encoding h.265 with ffmpeg or with pcm audio. Here are directions posted by a colleague for generating a seamless 60fps file. I've also included some other ffmpeg output strings we've sent customers for generating h.265 files.
This is a seamlessly looping h.265 file with pcm audio.
FFMPEG
F:\vboxshared\Zeranoe\ffmpeg -probesize 500M -analyzeduration 500M -loglevel verbose -i F:\EncodeSource\50194\CLIP_TT.mov -pix_fmt yuv420p -s:v:0 1920x1080 -preset:v medium -c:v libx265 -x265-params vbv-bufsize=10000:vbv-maxrate=40000:crf=16:bframes=2 -c:a pcm_s16le -ar 48000 F:\EncodeSource\50194\CLIP_TT_H265_Seamless_Loop.mov
FFMPEG Other:
ffmpeg -i inputfile.mov -c:v libx265 -preset:v ultrafast -x265-params crf=20 -pix_fmt yuv420p outfile.ts
ffmpeg -i inputfile.mov -c:v libx265 -x265-params bitrate=15000:vbv-bufsize=8000:vbv-maxrate=15000 -pix_fmt yuv420p outfile.ts
ffmpeg -i %INPUTFILE% -c:v libx265 -x265-params bitrate=27000:vbv-bufsize=8000:vbv-maxrate=40000 -pix_fmt yuv420p -movflags +faststart -f mp4 %OUTPUTFILE%