I don't usually have reference video layers in my TVPaint projects, but on a recent project I needed to import pre-existing video layers (.mp4 files) into my TVPaint project.
To avoid the file size growing too large I unchecked the box "Pre-Load". This loads the .mp4 file very quickly, but then the playback takes a long time to render before it will play
and working within the interface becomes extremely slow and laggy. It's really to the point where it's not possible to work on the project with the referenced video file layers. I have to PreLoad the video files , which makes my .tvpp file size larger and it takes longer to import the .mp4 files initially. Exporting the project with the referenced .mp4 files also takes much longer than usual.
Maybe this is a known issue which I have avoided previously because I don't usually have video layers in my TVPaint file , but I wonder if there is some setting I can adjust or is there a specific codec that will work better in TVPaint ? (the .mp4 files I am using were exported from Adobe Premiere. The info says "AVC Coding, 1920 × 1080, Millions , AAC Stereo (L R), 32.000 kHz" Total data size of the .mp4 files is 40 MB.)
Video layers (no pre-load) causing lag
- D.T. Nethery
- Posts: 4225
- Joined: 27 Sep 2006, 19:19
Video layers (no pre-load) causing lag
Animator, TVPaint Beta-Tester, Animation Educator and Consultant.
MacOS 12.7.1 Monterey , Mac Mini (2018) , 3.2 GHz 6-Core Intel Core i7,
16 GB RAM , TVPaint PRO 11.7.1 - 64bit , Wacom Cintiq 21UX 2nd Gen.
,Wacom Intuos Pro 5 , Wacom driver version 6.3.39-1
Re: Video layers (no pre-load) causing lag
Hello David, is the .mp4 video reference something that you could send me via PM? This would help me conduct some tests
Probably a vampire
- D.T. Nethery
- Posts: 4225
- Joined: 27 Sep 2006, 19:19
Re: Video layers (no pre-load) causing lag
I'm sorry, I can not send the .mp4 videos in question. It's proprietary material that I am not able to share.
I notice the same thing happening today in an unrelated project: I'm trying to load a small .mov clip into TVPaint to add some annotations to it. The .mov file is only 6.4 MB (codec H.264), not a large file, but it takes 5 minutes to load into TVPaint with PreLoad box checked. It seems to me in the past that .mov and .mp4 files loaded in much more quickly (or am I not remembering it correctly ? As I mentioned before, I don't usually use video source files in TVPaint , so perhaps it has always been this slow (?) and I have simply blocked it out of my memory ...) Of course, I understand that a larger .mov or .mp4 file (20 MB, 40 MB, 60 MB , etc.) will necessarily load more slowly because it is more data , but I don't understand why a 6.4 MB .mov file loads so slowly.
One thing I should mention about this 6.4 MB .mov file is that it is 60 fps, so it is a lot of frames (2511 frames). But they are highly compressed , because the overall data size of the .mov file is only 6.4 MB. That does not seem like much data to load .
Animator, TVPaint Beta-Tester, Animation Educator and Consultant.
MacOS 12.7.1 Monterey , Mac Mini (2018) , 3.2 GHz 6-Core Intel Core i7,
16 GB RAM , TVPaint PRO 11.7.1 - 64bit , Wacom Cintiq 21UX 2nd Gen.
,Wacom Intuos Pro 5 , Wacom driver version 6.3.39-1
Re: Video layers (no pre-load) causing lag
From my experience, AVC (and by extension, HEVC) are slow to load. This is because TVPaint has to rebuild all the instances, from a video that contains mainly partial frames. The size isn't a good criteria : a video can be highly compressed and have a small size, but the load will be longer because the compression used more partial frames.D.T. Nethery wrote: ↑08 Apr 2022, 15:20I'm sorry, I can not send the .mp4 videos in question. It's proprietary material that I am not able to share.
I notice the same thing happening today in an unrelated project: I'm trying to load a small .mov clip into TVPaint to add some annotations to it. The .mov file is only 6.4 MB (codec H.264), not a large file, but it takes 5 minutes to load into TVPaint with PreLoad box checked. It seems to me in the past that .mov and .mp4 files loaded in much more quickly (or am I not remembering it correctly ? As I mentioned before, I don't usually use video source files in TVPaint , so perhaps it has always been this slow (?) and I have simply blocked it out of my memory ...) Of course, I understand that a larger .mov or .mp4 file (20 MB, 40 MB, 60 MB , etc.) will necessarily load more slowly because it is more data , but I don't understand why a 6.4 MB .mov file loads so slowly.
One thing I should mention about this 6.4 MB .mov file is that it is 60 fps, so it is a lot of frames (2511 frames). But they are highly compressed , because the overall data size of the .mov file is only 6.4 MB. That does not seem like much data to load .
If you want to speed up the work in TVPaint, you need more integral frames. So you need to reduce the compression, or to tweak the compression settings to increase the frequency of I-frames.
Note : I just figured out that I-frame stands for Integral Frame, and P-frame for partial frame
https://www.videoproc.com/resource/h264-codec.htm
Re: Video layers (no pre-load) causing lag
Note : I'm not sure how TVPaint would work with a video that wasn't preloaded.
My guess it that either it rebuilds all the instances starting from the beginning of the video, or it rebuilds all the instances starting from the nearest I-frame up to the current instance to be displayed. I'll check that on monday.
My guess it that either it rebuilds all the instances starting from the beginning of the video, or it rebuilds all the instances starting from the nearest I-frame up to the current instance to be displayed. I'll check that on monday.
- D.T. Nethery
- Posts: 4225
- Joined: 27 Sep 2006, 19:19
Re: Video layers (no pre-load) causing lag
Thank you ! This is very helpful to know.
I will definitely mention to my collaborators that they should not encode with AVC or HEVC.
Ok, this is also good to know. I guess I was thinking if the overall data size of the .mov file was a relatively "small" file (like 6.4 MB) that it should load faster , but I probably don't understand enough about how compression works. I appreciate you mentioning that.
Thanks for the link . I will read that .Xavier wrote: ↑08 Apr 2022, 20:56 If you want to speed up the work in TVPaint, you need more integral frames. So you need to reduce the compression, or to tweak the compression settings to increase the frequency of I-frames.
Note : I just figured out that I-frame stands for Integral Frame, and P-frame for partial frame
https://www.videoproc.com/resource/h264-codec.htm
Animator, TVPaint Beta-Tester, Animation Educator and Consultant.
MacOS 12.7.1 Monterey , Mac Mini (2018) , 3.2 GHz 6-Core Intel Core i7,
16 GB RAM , TVPaint PRO 11.7.1 - 64bit , Wacom Cintiq 21UX 2nd Gen.
,Wacom Intuos Pro 5 , Wacom driver version 6.3.39-1