Log in

View Full Version : Enchancement requests...


apfraats
10th October 2005, 00:21
I have two enchancement request, don't know how much effort they take...

1) Having an option to have the AVISYNTH files saved as temprorary files, so the filter is only applied once, the temporary files are used futhermore. This would greatly save time when using filter(s) and doing multipass VBR encoding with for example CCE.

2) Having DVD-RB-PRO the option of setting it's proces priority to as low as possible but above iddle so you can use youre computer as normal, while unused CPU power is left to DVD-RB AND IT'S ENCODERS. So the encoders must be run in low-priotrity too (and AVISYNTH with filters). I don't know if it's possible, for example with ECLCCE and CCE SP 2.67xxxx being used. Theoratically it should be possible.
This would greatly improve DVD-RB-PRO for me and others I think, cause you would be able to use a responsive computer under win-xp and be able to run long running DVD-RB-PRO jobs too.

DK
10th October 2005, 00:42
iirc cce starts with the same priority as does rebuilder

so set the priority for rebuilder and your done

apfraats
10th October 2005, 01:40
That's tested and true.....

But I still need a tool (now used WINTASKS) to set DVD-RB-PRO's own priority, or have I missed something here ????

It would be nice if you could set it in DVD-RB-PRO itself....

As it seems that it's inherited by DVD-RB-PRO this should be not difficult.

However the priority of AVISYNTH is not set, but I can't find it in the proces list and seems not so important...

jptheripper
10th October 2005, 02:11
could you explain what you mean by #1?

if you mean to only apply the filter to one pass, this is a avisynth/cce item, rebuilder has no way to have any contol over it

otherwse i have no idea what you mean

jdobbs
10th October 2005, 02:40
As I explained in the other thread on that subject, you can't do #1. If you do two passes, you have to do it on the same source material -- if you remove the filters it isn't the same source material.

DK
10th October 2005, 14:16
But I still need a tool (now used WINTASKS) to set DVD-RB-PRO's own priority, or have I missed something here ????

It would be nice if you could set it in DVD-RB-PRO itself....

for the time being you might want to create a batchfile with this content:

start /low Rebuilder.exe

apfraats
11th October 2005, 22:52
As I explained in the other thread on that subject, you can't do #1. If you do two passes, you have to do it on the same source material -- if you remove the filters it isn't the same source material.


I know that, but I suspect you can do following:

1) Use AVIOSYNTH to output with fitler(s) applied, BUT STORE THIS OUTPUT FOR FUTHER USE !

2) I suppose when you do 1 filterpass AND SAVE the resultfiles, it is possible to use the filters just once, and still using the same source-material.

So the encoder get's started doing it's passes AFTER there are save output AVISYNTH files....

Am I getting something totally wrong here ? Maybe it isn't possible to output AVISYNTH files to disk, and let the encoder use these files from disc, I don't know. But I suspect this could be done.

I just reason in abstract because I obviously didn't build it :)

But in mathematical term you can use a function just once, saving the output for futher use, or everytime time apply the function again on the real original source material, everytime this is needed.

Now the second way is probably the current flow of actions taken.

But if you use temporary files, having the AVISYNTH-output stored to them including 1 time only filter use, it should be possible...

Or am I missing something here ???


If the function was just used once, and you can save CONSIDERABLE AMOUNT OF TIME, it is woth a try....

Doing 3 runs at 0.5, or one at 0.5 including disk I/O and futher passes at 3.0 would greatly improve overall speed.....

The use of filters can greatly reduce CCE's speed in the current way it works, because these filters are eveytime included in the AVISYNTH proces.

Use inclusing them once and store output and use this output should be of great interest for many who use filter(s) that can have a heavy impact on AVISYNTH speed. If temporary files are used in between, there no need for the filters anymore, just for diskspace. And nowdays diskspace isn't worth to take into account with drive having 250 GB or more capacity...

