Video conversion issues

I am seeing certain videos are severely degraded when watching through PS vs watching the original on google photos or on Windows.

Steps to Reproduce

It seems to be older videos, but I see it with MP4 and AVI videos. Hard to tell you exactly how to reproduce.

Environment

Running on Synology v7 using Docker version 1.1.

Thanks fort reporting this!

Can you email an original example video to support@photostructure.com so I can see what’s going on?

Cheers

I have seen this same behavior specifically with iPhone 4k Dalby Vision video. Interestingly i have seen the same behavior playing back the same videos with Plex.

@james872 please send any original videos (or images!) that render incorrectly to support@photostructure.com and I can see what’s going on.

Thanks!

Anyone else seeing this:

  1. Please check that you’re running a recent version of Chrome: they fixed colorspace rendering errors ~18 months ago.

  2. Not the issue? Please send in an original video to support@photostructure.com so we can get this sorted for you.

I noticed this issue with videos saturation in Brave and Safari on MacOS, but looks fine in FireFox. Sending link to one of videos to support@photostructure.com.

I have re checked and the assets which were rendering incorrectly are now correct. it must have been a chrome Issue.

I’m running on a chromebook and that’s pretty much all I used these days other than a little Linux. Firefox is unusable in this environment, but I’ll fire up the Windows laptop to check this. My OS and Chrome browser are all current.

Ok, I just tested some of these videos on my phone and the color quality is correct. I tried chrome and firefox. Both look fine on the phone. I also checked using Firefox on Windows. It definitely seems like a Chrome issue.

Thanks for that additional information.

Consistent colorspace rendering on all browsers turns out to be surprisingly tricky: See

PhotoStructure has a (couple!) settings to control ffmpeg transcoding. If you’re using docker, set this ENV:

PS_FFMPEG_TRANSCODE_ARGS='["-c:a","aac","-c:v","libx264","-pix_fmt","yuv420p","-vf","colorspace=all=bt709:iall=bt601-6-625:fast=1","-colorspace","1","-color_primaries","1","-color_trc","1","-movflags","faststart","-profile:v","high"]'

or if it’s easier, change the system settings.toml:

ffmpegTranscodeArgs = [
  "-c:a",
  "aac",
  "-c:v",
  "libx264",
  "-pix_fmt",
  "yuv420p",
  "-vf",
  "colorspace=all=bt709:iall=bt601-6-625:fast=1",
  "-colorspace",
  "1",
  "-color_primaries",
  "1",
  "-color_trc",
  "1",
  "-movflags",
  "faststart",
  "-profile:v",
  "high"
]

Then restart PhotoStructure, visit a problematic video, and then click “Re-sync this asset” to tell PhotoStructure to re-transcode that video with the new settings.

I’ve made this the new default value for v2.1: I’ll try it out on the example videos and see how that goes.

I’m not a Linux or docker expert (running on synology), so I added the environment var but it separated the var from the contents. On the contents to the right of the equal sign, I removed the single quote and bracket from either end of the string. Is this correct?

If my setup for the environment var is correct, it made no change. Chrome browser has color issues, Firefox doesn’t.

1 Like

PhotoStructure won’t be able to parse that: it either needs to be

  1. a valid JSON array, like
["first","second"]
  1. or a string separated by a “magic” character: either the broken pipe, ¦, or the OS-specific path delimiter (: on macOS and linux, and ; on Windows). In this case, some values include a colon, so we have to use the broken pipe:
PS_FFMPEG_TRANSCODE_ARGS="-c:a¦aac¦-c:v¦libx264¦-pix_fmt¦yuv420p¦-vf¦colorspace=all=bt709:iall=bt601-6-625:fast=1¦-colorspace¦1¦-color_primaries¦1¦-color_trc¦1¦-movflags¦faststart¦-profile:v¦high"

That said, I haven’t verified that current Chrome doesn’t mis-render the colorspace with these settings, so this may be an exercise in frustration.