View Full Version : AVS2AVI -- new version
malkion
8th April 2004, 19:17
wasnt going to say anything...but...
I'm using 1.31a and will never upgrade beyond that. I encode and recently use slow scripts which achieve 0-1fps on VDub(Mod). avs2avi was supposed to be faster. so that was the main reason i started using it.
I'm doing my first encode with it, but from 1.32-1.35 even the debug seems to be fixed, the speed seems relative to Vdug (both are priority idle for comparasion). With 1.31a it's claming to finish a 48hr job in 1.35 and 1.32 in 16 hrs.
You can tell I dont care if the "non-quiet" mode is borked.
I'll be testing all the versions soon to see which is fastest :D
Moitah
8th April 2004, 20:34
Originally posted by esby
May i ask for three 'small' features requests?
--Range:XXX-YYY
--RangeDrop=true/false
with multiple ranges possible
eg --Range:0-150 --Range:200-250
to encode only from frame 0 to 150, and after 200 to 250
RangeDrop selecting between:
-true : the non selected frames are dropped (zeroSized)
-false: the non selected frames are not encoded, resulting a clip of 200 frames in the example.
I think RangeDrop==true might be easier to implement.
--NoCompress:
Do not compress, use directstream copy...
esby
I have the no recompression option working. For RangeDrop=false, why not just use Trim() in your AviSynth script :)? Could you explain where RangeDrop=true would be useful?
Moitah
8th April 2004, 21:02
Originally posted by malkion
With 1.31a it's claming to finish a 48hr job in 1.35 and 1.32 in 16 hrs.
There really shouldn't be that much of a speed difference between the versions. A while back I did some testing, and v1.34 was actually slightly faster than v1.31a because of the internal AVI output buffering (comparing CPU usage graphs of the two, I noticed that v1.34 stayed at 100%, while v1.31a fluctuated around maybe 95%-100%). The remaining time estimation of v1.31a jumps around VERY much, and newer versions, while better, will still not be perfect because it's based on the speed of the last 1-2 minutes of encoding, which can vary based on the contents of the video. You should compare the encoding time that AVS2AVI tells you after it is done encoding. Also, for some reason using High priority slows down AVS2AVI a lot for me, so I would recommend not to use High priority.
esby
8th April 2004, 23:02
Could you explain where RangeDrop=true would be useful?
Well in a splice content,
supposing you need to reencode parts of a video...
eg:
With a video containing 2500 frames...
supposing you encoded it once. (rc1.avi - 2500 frames)
now you want for various reasons to reencode
from frame 200 to frame 250 then from frame 1800 to frame 2000
There are two possibilities:
* you use trim and encode only what you want... (that would be dropFrame=false)
* you encode what you need, and drop frames outside the range,
instead of skipping. this way you keep the original 'alignement'
In the first case, you have to calculate exactly how you are going to splice the video....
still with the same example:
splice1.avi containing 50+200 = 250 frames.
Supposing you are using avs in direct stream mode:
to reassemble the spliced (or patched) rc you need to do:
src = avisource("rc1.avi")
splice = avisource("splice.avi") # splice has 250 frames
part1 = src.trim(0,200)
part2 = splice.trim(0,50)
part3 = src.trim(250,1800)
part4 = splice.trim(50,250)
part5 = src.trim(2000,-1)
return part1+part2+part3+part4+part5
In the second case, the calculation are way easier.
src = avisource("rc1.avi")
splice = avisource("splice.avi") # splice has 2500 frames but only 250 are really encoded, the rest were dropped
part1 = src.trim(0,200)
part2 = splice.trim(200,250)
part3 = src.trim(250,1800)
part4 = splice.trim(1800,2000)
part5 = src.trim(2000,-1)
return part1+part2+part3+part4+part5
Of course for the splice to work correctly, you need to have a keyframe at frame 250 & 2000 in rc1.avi, but that's not really a problem.
(and of course there must be a kf too at 0 & 50//250 in splice.avi)
esby
Moitah
8th April 2004, 23:45
esby: Interesting...
There's a few potential problems. Is it possible to get AviSynth in 'direct stream copy' mode? I thought AviSource decompresses the video to YV12, YUY2, or RGB. Also, I played around with putting dropped frames in the output AVI, but they appear to be lagged when using B-frames (I put dropped frames in an XviD encode (max B-frames set to 2) from frames 120-220, and when I looked at the result in VirtualDub the dropped frames showed up from 118-218). I don't think theres a way to have AVS2AVI automatically put keyframes where the ranges start, so I guess you would have to use the zone options in XviD.
esby
9th April 2004, 00:01
Is it possible to get AviSynth in 'direct stream copy' mode?
have a look here...
http://forum.doom9.org/showthread.php?s=&threadid=71482
It's not official, and i'm not forcing anyone to implement it in the current avisynth, but i needed(and need) it personnaly.
esby
On another note, i have not thought really about bframes & splicing.
Without bframes, splicing limitation are:
you need a keyframe when you want to switch origin:
fileA + fileB + _restOfFileA
to perform that, you must have:
a kf at start of fileB.
a kf at start of _restOfFileA
with Beta frames,
since there are two problems:
first they are calculated using the previous and next kf,
secondly there is a 'lag' as you said, the beta frame being putted in a different order, but since i'm no expert in this field, i don't dare to answer that exactly.
So all i can guess actually is:
no splicing with bframe,
if splicing, must start and End on an existing KF(additional restriction)
esby
malkion
9th April 2004, 00:54
Moitah, you're absolutely right. It's now approximately 14 hrs ito the encode, and avs2avi's completed approximately 50k of 160k frames.
Thanks for continuing to upgrade this program. I'll run more tests with it.
Moitah
9th April 2004, 00:55
Originally posted by esby
have a look here...
http://forum.doom9.org/showthread.php?s=&threadid=71482
Nice :). I cleaned up the code for no recompression, and hopefully I'll be able to do the range stuff tonight.
theuser86
9th April 2004, 17:33
Originally posted by DaveEL
Ok original developer was [Toff] and int21h and myself added some extra stuff to it (oh and i b0rked it many times) eventually i took over and hence its hosted on my site.
http://forum.doom9.org/showthread.php?s=&threadid=36768
Been meaning to look over the new version and once ive checked it out ill put it up on my site too as my last versions were not exactly polished releases.
EDIT:- Have not tested the version yet but have looked through the code and people here seem to be happy with it so it will be available from daveel.dnsalias.com shortly 1.35 is now the official latest version according to me :) ill let divx-digest know soon too.
DaveEL
@DaveEL
Thanks a lot of the quick reply. I've tested version 1.35 and I have not experience any problems yet. I guess I will use version 1.35 instead of v1.31a. Thanks :)
superdump
12th April 2004, 12:00
Moitah: Nice work indeed. The previous version avs2avi used to make my hard drive churn like crazy all the while it was encoding so I switched back to virtualdubmod but 1.35 works fine.
Rainy: Nice GUI. The 1st/2nd pass settings saving as presets is a cool feature, speeds up doing stuff that little bit more. There are a couple of things I'd like to mention. I downloaded the latest version about 20 minutes ago from the link in this thread. Two things have come to light:
1. The time remaining displays up to 99 minutes in 1 hour. :) 0-59 would be more useful I think.
2. You can't minimise the GUI. It would be nice if the GUI was minimisable and if it displayed the current progress in the taskbar entry title. Such as: "85% P:1/2 F:2/4" where the percentage is the progress of the current pass of encoding P:a/b a=current pass, b=number of passes for this file, and F:a/b a=current file, b=total number of files to be encoded.
The ability to change the priority on-the-fly is handy too. Thanks.
EDIT: Regarding point 1. above, I think it may be that the hour display is correct so it's doing some calculation like [please note I'm no programmer]
time_remaining_seconds = total_frames_remaining/average_frames_per_second
remaining_time_hours = integer_part_of(time_remaining_seconds/3600)
remaining_time_minutes = (integer_part_of(time_remaining_seconds/60)) modulo 60
remaining_time_seconds = (time_remaining_seconds) modulo 60
What I think it's currently doing is forgetting to modulo 60 the integer_part_of(time_remaining_seconds/60) so it's displaying the total number of minutes remaining up to a maximum of 99 (because there are two digits available). I'm not quite sure what it would do if there were more than 99 minutes remaining or sure if I'm right. But I think it's something like that. It's also doing the same for the time elapsed.
EDIT 2: If it goes beyond 99 minutes it displays 100 and so on... :)
Rainy
12th April 2004, 17:28
Thanks for the bug report. An updated and fixed version uploaded :)
http://www.home.no/rainy/pr/avs2avid-1.0a.zip
superdump
12th April 2004, 21:07
You work quick! Thanks Rainy. :)
superdump
13th April 2004, 16:19
Rainy: I have a minor request. The tray minimising is very nice, could the icon be made to show the current progress in some sort of pie-chart fashion? :) Just for fun really, not at all important. So the clock could have one hand that started at the top and swept out the % as it encoded.
Rainy
13th April 2004, 18:53
Sure, no problem. However I'll need a set of ten icons (tenner step should be enough), since I can't modify the existing one. Any graphic designers around? :)
DvdKhl
13th April 2004, 23:27
Is there any way of creating or changing the codec parameter file automaticly,
because I want to change the Bitrate or the destination file size in the XviD codec.
But I have no idea how to *decode* it so I could change it.
When I knew I could write a little program that calculates the needed finalsize,
with it I could convert my series from DVD to XviD with just one time setting the needed avs scripts etc. up and then encode them all in a row without any userinteraction.
In virtual dub I could change the registry for my needs but in AVS2AVI you have to load the file for the codec settings.
So is there a decoder or something like that?
esby
13th April 2004, 23:30
I think there is a 'use xvid option' ?
no?
esby
DvdKhl
13th April 2004, 23:37
Originally posted by esby
I think there is a 'use xvid option' ?
no?
esby
mhh but every series has another length therefore they all need different finalsizes.
But in AVS2AVI I can only tell it the parameters when he needs it.
So I would have to stay all the way near my computer,
because he asks for the parameters for the next encode when the previous is done.
DaveEL
14th April 2004, 09:39
Originally posted by DvdKhl
Is there any way of creating or changing the codec parameter file automaticly,
because I want to change the Bitrate or the destination file size in the XviD codec.
But I have no idea how to *decode* it so I could change it.
When I knew I could write a little program that calculates the needed finalsize,
with it I could convert my series from DVD to XviD with just one time setting the needed avs scripts etc. up and then encode them all in a row without any userinteraction.
In virtual dub I could change the registry for my needs but in AVS2AVI you have to load the file for the codec settings.
So is there a decoder or something like that?
The codec settings file is different for each codec and version but you can use the registry if you use the fourcc option (-f xvid i think but im not sure). If you want to change the codec param file you need to be able to read a bit of c code if you look at the the xvid source code for the raw codec data and check the load/savecodecparameter code in avs2avi for the other parts of the file format.
More info can be found try searching for SetCompData in the development forum that should get you info on writing virtualdub job files setcompdata is the same raw codec data as in the avs2avi codec state files but in avs2avi you don't base64 encode it.
DaveEL
(ps sorry its early(ish) here and im still half asleep ill try to rewrite this later today)
DvdKhl
14th April 2004, 10:23
Thanks DavEL
I should have seen that option with selecting the codec by fourCC.
I'm going to use that since I have no knowledge about c code
but with VB I can change the reg so this is just what I needed.
Lets not hope it is as complicated as DivX. :D
Emp3r0r
15th April 2004, 02:43
Originally posted by Rainy
Sure, no problem. However I'll need a set of ten icons (tenner step should be enough), since I can't modify the existing one. Any graphic designers around? :)
How bout this?
http://jvance.com/images/pie.gif
or this?
http://jvance.com/images/piered2.gif
or blue?
http://jvance.com/images/pieblue.gif
superdump
15th April 2004, 19:45
Emp3r0r: Nice. :)
Rainy and DaveEL: I actually discovered that the avs2avi 1.35 executable still made my hard drive churn a lot but Rainy's dll didn't. Have you changed anything to make the dll Rainy?
Also, Rainy, I installed Windows XP SP2 RC1 yesterday and avs2avidemo no longer runs... it just doesn't open. :\
Thanks for your time.
Rainy
16th April 2004, 18:49
the dll is completly based on latest avs2avi, that means I didn't make any changes that could affect that behaviour ;) Since I don't have SP2 RC1 I can't test, sorry :(
@Emp3r0r
nice, I'll take the red one :)
Moitah
17th April 2004, 03:16
Rainy: Just curious, what language is avs2avidemo written in? And do you plan to release the source to the dll?
Rainy
17th April 2004, 09:11
It's written in C++ and the source of the latest avs2avi dll is available at: http://www.home.no/rainy/pr/avs2avi_dll-src.zip :)
Rainy
17th April 2004, 16:29
New version uploaded: http://www.home.no/rainy/pr/avs2avid-1.0a.zip
Emp3r0r
19th April 2004, 04:48
Whats new rainy?
Rainy
19th April 2004, 10:40
right, forgot to mention: just a few fixes in the dll, minor changes in the gui and added an animated tray icon.
I combined your icon set with the previous icon, since it had to be modified anyway. ;)
The Link
19th April 2004, 15:34
I really like your program! :)
I don't know if it would bloat the program too much but nevertheless I have some suggestions:
It would be great to have a preview window with slider and framecounter. This would help me to configure the zones in xvid.
A simple avs editor (just a primitive text window would do it for me)with a save option to edit the loaded scripts.
Thanks for reading!
Regards,
The Link
Rainy
21st April 2004, 14:34
Thanks for suggestion. Actually, I've been already working on these two features for a couple of days before you posted. So, stay tuned. I'll post an updated version in the next days. :)
The Link
21st April 2004, 18:59
:)
seewen
24th April 2004, 03:56
@Rainy
Your "little" GUI is really nice.
But it miss a little something: A way to change jobs order (up/down arrows for example).
A+
P.S.
Nice tray icon ! ;)
aketon
26th April 2004, 09:42
Hello,
very nice program, but I found a big BUG! Avs2avi gui encodes the first frame for 3 more times, and that thing gives you 120ms delay in audio! There is no problem with the command line avs2avi 1.35! Could you please find why this thing happens! I am always encoding in XviD with the default settings!!!
Moitah
26th April 2004, 15:51
I have figured out a way to allow the XviD status window to remain open after encoding is complete. This will be in the next version (as an optional switch).
Also the "No Recompression" option will be enabled in the next version.
Rainy
26th April 2004, 16:49
new version uploaded: http://www.home.no/rainy/pr/avs2avid-1.1.zip
What's new:
* added a script window for quick editing
* added a preview window
* job order is now configurable simply per drag & drop
* added a preferences dialog for global options, font- and working directory settings
* miscellaneous fixes
@aketon
at the moment I can't reproduce that bug, but I will take a closer look.
The Link
26th April 2004, 18:55
Simply perfect now (at least for me)!
Thank you! :)
The Link
Rainy
26th April 2004, 19:21
Quick update: http://www.home.no/rainy/pr/avs2avid-1.1a.zip
Just a small bug in saving options and added a toolbar to the preview window, since I find it more comfortable. :)
Moitah
27th April 2004, 19:51
AVS2AVI v1.36: Added option to wait until the XviD status window is closed, use "-x a" to enable for all passes, or "-x l" to enable for the last pass only.
Enabled the "No Recompression" option.
AVS2AVIDrop v0.4.0: Rearranged the interface while encoding.
Wrote custom progress bar code, looks better now :).
Always uses the "-x l" switch (this will have no effect if you aren't using XviD).
New screenshot of AVS2AVIDrop:
http://members.cox.net/moitah/avs2avidrop-0_4_0.png
Download link (both AVS2AVI and AVS2AVIDrop, including source): AVS2AVI v1.36 (http://members.cox.net/moitah/avs2avi-136.zip)
Moitah
28th April 2004, 01:59
Rainy: Thanks for the source of the DLL. The GUI is looking really good, I like the preview :). Unfortunately I haven't been able to encode anything, it always says:
An error has occured while loading the source file
Continue anyway?
Am I doing something stupid? Any ideas? (This happed in all previous versions I've tried as well)
Rainy
28th April 2004, 14:54
Thanks Moitah :) That error appeared mostly if you cancel an encode and restart it, because I simply forgot to release the AVIFILE interfaces, shame on me :o.
Here's the fixed version: http://www.home.no/rainy/pr/avs2avid-1.1b.zip
Moitah
28th April 2004, 15:28
Rainy: It still doesn't work on my computer :( (rebooting didn't help). I tested it on another computer and it works fine.
Rainy
28th April 2004, 15:39
Do you still get that error message? What os is installed on your computer?
Moitah
28th April 2004, 15:41
Yes, same error message. Both mine and the other computer I tested on are running Windows 2000 w/ SP4.
Rainy
28th April 2004, 15:54
That's pretty strange. Do the both computers have the same configuration e.g. AviSynth? I'm actually at a loss.
Moitah
28th April 2004, 15:59
Yeah, same version of AviSynth. I guess it's time to reinstall Windows on this box? ;) Well, if I'm the only one with this problem, don't worry about it.
EDIT: Of course, I will still help troubleshoot if you want to fix it anyway.
Rainy
28th April 2004, 18:49
New version: http://www.home.no/rainy/pr/avs2avid-1.2.zip
Fixed the problem Moitah reported, thanks him for testing and debugging :)
DarkDudae
28th April 2004, 23:14
Both of you (Moitah and Rainy) are doing a great work...
Thanks for it :)
DarkDudae
29th April 2004, 10:15
@Moitah
I have changed avs2avi.cpp to allow save/load settings without encoding using the -n in the commandline. It also will save the codec parameters if you use the FOURCC encoding directly:
avs2avi.exe <source> <destin.> -n -s <settings_filename>
This one should open the list of codecs and allow you to configure and save the settings without the encoding process.
avs2avi.exe <source> <destin.> -n -c XVID -s <settings_filename>
This one will save XVID settings directly.
Maybe the source has some bugs. Since I canīt open .vcproj files with VS 6.0 I canīt compile by myself or test :mad:
So I only changed avs2avi.cpp. The modifications I have done are indicated in the source.
I hope it can help :)
You can find the file HERE (http://enigmax.eresmas.com/avs2avi.cpp.zip)
Greetings
dp_sun
29th April 2004, 10:18
I have added a code to the program avs2avi-131a and have laid out all this on page http://sun.tepkom.ru/avs2avi/
Here direct references to executed files http://sun.tepkom.ru/avs2avi/avs2avi.zip and an initial code http://sun.tepkom.ru/avs2avi/avs2avi.src.zip
Look please!
There can be my ideas will like and will be used in new versions of the remarkable program avs2avi.
I apologize for bad English. I use the on-line translator.
ChangeLog (build 131022)
These are the major changes from the original version:
- VirtualDub-like version numbering scheme. Version is written in the output avi file.
- Removed buggy matroska and log file output (sorry, guys).
- Hotkeys and switching during transformation process.
- Registry entries for DIVX and XVID parameters. The program is now tuned to work with these two.
- Parameters specific to the codec and avi file (Max Keyframe Interval, etc.), are now figured out automaigcally.
- Individual parameters may be specified for each pass (both for 3d and 4th).
- Data entry forms made fool-proof.
- Ctrl-C now processed cleanly.
- Lots of cosmetical fixed. LAME-like statistics.
- Accurate elapsed and total work time counts.
- Current avi size output (estimated).
- Screen output of the codec parameters being written into the register.
esby
29th April 2004, 12:09
mmm @dp_sun
I'll just comment some of the changes in the version you have created.
since i'm merely an user here, and not one of the developper.
- VirtualDub-like version numbering scheme. Version is written in the output avi file.
That's not a version numbering scheme, that s build numbering one.
And more exactly that's the date of when you compiled this source,
and does not tell anyone which version was used.
So so far, I think it is just useless, and more confusing,
since you'll still need the version number to make a difference.
Version != Build number
but Version written in the output avi might be still ok.
that's auth info after all.
- Removed buggy matroska and log file output (sorry, guys).
Well I can only agree for mastroka, but:
Removing it was not a priority.
People might still be using it, despite what you think.
For logs, I don't know, I never used this option.
But the same remark applies here.
- Registry entries for DIVX and XVID parameters. The program is now tuned to work with these two.
Well using registry with DIVX is not a bad idea,
some people might like it.
Now, I have looked on the code a bit, and pondered the meaning of 'tuned to work' with these two.
If means added extra support for these two codec, I answer ok, why not...
But if it means only XVID & DIVX codec can be used to avs2avi now, I said a definitely NO!
Some people might use avs2avi with other codecs like ffvfw, huff, rvble, and what god know what they could need.
Using such or such codec is their choice, not yours to limit it to a selection of what you use.
- Parameters specific to the codec and avi file (Max Keyframe Interval, etc.)...
are you talking of the members of the COMPVAR structure...?
are you talking of specifying them via commandline or any other way?
Is this really useful, since you can generate dumpcodecfile already?
and since the codecs are different, some of these parameters
might have no meaning out of your context of use.
I have nothing to say for the rest of your change,
as long they are properly done,
but in that case I cannot really talk , it's more up to Moitah or Rainy.
Although I can add a bit of sarcastic comment here too...
directly from your code:
//#ifndef ABOVE_NORMAL_PRIORITY_CLASS
//#define ABOVE_NORMAL_PRIORITY_CLASS 0x00008000; // Yes you should update your platform SDK.
//#endif
Commenting out this because it is not needed with your platform
is not the proper way to code...
So far, if you did not comment out, forget my remark,
but if you did, think that the developper platform might not be always the same, and stuff like that can cause havoc to others to have it compile or work normally once compiled.
And especially here since it's a #ifndef ...
And to conclude the FILE_ID.DIZ being in the zip file...
I don't care about it,
but if you put such file, AT LEAST put the GPL licence too...
And don't forget that WAREZ has nothing to do here.
So far, my conclusion
(which is personnal and might or might not reflect other people opinion here):
Some of your changes might be needed or ok.
Some are useless, too specific.
Some could have been done directly as bugfix by moitah or rainly...
Since there is no cvs structure for avs2avi,
and that there are at least two different approach actually(not counting yours), with the normal way and rainy client,
avoid to do a huge list of change, unless you want to disturb the actual developper, or present it directly, and in an exploitable way.
Of course, you can modify it, since it's GPL, but don't forget that people are working on it, and don't do twice the job they could do...
on another note,
how about a sourceforge page for avs2avi?
or is it already done?
esby
DaveEL
29th April 2004, 12:24
avs2avi projects on www.corecodec.org im currently trying to get my old cvs tree imported into it and then ill get it opened to everyone else here :)
DaveEL
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.