OpenPype icon indicating copy to clipboard operation
OpenPype copied to clipboard

Photoshop: resize saved images in ExtractReview for ffmpeg

Open kalisp opened this issue 3 years ago • 1 comments

Brief description

Ffmpeg cannot handle pictures higher than 16384x16384.

Description

Used PIL to resize to max size(with aspect ratio).

Additional info

Implemented as a 'hotfix' to unblock customers production. In the future this plugin should be refactored (to use general ExtractThumbnail and ExtractReview). That is currently blocked by not having oiio on all platforms.

Testing notes:

  1. publish workfile with larger resolution than 16384x16384 in PS

kalisp avatar Aug 16 '22 10:08 kalisp

it is weird anyway

x264 [error]: malloc of size 440626798 failed

what is the problem with 440MB?

m-u-r-p-h-y avatar Aug 18 '22 08:08 m-u-r-p-h-y

That happens when you run out of RAM.

iLLiCiTiT avatar Aug 18 '22 08:08 iLLiCiTiT

I still have over 14GB ram available (out of 32)

screengrabbed just after the failure image

m-u-r-p-h-y avatar Aug 18 '22 11:08 m-u-r-p-h-y

That happens when you run out of RAM.

Technically, that would happen when the application is unable to allocate that RAM. You might have free ram whilst the application cannot acquire it. (I have limited knowledge on this topic, but I believe this is the case).

Anyway, the issue you're facing sounds like this one on StackOverflow. Or it could be a 32 bit version of ffmpeg? :D

BigRoy avatar Aug 19 '22 11:08 BigRoy

Hmm it would mean x264 codec will have troubles even with 4k

Interestingly Peter @kalisp was able to use 16k. How come?

m-u-r-p-h-y avatar Aug 19 '22 12:08 m-u-r-p-h-y

Interestingly Peter @kalisp was able to use 16k. How come?

The issue might have been solely with x264 codec in older FFMPEG versions of course - the encoder could've been updated in the meantime. The error message felt suspiciously close to what was reported there however.

BigRoy avatar Aug 19 '22 12:08 BigRoy

Shouldn't we update our vendorized ffmpeg binary in OP? Our version is 4.4 compared to latest 5.1

m-u-r-p-h-y avatar Aug 19 '22 13:08 m-u-r-p-h-y

and also if the max resolution of review is behaving so unpredictable, we may want to put this into settings so there is an easy way of changing it, depending on the hw and sw limitations on the client side. (plus different OS influence) Instead of having it hardcoded . . .

m-u-r-p-h-y avatar Aug 19 '22 13:08 m-u-r-p-h-y

Added to Settings: Screenshot 2022-08-22 111439

kalisp avatar Aug 22 '22 09:08 kalisp