PhotoStation-Upload-Lr-Plugin icon indicating copy to clipboard operation
PhotoStation-Upload-Lr-Plugin copied to clipboard

Synology Photos supports videos in .mov and h265 - no conversion necessary

Open stepman0 opened this issue 5 months ago • 1 comments

I just figured out that Synology Photos supports both .MOV (with H265 from iPhone) and .mp4 with h265 codec. So the conversion on upload is not necessary anymore.

Having a look into the code, it seems that either this code in PSUploadTask.lua should be adopted (starting in line 252):

	-- replace original video if:
	--		- srcVideo is to be rotated (meta or hard)
	-- 		- srcVideo is mp4, but not h264 (PS would try to open, but does only support h264)
	--		- srcVideo is mp4, but has no audio stream (PS would ignore it)
	--		- exportParams.orgVideoForceConv was set
	if tonumber(vinfo.rotation) > 0
	or tonumber(vinfo.mrotation) > 0
	or (converter.videoIsNativePSFormat(vidExtOrg) and vinfo.vformat ~= 'h264')
	or vinfo.aFormat == nil
	or orgVideoForceConv then
		videoSettings.replaceOrgVideo = true
		videoSettings.Orig_Filename = videoSettings.Replace_Filename
	else
		videoSettings.replaceOrgVideo = false
		videoSettings.Orig_Filename = videoPath
	end

If backward compatiblity is wanted, either an additional option for orgVideoForceConv (the dropdown configuration box) saying no conversion or an explicit version check is possible (But I have no details on which version supports what ;-))

For the first way, I can try to create a pull request - but what is your favorite?

stepman0 avatar Sep 05 '24 19:09 stepman0