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. |
|
|
#1 | Link |
|
Registered User
Join Date: Oct 2001
Location: France
Posts: 39
|
AVISynth output and AVIFile APIs
Hello,
Here I am, trying (for the challenge) to make an encoder that would use AVISynth scripts and AVIFile APIs. But, but even if I can open the AVS script, it seems it outputs 16 bit video, so that I can't use DivX video Codec on it (v4.12), and using another codec, I obtain an ugly 16 bit video. However, and here the thing is getting pretty weird, Virtual Dub seems perfectly able to encode this source into DivX 4.12 in 32 bits. So, here is my question, can anyone figure where I've missed something. I mean - There is a way for AVISynth to output 32 bit video and I missed it. - AVISynth outputs 32 video and I'm a dumb AVIFile user. BTW, if any of you guys can understand what I mean, I'll be happy to hear your answers ![]() @Ookami : I hope this post is in the right forum. If you think it suits better to AVISynth, well, just move it !
__________________
Black Rose of the Artist Clan |
|
|
|
|
|
#3 | Link |
|
Xe-Rotaredom
Join Date: Oct 2001
Location: Croatia
Posts: 1,029
|
Another non-answer posting
...> @Ookami : I hope this post is in the right forum. If you think it suits better to AVISynth, well, just move it ! You did the right thing to post this! Just obey and you'll not feel my wrath! > Why Ookami ? He is not a mod here ![]() I am always here... Thou shalt not have strange moderators before me. ![]() @Ciler: IMO, it can stay here, but like BlackSun said, I'm not the mod here (and not even an programmer). P.s.: BlackSun, check your PM's . Cheers, Ookie.
__________________
"Only those who attempt the absurd achieve the impossible." |
|
|
|
|
|
#6 | Link | |
|
CoreCodec
Join Date: Oct 2001
Location: Toulouse
Posts: 726
|
Quote:
And yeah, thanks for the PM I love it
|
|
|
|
|
|
|
#7 | Link |
|
Registered User
Join Date: Oct 2001
Posts: 39
|
It may look like it outputs 16 bits if you look at an AVS script with mediaplayer, but don't be fooled! It only looks that way because it's not displaying the YUV frames correctly... Convert the stream into RGB and you'll see mediaplayer display the frames correctly.
Anyway, this bug has nothing to do with encoding since displaying and encoding are 2 different things. |
|
|
|
|
|
#9 | Link |
|
Moderator
![]() Join Date: Oct 2001
Location: England
Posts: 3,260
|
Ciler, how are you saving the AVI using the AVIAPI, ive recently made source that does that....(you can read what for in the DVD2AVI forum
).......You might be doing it better than I am (I am pretty new to the AVIAPI (although simply, it is kind of picky at times ), but I don't get any problems....Good luck ![]() Cheers, -Nic ps Are you decompressing the frame or sending it directly to the API? |
|
|
|
|
|
#10 | Link |
|
Registered User
Join Date: Oct 2001
Location: France
Posts: 39
|
Hi Nic,
I'm actually pretty new to this too .Basically, I do this - opening the AVS with AVIFileOpen - Getting the video stream with AVIFileGetStream(...,StreamTypeVIDEO,...) - Getting COMPRESSOPTION for the stream with AVISaveOption - sending all the stuff to AVISaveV which popups me the ICCompressorChoose window and there I think you guess what happend ![]() In the ICCom..I dont have DivX Video Codec that shows up and using the 3.11, picture is, well, not good. I'll have a look at DVD2AVI forum, maybe we can help each other ! Edit : Hey ! We are really getting into parallel ways (however I'm planing vStrip->d2v->Frameserve to AVIfile APIs) not using DVD2AVI. I still wonder how you can go faster than fast recompress ?
__________________
Black Rose of the Artist Clan Last edited by ciler; 26th March 2002 at 10:31. |
|
|
|
|
|
#11 | Link |
|
Moderator
![]() Join Date: Oct 2001
Location: England
Posts: 3,260
|
We are doing very similar things
..my first attempt was to use AVISave also...Didn't go well, it was slow & picky for me (the problem was it needs a decompressor....I assume from one post you mention that the decompressor your using (even though YUY2 is a raw format) is an ATI one ??? Try removing that & installing the HUFFYUV codec...as that will do it too. However, that isn't the best way, Im now doing it rawly, i.e. using the ICCompress commands. This is much better & way faster (the only reason its quicker than VDub is that VDub, does checks, analyse, keyframe/scenechange analysis, etc, where as mine is just reading & writing ![]() At present, or at least last night, the code was a bit buggy on the second pass & at releasing the new AVI, but I think I've got all the bugs out now As I go along & test more ill be releasing the source so you'll be able to look & see at what im doing (im trying to do it neatly, so it shouldnt be too hard to follow I hope...)Cheers, -Nic |
|
|
|
|
|
#12 | Link |
|
Registered User
Join Date: Oct 2001
Location: France
Posts: 39
|
Alas that I don't read C++ ... (I definitely should do something about this !) The fact is that with some advise from the Master Himself (Avery lee ) I switched to AVIStreamWrite, but I can't have this function to work either. I don't think the ATI codec is the trouble 'cause VDub outputs a correct video. Obviously, there is somehow a way to tell AVIFile APIs to output in 24/32 bit but I can't figure how... On an other, I'm not getting perfectly that : > -- QUOTE -- However, that isn't the best way, Im now doing it rawly, i.e. using the ICCompress commands. This is much better & way faster (the only reason its quicker than VDub is that VDub, does checks, analyse, keyframe/scenechange analysis, etc, where as mine is just reading & writing > -- QUOTE -- I just open the stream and send samples to the new (compressed) stream, so basically, I'm obliged to use the standard decompressor. If I understand well how ICCompress work, I just have to -open the source stream -get one frame (will AVIStreamRead fit ?) -ICCompress it -send it to the new stream close stream and file and tada ! This should 'skip' the decompression that would be used with any other method if lpbiInput corresponds to an YUV format ? isn't it that ?
__________________
Black Rose of the Artist Clan |
|
|
|
|
|
#13 | Link |
|
Moderator
![]() Join Date: Oct 2001
Location: England
Posts: 3,260
|
Well, VDub will consider it Raw data & will not use a decompressor, hence, you don'y huffyuv or ATI to load YUV into VDub (Avery Lee is quite the master)
What language you using? VB? Now I understand why you used AVISaveV rather than AVISave... & how you stated you should use ICCompress was completely correct....I got stuck & was going to ask Avery, but I kind of get the feeling I may need him in the future, I don't want bug to the legend too much ![]() -Nic |
|
|
|
|
|
#14 | Link |
|
Registered User
Join Date: Oct 2001
Location: France
Posts: 39
|
Did u just mention VB No, I'm not using VB but Delphi (which don't makes a wide difference in fact). I use AVISaveV because it's array based call is convinient as delphi don't really likes to have too much parameters in a function. BTW, you seems to answer quite rapidly, so maybe we can have a chat or something. Would IRC be OK for you ? I'm often on this server : irc.u-psud.fr (port 6667) channel #naheulbeuk
__________________
Black Rose of the Artist Clan |
|
|
|
|
|
#15 | Link |
|
Moderator
![]() Join Date: Oct 2001
Location: England
Posts: 3,260
|
I reply quick, because im bored at work
lol, Ive never done chatting (actually tried it last night to get to the MCF IRC room, but failed)...So I wont for now until I get the hang of this trillian prog ![]() (Delphi & VB were the reasons the AVISaveV command was added, (stdcall & cdecl cr*p)) Cheers, -Nic |
|
|
|
|
|
#19 | Link |
|
Registered User
Join Date: Oct 2001
Location: France
Posts: 39
|
When you want guys @Nic : I can't have AVIStreamWrite to work (the source frame beeing compressed or not). Is there something special to do. Basically, it don't crash, just send an error (ie not AVIERR_OK). Can you help me ?
__________________
Black Rose of the Artist Clan |
|
|
|
|
|
#20 | Link |
|
Moderator
![]() Join Date: Oct 2001
Location: England
Posts: 3,260
|
I can try
But ill need to have more info to help.....The whole process can be quite picky (The best one is that alot of the error codes returned from AVIWriteStream are AVIERR_INTERNAL, meaning there is an internal error(!?!) Hows that supposed to help you.... )So post some info & ill try to help ![]() (i.e paramaters, etc) Cheers, -Nic |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|