Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Programming and Hacking > Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 24th February 2004, 04:55   #1  |  Link
Moitah
Registered User
 
Join Date: Feb 2004
Location: Virginia, USA
Posts: 334
AVS2AVI -- new version

I have updated AVS2AVI. Changes are as follows:
  • Stats is now 'instant' over the last 1-2 minutes instead of 300ms (will be much smoother now)... overall average is still displayed at the end
  • Fractions of a second aren't shown for elapsed time while encoding (clutters up display)
  • Size of encoded video is now displayed properly (was always 0 before)... now it will only show 0 when not in the last pass of a multi-pass encode (this is intended)
  • Note on the above: the size while encoding is just the size of the video data, at the end of the encoding it will be the total size of the file (including overhead)
  • Frame count/FPS at the end of encode is now displayed properly
  • Path of destination is now relative to the source (i.e. if the source is "c:\stuff\main.avs" and the dest is given as "new.avi", the full dest path will be "c:\stuff\new.avi"), same for the state file
  • If no destination is given, it will be the same as the source but with the proper extension (i.e. in the above example, the dest would be "c:\stuff\main.avi")
  • If the destination has the wrong extension (or no extension), it will be corrected (i.e. if the dest is given as "c:\test.avi" but '-o m' is set, the dest will be changed to "c:\test.avi.mkv")
  • Checks to make sure the source file exists before starting (this way you won't have to wait until after you select the compressor to find out the filename is wrong)
  • Checks to make sure you're not trying to overwrite the destination file (if you want to, use the '-w' switch)
  • Rewrote the command line parsing (to support some new features and fix bugs)
  • Fixed not completely exiting if an error occurred
  • Fixed crash if no compressor was selected (i.e. "No Recompression")... it still won't let you output but it exits instead of crashes
  • Displays the name of the format you're outputting to if it's not AVI
  • Added option for null output ('-o n'), can be used for speed testing or whatever
  • Fixed ReadFrame/EncodeFrame using StopRead instead of Stop
  • Misc other display and code cleanups
Notes:
  • This was compiled with the latest libMatroska and libEBML. This may have broken something, use Matroska output at your own risk (a small test clip plays fine for me, but I can't open it in the latest VirtualDubMod (same with mkv files made by v1.31a, though))!
  • Compiler optimization is disabled (that's the way it was when I downloaded it... if it wasn't disabled for a reason, a new compile should be made with it enabled)
  • Runtime library was set to single-threaded in the original project, I changed it to multi-threaded just to be safe (what should this be?)
  • The XviD status window is completely locked up for me, anyone know how to fix this?
I didn't include the full source code, only the file that I changed (avs2avi.cpp). After you add this to the project, you will need to add "shlwapi.lib" as a dependency.

--------------------------------------------------

This link will be kept up to date with the latest version: AVS2AVI v1.39

If for some reason you want the original version linked to in this post (v1.32), you can get it here.
__________________
moitah.net

Last edited by Moitah; 8th July 2004 at 19:55.
Moitah is offline   Reply With Quote
Old 24th February 2004, 05:27   #2  |  Link
KpeX
Registered User
 
KpeX's Avatar
 
Join Date: Jun 2003
Location: Great Lakes, USA
Posts: 1,433
Nice work!

Regarding the xvid status window, Koepi posted about this issue a while back - hopefully that gives you some idea .

When using matroska output, the result opens fine with VLC, but not with MPC or VdubMod 1.5.4.1 on my box.

For future versions - how about an additional logfile mode to write a log containing stats such as fps, filesize, etc. while encoding to avi/mkv. Welcome to the forums, and thanks for your work, cheers,
__________________
KpeX
Audio FAQs: General | BeSweet | SVCD/MP2 | MP3 | Vorbis | AC3 | DTS | AAC
Linux Audio/Video FAQ
KpeX is offline   Reply With Quote
Old 24th February 2004, 11:52   #3  |  Link
dimzon
BeHappy/MeGUI developer
 
dimzon's Avatar
 
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
May be some avs2avi_drop in addition to command-line
dimzon is offline   Reply With Quote
Old 24th February 2004, 13:22   #4  |  Link
DaveEL
Moderator
 
Join Date: Nov 2001
Posts: 581
Matroska code is probably b0rked it was the starting point for a new project and so i would probably remove it now as its only does video it can always be remuxed from avi anyway.

DaveEL
PS i have been meaning to put my cvs tree for avs2avi on corecodec for a while ill try to get round to doing it sometime this week and will commit your changes too.
DaveEL is offline   Reply With Quote
Old 24th February 2004, 14:20   #5  |  Link
DaveEL
Moderator
 
Join Date: Nov 2001
Posts: 581
Re: AVS2AVI -- new version

Quote:
Originally posted by Moitah [*]Fixed ReadFrame/EncodeFrame using StopRead instead of Stop [/B]
I sure StopRead was useful for something... was to do with threads or b-frames i think. That or it was part of the resume feature in which case its no longer needed. EDIT :- Yep now i have time to think it was about resuming thats why it nolonger works this may even be in my cvs tree already

If you don't mind once i test this myself ill stick it on my webspace as the new official version?

DaveEL
(PS i think i worked out what went wrong with the avilib output which is much simpler if you want to try it out send me a message)

Last edited by DaveEL; 24th February 2004 at 15:24.
DaveEL is offline   Reply With Quote
Old 24th February 2004, 14:23   #6  |  Link
DaveEL
Moderator
 
Join Date: Nov 2001
Posts: 581
Quote:
Originally posted by dimzon
May be some avs2avi_drop in addition to command-line
I did have an avs2avi dll somewhere ill see if i can dig it up.

DaveEL
DaveEL is offline   Reply With Quote
Old 24th February 2004, 19:50   #7  |  Link
Moitah
Registered User
 
Join Date: Feb 2004
Location: Virginia, USA
Posts: 334
Re: Re: AVS2AVI -- new version

Quote:
Originally posted by DaveEL
If you don't mind once i test this myself ill stick it on my webspace as the new official version?
Sounds good to me
Quote:
Originally posted by DaveEL
(PS i think i worked out what went wrong with the avilib output which is much simpler if you want to try it out send me a message)
I don't know how much more work (if any) I will be doing... but if you want to tell me what's wrong, maybe I'll get around to it. What advantages would it have over the current AVI writing method?
Moitah is offline   Reply With Quote
Old 24th February 2004, 19:56   #8  |  Link
Moitah
Registered User
 
Join Date: Feb 2004
Location: Virginia, USA
Posts: 334
Quote:
Originally posted by KpeX
Regarding the xvid status window, Koepi posted about this issue a while back - hopefully that gives you some idea
Yeah, thanks... I'll see if I can figure out how to fix it.
Moitah is offline   Reply With Quote
Old 25th February 2004, 07:08   #9  |  Link
Moitah
Registered User
 
Join Date: Feb 2004
Location: Virginia, USA
Posts: 334
I have fixed the problem with the XviD status window. After I clean up the code I will release a new version .
Moitah is offline   Reply With Quote
Old 25th February 2004, 17:52   #10  |  Link
Moitah
Registered User
 
Join Date: Feb 2004
Location: Virginia, USA
Posts: 334
AVS2AVI v1.33 Changes:
  • Handles window messages in the encode thread (fixes XviD status window)
  • Removed Matroska support
I made a new project for it because I wanted to be sure there weren't any weird settings I wasn't aware of. The only options I changed in the new project were adding the proper dependencies, setting runtime library to multi-threaded, and optimize for Pentium Pro/PII/PIII.

Download here.
Moitah is offline   Reply With Quote
Old 26th February 2004, 11:28   #11  |  Link
DarkNite
Almost Silent Member
 
DarkNite's Avatar
 
Join Date: Jun 2002
Location: Purgatory
Posts: 270
Nice work. Mmmm, streamlining is a beautiful thing.
__________________
Rethinking the "Why?" chromosome.
DarkNite is offline   Reply With Quote
Old 26th February 2004, 23:26   #12  |  Link
Moitah
Registered User
 
Join Date: Feb 2004
Location: Virginia, USA
Posts: 334
Quote:
Originally posted by dimzon
May be some avs2avi_drop in addition to command-line
I don't know how to do any GUI stuff in C++, but I have an idea about how to make it work with VB. It would involve having AVS2AVI create an invisible window (while researching the XviD problem I spent a few hours learning how to use CreateWindow, though it turned out I didn't need it ) and keeping status information in the titlebar. Then the VB program could use CreateProcess to run AVS2AVI without showing a console window, and pull information from the invisible window's titlebar. Sounds like fun, I may try it tonight .

EDIT: I know this probably isn't the best way, but it seems like the easiest to me.

Last edited by Moitah; 27th February 2004 at 00:12.
Moitah is offline   Reply With Quote
Old 27th February 2004, 06:27   #13  |  Link
Moitah
Registered User
 
Join Date: Feb 2004
Location: Virginia, USA
Posts: 334
Take a look:



It works . It needs better error handling (if AVS2AVI quits with an error, all you will see in the GUI is "Error" with no description of the problem) and more features (Stop button, a progress bar, the rest of the switches). It makes a .avi file with the same name as your .avs (but with the .avi extension, of course). Make sure to check "Overwrite destination" if you plan on testing with the same source file more than once. It only works with the special version of AVS2AVI included in the zip.

If you want to try it: AVS2AVIDrop v0.1.0

Have fun


EDIT: I'm not releasing the source code until I clean it up unless someone really wants to see it...

Last edited by Moitah; 27th February 2004 at 06:32.
Moitah is offline   Reply With Quote
Old 27th February 2004, 10:46   #14  |  Link
dimzon
BeHappy/MeGUI developer
 
dimzon's Avatar
 
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
@Moitah
please get me Your source code now. I'm planing to create AVS2XVID_Drop based on AVS2AVI on this weekend. I think i can change XviD encoding params throught -l key + a little binary codec parameters file patching
dimzon is offline   Reply With Quote
Old 27th February 2004, 20:33   #15  |  Link
Moitah
Registered User
 
Join Date: Feb 2004
Location: Virginia, USA
Posts: 334
Quote:
Originally posted by dimzon
please get me Your source code now.
I made some improvements with the error handling (it still won't tell you the exact message avs2avi quit with, though, but I'll try to do that eventually) and added a progress bar (it's just a Shape control for now, I didn't want the exe to require the common controls OCX).

Here it is, along with source: AVS2AVIDrop v0.2.0
Moitah is offline   Reply With Quote
Old 29th February 2004, 21:18   #16  |  Link
Moitah
Registered User
 
Join Date: Feb 2004
Location: Virginia, USA
Posts: 334
From the other thread:
Quote:
Originally posted by RathO
I tried AVS2AVI ...
... my hard disk seems to be working harder than when im using Vdubmod.
I found out how to fix this, disable_os_caching() needs to be called so the VirtualDub AVI writer will use its own caching. This will be in the next release.
Moitah is offline   Reply With Quote
Old 1st March 2004, 11:12   #17  |  Link
ChristianHJW
Matroska Team
 
ChristianHJW's Avatar
 
Join Date: Nov 2002
Location: Bavaria - Germany
Posts: 1,341
Quote:
Originally posted by Moitah [*]Removed Matroska support
I fully agree with this policy. As avs2avi cant handle audio, there is a remuxing step with either mkvmerge or VdubMod necessary in any case to add the audio, and then the source video can as well be AVI.

Things were different once anybody would care about avs2matroska, to create native MPEG4 MKV files ... my long dreamed wish, and we were so close already ....
ChristianHJW is offline   Reply With Quote
Old 1st March 2004, 11:20   #18  |  Link
ChristianHJW
Matroska Team
 
ChristianHJW's Avatar
 
Join Date: Nov 2002
Location: Bavaria - Germany
Posts: 1,341
Quote:
Originally posted by DaveEL
DaveEL
PS i have been meaning to put my cvs tree for avs2avi on corecodec for a while ill try to get round to doing it sometime this week and will commit your changes too.
DaveEL,

may i recommend to create a new project like

avs2video

on corecodec.org, and then to make two different CVS trees,

avs2avi

and

avs2matroska

????

Actually, as there seem to be more than one guy working on this project now, may i suggest you guys all get accounts on corecodec.org, and get familiar with using CVS ? http://tortoisecvs.sf.net works perfect for most of us on Windows, and its quite convenient as it is a n extension to Windows Explorer ( even i can use it ).

I will see if i can motivate jcsston or spyder482 to look over the avs2matroska sources, maybe there is a way find the bug, or to completely remove DaveEL's old matroska writing code and replace it with jcsston's new matroska output module ? maybe even spyder's MILK could be used for it :O ??

This program, once it was out, could completely replace VdubMod in the matroska DVD encoding tool ( DVDtoMKV, release this week ), and even create native files that way !
ChristianHJW is offline   Reply With Quote
Old 3rd March 2004, 00:50   #19  |  Link
perko
Registered User
 
Join Date: Sep 2002
Posts: 7
AVS Script Generation

Hi.

Sorry to be such a noob, but this is killing me.

I have a bunch of MPEG files that I need to convert to AVIs (using DIVX).

I understand AVS2AVI will provide a command line alternative to using the Dr. Divx GUI. I really need a command-line driven tool in order to automate this process.

Since all the MPEG source files are basically the same (in terms of resolution, etc.) What is the easiest way to generate the script for this? Do i really need to split the video and audio first and then fire up GKnot? That seems cumbersome to generate a script.

I have been looking around for example AVS scripts to no avail.

Any help is greatly appreciated.
perko is offline   Reply With Quote
Old 3rd March 2004, 02:58   #20  |  Link
DarkDudae
ARCalculator Developer
 
Join Date: Jun 2003
Location: Spain
Posts: 149
@Moitah

Great work! We will update the avs2avi version we use in ARCalculator development with this one if you are agree

We also are working in a integrated Job Control for ARCalculator with full support for avs2avi

Thanks
__________________
Lights out!
ARCalculator 2.6.0 (Rip-Pack)
www.canalxvid.com
DarkDudae is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 20:40.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.