-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global: extract thumbnail with new settings #5944
Global: extract thumbnail with new settings #5944
Conversation
Task linked: OP-6659 Maya: thumbnail color space |
Wouldn't it also be possible to test with a sequence of 10x10. The way the labels are written looks to me as "Always resize to that resolution no matter what." - disregarding whether it's bigger, smaller and/or matches the aspect ratio. Also, what is the intended behavior for this for input sequences that do not have a square pixel aspect ratio? Is the intended result that the 1920x1080 output always has square pixel data or not? :) |
It is not very usual situation but I get your point. Yes we are upscaling or downscaling and what ever resolution and aspect ration gets in the target scale rescales into squere pixel.
Good point. At the moment the intention is to create [width]x[height]x1 only. |
Well the intentions were different, but I have to confirm that this PR would not be complete without it. Also, our client was mentioning it in feedback so the rescaling is part of this PR @BigRoy.
|
- removing it from wrong ffmpeg process
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hit the following error in extract_thumbnail.py
when I tested with substance painter.
DEBUG: Processing instance with subset name textureMain.2D_View
DEBUG: repre {'name': 'png', 'ext': 'png', 'files': ['aiStandardSurface1_2D_View_1001_ACES - ACEScg.png', 'aiStandardSurface1_2D_View_1011_ACES - ACEScg.png'], 'udim': ['1001', '1011'], 'tags': ['review'], 'stagingDir': 'C:/Users/Kayla/AppData/Local/Temp/pyblish_tmp_b_qgv0hp'}
DEBUG: {'name': 'png', 'ext': 'png', 'files': ['aiStandardSurface1_2D_View_1001_ACES - ACEScg.png', 'aiStandardSurface1_2D_View_1011_ACES - ACEScg.png'], 'udim': ['1001', '1011'], 'tags': ['review'], 'stagingDir': 'C:/Users/Kayla/AppData/Local/Temp/pyblish_tmp_b_qgv0hp'}
DEBUG: Create temp directory C:\Users\Kayla\AppData\Local\Temp\pyblish_tmp_bjrryp82 for thumbnail
DEBUG: input C:\Users\Kayla\AppData\Local\Temp\pyblish_tmp_b_qgv0hp\aiStandardSurface1_2D_View_1011_ACES - ACEScg.png
DEBUG: Trying to convert with OIIO
DEBUG: Extracting thumbnail with OIIO: C:\Users\Kayla\AppData\Local\Temp\pyblish_tmp_bjrryp82\aiStandardSurface1_2D_View_1011_ACES - ACEScg_thumb.jpg
DEBUG: Getting information about input "C:\Users\Kayla\AppData\Local\Temp\pyblish_tmp_b_qgv0hp\aiStandardSurface1_2D_View_1011_ACES - ACEScg.png".
DEBUG: FFprobe command: D:\ayon_desktop\OpenPype\vendor\bin\ffmpeg\windows\bin\ffprobe.exe -hide_banner -loglevel fatal -show_error -show_format -show_streams -show_programs -show_chapters -show_private_data -print_format json "C:\Users\Kayla\AppData\Local\Temp\pyblish_tmp_b_qgv0hp\aiStandardSurface1_2D_View_1011_ACES - ACEScg.png"
DEBUG: FFprobe stdout:
{
"programs": [
],
"streams": [
{
"index": 0,
"codec_name": "png",
"codec_long_name": "PNG (Portable Network Graphics) image",
"codec_type": "video",
"codec_tag_string": "[0][0][0][0]",
"codec_tag": "0x0000",
"width": 1024,
"height": 1024,
"coded_width": 1024,
"coded_height": 1024,
"closed_captions": 0,
"has_b_frames": 0,
"sample_aspect_ratio": "1:1",
"display_aspect_ratio": "1:1",
"pix_fmt": "rgb24",
"level": -99,
"color_range": "pc",
"refs": 1,
"r_frame_rate": "25/1",
"avg_frame_rate": "25/1",
"time_base": "1/25",
"disposition": {
"default": 0,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
}
}
],
"chapters": [
],
"format": {
"filename": "C:\\Users\\Kayla\\AppData\\Local\\Temp\\pyblish_tmp_b_qgv0hp\\aiStandardSurface1_2D_View_1011_ACES - ACEScg.png",
"nb_streams": 1,
"nb_programs": 0,
"format_name": "png_pipe",
"format_long_name": "piped png sequence",
"size": "216297",
"probe_score": 99
}
}
Traceback (most recent call last):
File "D:\ayon_desktop\OpenPype\.venv\lib\site-packages\pyblish\plugin.py", line 527, in __explicit_process
runner(*args)
File "D:\ayon_desktop\OpenPype\openpype\plugins\publish\extract_thumbnail.py", line 137, in process
thumbnail_created = self._create_thumbnail_oiio(
File "D:\ayon_desktop\OpenPype\openpype\plugins\publish\extract_thumbnail.py", line 219, in _create_thumbnail_oiio
resolution_arg = self._get_resolution_arg("oiiotool", src_path)
File "D:\ayon_desktop\OpenPype\openpype\plugins\publish\extract_thumbnail.py", line 339, in _get_resolution_arg
return get_rescaled_command_arguments(
File "D:\ayon_desktop\OpenPype\openpype\lib\transcoding.py", line 1265, in get_rescaled_command_arguments
stream_input_par = stream[0].get("sample_aspect_ratio")
KeyError: 0
The code change fixes an issue in the transcoding.py file where the sample aspect ratio was not being parsed correctly. The fix involves modifying the way the sample aspect ratio is accessed from the stream object.
fixed in 54205db |
- Updated Ayon settings to fix issues with the ExtractThumbnail plugin. - Fixed display and view at oiio defaults in the ExtractThumbnail plugin. - Fixed target size in the ExtractThumbnail plugin. - Fixed background color in the ExtractThumbnail plugin. Also, updated server version to 0.1.4.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just encountered a bug when running latest OP version for a farm publish. Shouldn't we skip the local extract thumbnail if target is set to farm? Either that or then we need to do some changes on the integrate so it integrates the local extracted one? |
Changelog Description
Settings are now configurable for the following:
Additional info
Testing notes OpenPype:
Render
family.project_settings/global/publish/ExtractThumbnail/integrate_thumbnail
so the thumbnail is integrated and then check it in file browser under the published version representations.project_settings/global/publish/ExtractThumbnail/target_size/type
tosource
and check the size of published thubmail that is the same as the source resolution.Testing notes AYON:
Explicit Thumbnai workflow > development stages
original PR
This PR is just a placeholder and will be broken into smaller chunks:
need-thumbnail
tag and cross plugin flowpublish_on_farm
tags