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. |
28th October 2002, 03:54 | #1 | Link | |
Registered User
Join Date: Oct 2001
Location: Alabama, USA
Posts: 769
|
Command Line Compressor - AVS2AVI
Quote:
I've already attempted the project myself but I still don't know enough C++ or the VCM interfaces to take "store.c" from DVD2AVI and create the app. Maybe something like this already exists or someone thinks it wouldn't be that hard to whip it up. Additionally, Nic provided me with the following help: "For encoding to avi, you need to learn the AVI API & IC API to do it yourself. Look up commands like AVIGetStream & ICCompress. Basically you do an AVIReadStream from an avs file. That gives you the YUY2 frame in a buffer, then call ICCompress to get the compressed frame & then use AVIWrite (I think DVD2AVI is the place to look )" Thanks Nic and anyone else who may provide help.
__________________
ChapterGrabber - add names to your chapters | AtomSite - open source AtomPub server Last edited by DaveEL; 12th August 2003 at 17:54. |
|
1st November 2002, 22:15 | #3 | Link |
Registered User
Join Date: Oct 2001
Location: Alabama, USA
Posts: 769
|
Thanks and I looked at the code but I just found out in my C++ class that you can set a method()=value and it kinda blew my mind but anyway, my c++ skills are horrible so I think I will wait for DirectX.NET
__________________
ChapterGrabber - add names to your chapters | AtomSite - open source AtomPub server |
2nd November 2002, 21:48 | #4 | Link |
Registered User
Join Date: Oct 2001
Location: FRANCE
Posts: 320
|
Here is a surprise for you in attachement.
It should work with RGB24, RGB32, YUY2 and YV12 avs source. It compress well with DivX 3.11, but it crash at the end with DivX5 and XviD, on the last : AVIFileRelease(pSRCfile); I don't now why ATM, I will look at it later. The file is still readable anyway at start Source are included, if any vfw guru want to look at it ? EDIT : Attachement removed (see below for new version)
__________________
Regards [Toff] Last edited by [Toff]; 4th November 2002 at 12:36. |
3rd November 2002, 11:45 | #5 | Link |
Registered User
Join Date: Oct 2001
Location: FRANCE
Posts: 320
|
I found what the crash problem is.
Line 195 : if(pDSTCompVideoStream) AVIStreamRelease(pDSTVideoStream); Must be : if(pDSTCompVideoStream) AVIStreamRelease(pDSTCompVideoStream); No crash anymore. Even if the avi seems perfectly playable there is still a problem at the end of the stream (an invalid chunk, that's what vdub say when using the hexeditor and Riff chunk tree) The problem is also present in DVD2AVI. EDIT : Oups, a new problem fixed all frames were written as KF, new upload soon. It's seems that RGB support is broken, I must test with a stable avisynth version.
__________________
Regards [Toff] Last edited by [Toff]; 3rd November 2002 at 13:59. |
3rd November 2002, 15:39 | #6 | Link |
Registered User
Join Date: Oct 2001
Location: FRANCE
Posts: 320
|
OK here is 1.01 version
Tested with avisynth 2.06, RGB24,32,YUY2 works compressing to Xvid, DIvX5 or DivX 3.11. Tested with avisynth 2.5alpha YUY2, YV12 works. But RGB seems broken with 2.5 alpha. I can post a short clip If you want. EDIT : no bug, I must put ConvertToYUY2 before ConvertToRGB24 Ctrl-C terminate properly now. EDIT : Attachement removed (see below for new version)
__________________
Regards [Toff] Last edited by [Toff]; 8th November 2002 at 10:13. |
4th November 2002, 05:42 | #7 | Link |
Registered User
Join Date: Oct 2001
Location: Alabama, USA
Posts: 769
|
Thanks [Toff]
Your awesome! I appreciate your work! I will start testing right away. Thanks again.
__________________
ChapterGrabber - add names to your chapters | AtomSite - open source AtomPub server |
4th November 2002, 05:57 | #8 | Link |
Registered User
Join Date: Oct 2001
Location: Alabama, USA
Posts: 769
|
Great work [Toff]! This is exactly what I was looking for! If you ever get time could you display the FPS during the encode? Also, how do learn how to read/create/modify a codec parameters file?
PS: or just tell it to use xvid since i can change those parameters in the registry.
__________________
ChapterGrabber - add names to your chapters | AtomSite - open source AtomPub server |
4th November 2002, 06:17 | #9 | Link |
Registered User
Join Date: Oct 2001
Location: Alabama, USA
Posts: 769
|
I guess I must wait for mod to approve your version 1.01?
__________________
ChapterGrabber - add names to your chapters | AtomSite - open source AtomPub server |
4th November 2002, 10:18 | #10 | Link |
Registered User
Join Date: Oct 2001
Location: FRANCE
Posts: 320
|
>I guess I must wait for mod to approve your version 1.01?
Yes, just have to wait. >If you ever get time could you display the FPS during the encode Yes that should be easy, I will add an estimated time also. >Also, how do learn how to read/create/modify a codec parameters file The file that is created is a raw copy of the codec state so there is no general method to create/modify them. Each codec has is own format. >or just tell it to use xvid since i can change those parameters in the registry I think that's possible to make a special case for xvid There is still a little problem at the end of the file, when you use your media player in loop mode it doesn't loop. The problem is also present in DVD2AVI. I let you test.
__________________
Regards [Toff] |
5th November 2002, 16:01 | #12 | Link |
Still Laughing
Join Date: Oct 2001
Location: Around
Posts: 1,312
|
I hope [Toff] doesn't mind, but I went ahead and implemented a limited two pass functionality. It works fine, but its limited in that it currently doesn't support the load/save function, if you supply load/save on the commandline and also supply the twopass argument, it should dump you out with the usage. (Sorry I forgot to update the usage printout also)
To activate two pass mode you just supply something like avs2avi source.avs destination.avi -2 This will, in succession ask for compression codecs, the first will be for the first pass, and the second for the second pass (it will confirm them and display). If they don't match (i.e. you select XviD during one pass and DivX for the second, the program will close, printing an error). Version number is incremented to 1.10. I tested this briefly and I'm 99% certain it works and I didn't break anything existing. http://phreak404.virtualave.net/avs2avi_110.zip |
5th November 2002, 21:17 | #14 | Link |
Registered User
Join Date: Oct 2001
Location: Alabama, USA
Posts: 769
|
I must be in heaven. You guys are great! I did some testing with DVD2XCD and I think everything is now in place to create a new GKnot type program since GKnot is very outdated. Thanks, for the work.
__________________
ChapterGrabber - add names to your chapters | AtomSite - open source AtomPub server |
5th November 2002, 23:04 | #15 | Link | |
Registered User
Join Date: Oct 2002
Posts: 1
|
Quote:
as far as i can see, there is a block added after the RIFF AVI chunk (directly succeeding the AVI legacy index), but it only contains a portion of the last frame. i guess this is for some strange padding reasons, but i would like to get rid of this stuff! probably the only way to solve this, is to follow virtualdub/vidomi and code your own version of AviFile. *sigh* |
|
6th November 2002, 00:27 | #16 | Link |
Registered User
Join Date: Oct 2001
Location: FRANCE
Posts: 320
|
Thanks, for your comment io.
So I know it's not entirely my fault. Here we go for v1.11 with : - 2 pass load/save mode. - fps display, and remaining time (not very accurate, don't know why) avs2avi_111.zip No use default codec parameter (from registry) without prompt at the moment.
__________________
Regards [Toff] |
6th November 2002, 01:38 | #17 | Link |
Still Laughing
Join Date: Oct 2001
Location: Around
Posts: 1,312
|
I had a v1.11 also, but I've incorporated my additions in to yours once again, so here is v1.12
Changelog ---------
Last edited by int 21h; 21st November 2002 at 15:07. |
6th November 2002, 02:48 | #18 | Link |
Registered User
Join Date: Oct 2001
Location: Italia
Posts: 412
|
- Surprised about so simple and so effective! (quality+speed toghether with MPEG2DEC3 YV12 and AVS 2.5a)
- Now I'll use VirtualDub only to find frames boundaries , command-line is more quick to setup!! - Should be bundled with Avisynth Thanx Toff! |
6th November 2002, 04:04 | #19 | Link |
AC3 5.1 Addict
Join Date: Nov 2001
Location: Big Blue Nation_USA
Posts: 2,036
|
Any chance of multi-threading for the future? *grin* I only ask because otherwise it's going to run much slower on SMP boxes compared to Vdub. Good work guys, can't wait to do some testing.
__________________
Need AC3 & SPDIF setup info? |
|
|