Video Dude
11th October 2005, 23:21
1) Use AVIOSYNTH to output with fitler(s) applied, BUT STORE THIS OUTPUT FOR FUTHER USE !But there is no output to store. AVISynth is a framesever, thus it is on the fly. Nothing is stored to the hard drive. The whole point of AVISynth is not having to create intermediate files.


And nowdays diskspace isn't worth to take into account with drive having 250 GB or more capacity... That drive won't seem so big if you use lossless compression like HuffYUV for temporary files.



A better solution if you find the filters slow is to find alternate filters that produce similar output at a more optimal speed. Or just do 1 pass encode with the filter you want to use.

jptheripper
11th October 2005, 23:59
you could, theoretically, one pass with filter at matching bitrate as source (although this is re-encoding). then take those output files in re-encode without filter to the more compressed.

however, you would have to generate the vaf twice as now the sources are different
and you woul dhave to prepare rebuild twice

and now you are recompressing twice.

bad idea, and this would eliminate any benefit of a filter

just use the filter each time, its not like it takes more effort, just a marginal amount of time

jdobbs
12th October 2005, 00:09
I think I'd need to answer this properly would take a long explanation as to how MPEG works -- and there are 300 page books that are dedicated to that.

Bottom line -- you can save the value of a function, true. But if you save the value of the function of x... and then decide to get the function of y -- what is its relationship to x? Unknown? You bet. That's the problem.

A video stream processed with filters is not equal to the same video stream without filters. Try this:

1. Run the first pass with this filter:

BlankClip()

2. Then run it without.

How much help would the MPEG encoder have in determining allocation etc from the first pass? It's an extreme example but it drives the point home. Filters change the video -- if they didn't there would be no point in using them. After the video has changed, the second and following passes would have to be applied against the same source (with filters) in order to be of any value.

If you want to save time with filters... reducing the number of passes or OPV is about your only option. Or, of course, looking for faster filters.

jptheripper
12th October 2005, 00:25
another way to look at it.

avisynth is a frameserver.

The filter modifies how the frame is read. Inorder to keep the source constant, it must be "read" for the first pass, and it is then encoded.

On the 2nd (and following passes) it is read again, and the encoded frame is compared to the "read" original. An attempt is then made to minimize the differences, Each pass these differences, in theory, get smaller, however, sometimes it over corrects and makes it worse. Haence the arguement that more than 3 passes is wasteful (that and the differences are as small as they can noticably be at this time)

HOwever, if you filtered only on the first pass, when it is read the 2nd time (without the filter) it would look very different, and the 2nd pass would make it look more like the unfiltered original, in a sense undoing the filter.

cce must read the same source everytime (the same filters every time) so that the output can be compared to the same thing after every pass.

so in a sense, the filter is applied in the reading phase, and not the encoding phase (this is a bit by bit thing) and hence must be done every pass. no matter what.

wmansir
12th October 2005, 03:20
If someone wanted to create a 3rd party tool to do this it wouldn't be very hard. Just save the .avs files to HuffyUV or MJPG .avi, then replace the original .avs files with new .avs files that just OpenAVISource() the temp .avi files. You could then run the DVD-RB Encode phase as normal.

If you require Vdub installed, which most people probably have, you could even do it with a simple script, since vdub script routines can be used to read and save the .avi. The rest is just simple text processing.

It would take a lot of disk space, and it wouldn't work with ILVU sections, which are demuxed on-the-fly, but it should work. I don't think it would be used enough to warrant inclusion in the DVD-RB itself though.

