Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 28th October 2020, 20:53   #1  |  Link
DiablosDemon
Registered User
 
Join Date: Apr 2020
Posts: 11
best format for images in Avisynth+

Hello all. After many months of doing my research and figuring out Avisynth+ I have been getting very nice results. I've mostly been using the modified script by meloware. I'm starting with .dpx 10bit image files which I bring into Davinci Resolve 16 to do basic editing and cropping scene by scene. I have been exporting in .dpx and then converting to .png to use in Avisynth+. When the files are converted in XNconvert they are output at .png 8 bit which I'm not sure if that's really a good conversion or I'm losing quality. I would like to stay with image files and not video. Saying this I can export from Resolve in AVI, Cineon, DCP, DPX, EXR, IMF, Jpeg2000, MJ2, MP$, MXF OP-Atom, MFX OPIA, Quicktime, and Tiff. The only one I know of that Avisynth+ can import is Tiff. Is Tiff good or bad? If anyone can direct me to a better solution for quality I would appreciate it very much. I'm happy with the results I've achieved but would like to know if there's a better way. Thank you.
DiablosDemon is offline   Reply With Quote
Old 29th October 2020, 13:36   #2  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Metropolitan City of Milan, Italy
Posts: 1,846
Whenever we have to work and encode mezzanine files coming out from Resolve, we use DNxHR muxed in .mxf.
Although DNxHR is lossy, it's also 4:4:4 12bit with a very high bitrate, so it's probably gonna be fine for many scenarios / use case.
If you're so concerned about outputting something lossless, you can output an uncompressed 10bit planar .avi file (I think it supports v210).
As to the images, .tiff 16bit planar is fine and, as a matter of fact, it's also the codec we use before we encode in JPEG2000 whenever we have to make a DCP (Motion JPEG2000 12bit) that has to be sent to the cinema, so no problem.
FranceBB is offline   Reply With Quote
Old 29th October 2020, 16:16   #3  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,771
Quote:
Originally Posted by DiablosDemon View Post
I have been exporting in .dpx and then converting to .png to use in Avisynth+. When the files are converted in XNconvert they are output at .png 8 bit which I'm not sure if that's really a good conversion or I'm losing quality. I would like to stay with image files and not video.
Yes there is quality loss going from 10bit dpx to 8bit png

One issue with >8 bitdepth image sequences - such as 16bit TIFF or PNG - is avisynth does not currently have a good way to import them. ImageSource is currently 8bit only.

You can load individual high bit depth files with ffms2, but a sequence import requires a slow ffms2 workaround, and there is clutter - an index file is produced per image . The scriptclip workaround is not necessarily frame accurate with seeks either; so temporal filtering could be an issue
https://forum.doom9.org/showthread.php?p=1677861

I would use vapoursynth if dealing with high bitdepth image sequences. It's imagemagick plugin supports high bit depth sequence imports and 32bit float import as well (e.g. EXR) . If you can do your additional processing in vapoursynth, I would just stay there. But if you need avisynth, another workaround would be to import the image sequence using vpy script, and Vapoursource VSImport into the avisynth script. This also adds additional overhead, and not all pixel formats are supported by the avs VSImport plugin - but YUV444P16 and YUV444PS are supported, so it can be a lossless transform from RGB30 or RGB48

Otherwise use a video format. DNxHR and Cineform are good options
poisondeathray is offline   Reply With Quote
Old 29th October 2020, 17:39   #4  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 241
Quote:
Originally Posted by poisondeathray View Post
One issue with >8 bitdepth image sequences - such as 16bit TIFF or PNG - is avisynth does not currently have a good way to import them. ImageSource is currently 8bit only.
ImageSource supports Y16, RGB48 and RGB64 (avs+) with use_DevIL=true. ( http://avisynth.nl/index.php/ImageSo...nd_ImageSource )
StvG is offline   Reply With Quote
Old 29th October 2020, 17:41   #5  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,771
Quote:
Originally Posted by StvG View Post
ImageSource supports Y16, RGB48 and RGB64 (avs+) with use_DevIL=true. ( http://avisynth.nl/index.php/ImageSo...nd_ImageSource )
Nice . DevIL is good
poisondeathray is offline   Reply With Quote
Old 30th October 2020, 00:28   #6  |  Link
DiablosDemon
Registered User
 
Join Date: Apr 2020
Posts: 11
Thank you. I haven't used Vaporsynth but can try. I am using imagesource in the Avisynth+ script. Most of what you have told me is over my head but I will research it all and see what I can manage. I'm not a code writer so most of my attempts have been scripts from other people which I have successfully made work with as few modifications as possible. It has worked and amazingly well. It will take me decades to learn what most of you know (if I have that long). Thanks again.
DiablosDemon is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:29.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.