Page 1 of 1

Importing .mov or .mp4 file with identical images

Posted: 16 Mar 2023, 16:58
by D.T. Nethery
Refer to this: viewtopic.php?style=19&p=128578#p128578

When importing an image sequence where there are duplicate images -- for example, Image_0003 is repeated on Image_0004 , Image_0005 , Image_0006 -- then instead of creating identical duplicate instances on the timeline , TVPaint will import the first occurrence of that image (Image_0003) and expose it for a total of 4 frames on the timeline. This is very handy .

However, I notice that when importing .mov or.mp4 files with similarly repeated images , the results are inconsistent. Some video files behave the same as the image sequence import , where identical frames are not repeated on the timeline , so that only the first occurrence of the image is imported and then it is held for however many frames until the next image occurs. But with other video files TVPaint imports every frame as an image on the timeline. Is there a specific codec or other compression settings to use to make sure that a video file will import without duplicate images being repeated ?

-----

UPDATE (for anyone looking at this topic in the future) -


If the .mov export codec used is Lossless then the .mov file will import into TVPaint with the correct exposures, no duplicate frames. Mov files exported with ProRes 4444 and ProRes 422 also work , although ProRes 4444 and ProRes 422 are technically considered "lossy", not lossless.

So a mov file with Lossless codec or almost lossless (ProRes 422/ProRes 4444) codec will behave the same as a PNG image sequence and will not show duplicate images on the Timeline when imported into TVPaint. I think that solves my original question.

Re: Importing .mov or .mp4 file with identical images

Posted: 17 Mar 2023, 08:10
by slowtiger
Any lossy codec will result in frames which may look identical but aren't. You can use TVP's function of recalculating frames with a threshold, instead of the fixed one.

Re: Importing .mov or .mp4 file with identical images

Posted: 20 Mar 2023, 17:43
by D.T. Nethery
slowtiger wrote: 17 Mar 2023, 08:10 Any lossy codec will result in frames which may look identical but aren't.

You can use TVP's function of recalculating frames with a threshold, instead of the fixed one.
I'm never quite sure what the values represent in the Recalculate Exposures With Threshold. The default seems to be set to 3.00 ... if I set it to 1.00 or 2.00 or 4.00 , 5.00 it gives different results. Whatever number I set it for between 1.00 - 5.00 (over 5.00 seems useless, because it removes almost all the exposures) none of the results precisely recalculate the exposures to what they were in the original animation. It removes some duplicate exposures , but it also removes some unique exposures that should have been retained.

I wish there were some definition in the User Manual of precisely what the values represent when recalculating the exposure threshold. (it raises the question: threshold of what? what's the starting point that defines the threshold we're working within ?) Seems like it's just trial and error to find the best result.
TVPaint recalculate exposure with threshold .png

Re: Importing .mov or .mp4 file with identical images

Posted: 20 Mar 2023, 18:22
by Cardin
I was wondering the same thing. Found the following thread from 2013 that may answer the question...
Eric Scholl wrote: 23 Sep 2013, 07:47
Peter Wassink wrote:what is the Threshold value (0-100) ?
It's a percentage representing the threshold between 2 images.

Example: I set the Threshold value to 2
If Image2 is less different from Image 1 than 2 percent, then it considers Image1 and Image2 are the same images.
Peter Wassink wrote:what is precision (1 - 10000) ?
The precision in this script is a way to control how it will differentiate the 2 images.
If you set 10000 it will check every pixels of the 2 images ( as it is a George script, this kind of work is slow ).
If you set 1 it will check 1 pixel for every 10000 pixels.

As Fabrice said before, please use the "Images > Exposure > Recompute with threshold" because this one does the same things, but it's not a George script so it will be really faster and more precise.
SOURCE: https://forum.tvpaint.com/viewtopic.php?t=7247

I'm not sure if it's more deeply explained in the user manual, I'm currently having difficulty accessing it due to server/connections issues.

Re: Importing .mov or .mp4 file with identical images

Posted: 20 Mar 2023, 22:22
by D.T. Nethery
Thanks for providing the link to that previous discussion regarding the threshold values.
Cardin wrote: 20 Mar 2023, 18:22 I'm not sure if it's more deeply explained in the user manual, I'm currently having difficulty accessing it due to server/connections issues.
I couldn't find anything explaining the Recompute with Threshold values in the User Manuel.

Re: Importing .mov or .mp4 file with identical images

Posted: 20 Mar 2023, 22:47
by D.T. Nethery
slowtiger wrote: 17 Mar 2023, 08:10 Any lossy codec will result in frames which may look identical but aren't.
This helped me understand how the codec makes a difference. If the .mov export codec used is Lossless then the .mov file imports into TVPaint with the correct exposures, no duplicate frames. Mov files exported with ProRes 4444 and ProRes 422 also work , although ProRes 4444 and ProRes 422 are technically considered "lossy", not lossless.

So a mov file with Lossless codec or almost lossless (ProRes 422/ProRes 4444) codec will behave the same as a PNG image sequence and will not show duplicate images on the Timeline when imported into TVPaint. I think that solves my original question.


However, it would still be useful if the User Manual would include a clear explanation of what the values represent when recomputing the exposure threshold ; when should we use a value of 1.00 , 2.00 , 3.00, 4.00 , 5.00 and what's the difference between those values? Also, why does any value above 5.00 seem to result in recomputing the whole layer to a single image ? (if there is no difference in results using any value between 6.00 - 100.00 , then why are those values there ?) As far as I can tell there is nothing in the User Manual explaining what the values in 'Recompute Exposure With Threshold' represent. The only explanation I've seen is here: https://forum.tvpaint.com/viewtopic.php?p=65756#p65756 , but that's too hidden. Most people will never find it. It should be covered in the User Manual and even better with a video demonstrating the results when the different values in 'Recompute Exposure With Threshold' are applied.