Dupped() - yet another frame duplication function

This forum is for questions and discussion of all the aspects of handling and cleaning up your footage with Avisynth.
Locked
User avatar
BasharOfTheAges
Just zis guy, you know?
Joined: Tue Sep 14, 2004 11:32 pm
Status: Breathing
Location: Merrimack, NH
Org Profile

Post by BasharOfTheAges » Sat Feb 09, 2008 2:18 pm

No, my script is a simple as your example one. Just a straight encoding of an already filtered DVD rip with the MT support thrown in at the beginning. Perhaps there's a conflict with it. It starts up fast enough, but after 20 min or so the ETA just keeps going up. I'm @ 50% CPU load and a climbing ETA that has surpassed 9 hours for 96min of video.

Get some sleep though - it isn't important to test right now.
Anime Boston Fan Creations Coordinator (2019-2023)
Anime Boston Fan Creations Staff (2016-2018)
Another Anime Convention AMV Contest Coordinator 2008-2016
| | |

User avatar
Corran
Joined: Mon Oct 14, 2002 7:40 pm
Contact:
Org Profile

Post by Corran » Sat Feb 09, 2008 2:25 pm

The 32bit 1.3.14 Version (or at least I thought... I downloaded and installed the latest version on the site but as can be seen in the below image it says 1.3.12. Perhaps the version number wasn't updated when he posted the newer version?)

I'm sure you already thought to do this... but doublecheck to make sure the box 'null frames' is selected on the compression settings.

Image
BasharOfTheAges wrote:Get some sleep though - it isn't important to test right now.
Definately will. =_=

: )

User avatar
Corran
Joined: Mon Oct 14, 2002 7:40 pm
Contact:
Org Profile

Post by Corran » Sun Feb 10, 2008 12:47 am

Zarxrax wrote:Hmmm, I did some tests, and your filter appears to be working, but it appears that lagarith's null frame option is not working for me. Corran, what version of lagarith have you tested with?
I guess I really was using the version of lagarith that came with the amvapp beta3. I tried uninstalling both the AMVapp lossless codec package and 1.3.14 and then tried reinstalling the newest version. Now when I open encoded files, vdub complains that a decompressor for the lags fourcc cannot be found and lagarith does not show up as a compression option. I tried the installation via command line suggestions in the readme as well as using the 64 bit version of the codec but nothing worked...

Well, actually the 64bit version does work, but it means that I must run vdub64 instead of the 32bit version and that avisynth can't use the codec either. : / I guess I'll be sticking with the version included in the AMVapp since I can't even use avisynth scripts in vdub64.

User avatar
Corran
Joined: Mon Oct 14, 2002 7:40 pm
Contact:
Org Profile

Post by Corran » Sun Feb 10, 2008 1:31 am

BasharOfTheAges wrote:No, my script is a simple as your example one. Just a straight encoding of an already filtered DVD rip with the MT support thrown in at the beginning. Perhaps there's a conflict with it. It starts up fast enough, but after 20 min or so the ETA just keeps going up. I'm @ 50% CPU load and a climbing ETA that has surpassed 9 hours for 96min of video.
I think that is it. I just ran it with SetMTmode(2) and experienced the same problem. Eventually the frame rendering rate dropped to zero due to a thread deadlock.

This also wouldn't make since to use now that I read how the that line works. It enables temporal multithreading. It essentially requests and processes the frames out of order. The function I have created requires that the frames be accessed sequentially. This explains why you see the newFrame error also.

If you want to use multithreading you will need to use it on a per-filter basis like this:

Code: Select all

AVISource("Videofile.avi")
MT("ttempsmooth()",4)
fft3dgpu()
dupped()

User avatar
BasharOfTheAges
Just zis guy, you know?
Joined: Tue Sep 14, 2004 11:32 pm
Status: Breathing
Location: Merrimack, NH
Org Profile

Post by BasharOfTheAges » Sun Feb 10, 2008 2:14 am

Taking the time to actually think of that - it makes perfect sense. I am an idiot. :lol:
Anime Boston Fan Creations Coordinator (2019-2023)
Anime Boston Fan Creations Staff (2016-2018)
Another Anime Convention AMV Contest Coordinator 2008-2016
| | |

User avatar
Corran
Joined: Mon Oct 14, 2002 7:40 pm
Contact:
Org Profile

Post by Corran » Sun Feb 10, 2008 2:57 am

Zarxrax wrote:Hmmm, I did some tests, and your filter appears to be working, but it appears that lagarith's null frame option is not working for me. Corran, what version of lagarith have you tested with?
Alan, I just thought of something else. After I reinstalled Lagarith I noticed that the null frames option was still checked. I then tried compressing and noticed that null frames wasn't working. I canceled the encode, opened up the lagarith properties and disabled null frames and hit ok. I then opened up the dialog again and renabled it.

After I did this I tried compressing again with fast recompress and null frames appeared to be working. It seems as though the configuration dialog wasn't actually in sync with the current lagarith settings.

User avatar
Corran
Joined: Mon Oct 14, 2002 7:40 pm
Contact:
Org Profile

Post by Corran » Sun Feb 10, 2008 4:57 am

I just added some more conditional statements to prevent some of the video processing that isn't needed except in certain situations. I also replaced redundant calculations with variables. This should increase the speed of the function when processing scenes with regular motion.

When testing for slow motion, the two previous frames were being compared instead of the last and next. I changed it so last and next are compared...

I also added a new parameter and renamed two others. Threshold is now simply Thresh. Debug is now Stats. Panthresh is new. It is used in calculating the dynamic threshold of low motion scenes. The first two YMinMax values shown in the stats are averaged and then multiplied by panthresh. If the third YMinMax is equal to or greater than this calculation then the current frame is considered a new frame. The dynamic threshold is now displayed in the stats to the right of YMinMax(last,next).

Unless there is a bug this is the last update I plan to make. I'm doubting the usefulness of this function for the purpose of editing amvs. Long fades on a still frame can't be detected it seems and too many amvs use these typically to close a video. Most videos seem to have enough action or fading that duplicate frames are minimal to begin with. I also redid my lagarith tests. I don't know how I originally created a 21GB file...(maybe because ot the black borders I had the first time?) This time around it was only 10.9. 10.9->6.55 is still significant I suppose but I'm not sure how many people actually edited losslessly with avis instead of using scripts.

User avatar
Zarxrax
Joined: Sun Apr 01, 2001 6:37 pm
Contact:
Org Profile

Post by Zarxrax » Sat Feb 16, 2008 3:37 pm

I finally got lagarith working with this. Seemed to work quite well at the default settings, whereas dup would screw up the pans.

I'm personally wary of using anything that has the potential to screw up my video, so I doubt I'll use this for anything. It seems that it might be quite useful for reducing the size of lossless source footage, however, I would have concerns about the editing software being able to handle the null frames correctly.

User avatar
Corran
Joined: Mon Oct 14, 2002 7:40 pm
Contact:
Org Profile

Post by Corran » Sat Feb 16, 2008 10:03 pm

If there was a problem with null frames, wouldn't it be caused by the lagarith decoder rather than the editing program itself?

User avatar
Zarxrax
Joined: Sun Apr 01, 2001 6:37 pm
Contact:
Org Profile

Post by Zarxrax » Sun Feb 17, 2008 10:51 am

Corran wrote:If there was a problem with null frames, wouldn't it be caused by the lagarith decoder rather than the editing program itself?
No, as editing programs often only work properly when a video contains all keyframes.

Locked

Return to “AviSynth Help”