jdobbs
12th October 2005, 11:54
(a light finally goes off in jdobbs' head :eek: ) Oh... I think I now see what was being said -- I completely misunderstood. You would run one pass with the filters, and then use that as the source in order to do a complete reencode. You'd get some level of loss because of the copy-of-a-copy effect (unless you use a lossless codec)... and I'm not sure you would save any time. For example, DV sources run at about half the speed of DGDECODE/MPEG sources on my system (the codec has some effect). If you stored the interim using something lossless the output would be exceptionally large.

I think I'd leave that one to someone else...

Boulder
12th October 2005, 13:51
The speed increase won't be worth it with any regular script. If you use some of the very complex functions (hi Didée :p ) and have lots of video to encode, it might save some time.

jdobbs
12th October 2005, 15:33
Note that you'd also have to do two passes on the result of the lossless first pass in order to get balanced VBR.... which would result in three passes on the source as a minimum.

jdobbs
12th October 2005, 15:53
I just tried a short segment from "Kingdom of Heaven" as an experiment. The output to HUFFYUV resulted in a file that was about 22 times larger than the MPEG2 using the computed bitrate (at 65.3% reduction). The output on my system was only about 40fps writing it with VDUB compared to 60fps (per pass) that I got using CCE for MPEG-2. That means that on this 7.33GB DVD would need about 106GB to store the intermediate HUFFYUV files. The first pass at 40fps, of course would be reduced further by the implementation of the filters....

I then ran the output HUFFYUV file through CCE and found that it encoded at about 28fps when used against this source -- which means that action alone would double the encode time.

My conclusion is that attempting to do this would require incredibly large amounts of space and would actually be considerably slower than a direct encode with CCE using the filters for each pass.

Boulder
12th October 2005, 16:09
Yep, and that's why the "intermediate file" way is good only for some 0-1fps scripts:)

jdobbs
12th October 2005, 16:26
Not from my test. That means they would go through pass one at .00 - .66fps.

Boulder
12th October 2005, 16:46
iiP or LimitedSharpen and a slowish PC will ensure that the PC will crawl through the passes for days. Even one of my regular analog capture scripts goes at 3-4fps in HC on my 3.22GHz P4 thanks to LTSMC() :D

A 2-hour movie and 3fps means it'll take 1000 minutes to complete one pass. Two passes means over 33hrs :p It's faster to do an intermediate file (ffdshow includes a YV12 HuffYUV) and use that for encoding.

Nevertheless, any regular encode doesn't need an intermediate file.

apfraats
13th October 2005, 01:14
Well, I be honest and don't get all the details, but indeed, if temporary files are that large as suggested , it would be of little to no use.

If I get it right you should have to save it's full frame (interlaced or not) in it's native resolution, so 1 second is 25*720*576*(bits needed for color just for fun let's say 16)= something like 20MB every second.....

PAL of course...

1 minute will be about 1.2 GB. So a movie of 90 minutes needs 108 GB.....

So I see the problem..... FINALLY :D :D :D

apfraats
13th October 2005, 01:21
And maybe you can compress this to JPEG ..... :eek: :thanks: :D

Boulder
13th October 2005, 07:06
1 minute will be about 1.2 GB. So a movie of 90 minutes needs 108 GB.....

That's for uncompressed video. Using a good lossless codec the size will be somewhat smaller depending on the source of course.

Remember that some of us use HuffYUV for capturing long movies;)

Aquilonious
15th October 2005, 07:17
I have two enchancement request, don't know how much effort they take...

2) Having DVD-RB-PRO the option of setting it's proces priority to as low as possible but above iddle so you can use youre computer as normal, while unused CPU power is left to DVD-RB AND IT'S ENCODERS. So the encoders must be run in low-priotrity too (and AVISYNTH with filters). I don't know if it's possible, for example with ECLCCE and CCE SP 2.67xxxx being used. Theoratically it should be possible.
This would greatly improve DVD-RB-PRO for me and others I think, cause you would be able to use a responsive computer under win-xp and be able to run long running DVD-RB-PRO jobs too.
Hi apfraats,

Rebuilder & CCE can really tie up resources, so when I run it during the day when I'm using my PC for other things, I start it in low priority mode with a batch file:

c:
cd "C:\Program Files\DVD-RB PRO\"
start /low Rebuilder.exe

It typically takes about 5-15% longer for encodes to complete (depending on what else you're running at the same time), but at least it frees up your PC to do most other tasks.

Now of course, you won't be able to play HL2 while Rebuilder's running, even in low prioity mode. :D