| Author |
Message |
sheva777 Member
Joined: 22 Feb 2006 Location: Malta
|
|
Any idea what is happening here >>
I am using AVIFileGetStream...and i am passing mmioFourCC("vids")..to get the video stream...but null is returned...the file that I'm reading is a DV file saved as an AVI (DV-AVI PAL)...
Thanks
|
|
gll99 Renegade
Joined: 31 May 2002 Location: Canadian Tundra
|
|
If all you are doing is accessing the streams from an existing avi then do an AVIFileOpen API call from the vfw avifil32.dll and then use the AVIFileGetStream API call from the same lib with the streamtypeVIDEO parameter to find the video stream and streamtypeAudio to get the audio.
You didn't specify which language ...For example in vb6:
Assuming you have made all the necessay lib declares
Dim res As Long 'returns the result code
Dim PInputAVIFILE As Long 'PInputAVIFILE is a pointer to the open file handle
Dim SourceAviFile As String 'SourceAviFile is a string which contains the path and name of your avi file
res = AVIFileOpen(PInputAVIFILE, SourceAviFile, OF_SHARE_DENY_WRITE, 0&)
res = AVIFileGetStream(PInputAVIFILE, InputAVISTREAM, streamtypeVIDEO, 0)
Remember to close the open streams and files when you are done to prevent memory leaks.
btw) I'm using the mavidecs.bas by Ray Mercer in my vb projects which has stream constants defined as equivalent to the mmio strings
Last edited by gll99 on Feb 27, 2006 05:48, edited 1 time in total
|
|
sheva777 Member
Joined: 22 Feb 2006 Location: Malta
|
|
my problem is that i'm getting a null pointer when I pass streamtypeVIDEO, then I tried to put 0 instead of streamtypeVIDEO and a pointer is returned...but I don't know to which stream its pointing
|
|
gll99 Renegade
Joined: 31 May 2002 Location: Canadian Tundra
|
|
How large is your dv. I tried a 16 gig dv in one of my projects and it returned ok but I couldn't preview the input video and the ouput was garbage. I tried a short cut (directstreamcopy in vdub) of the same clip of about 300MB and I was able to read and recompress the video and audio using my project with no problems.
Is this the only file you have problems with?
|
|
sheva777 Member
Joined: 22 Feb 2006 Location: Malta
|
|
yes the problem is with this particular file only..but it is the only one that I have that is DV-AVI (PAL)....
|
|
gll99 Renegade
Joined: 31 May 2002 Location: Canadian Tundra
|
|
But is it over 4 gig (the vfw limit)? Try cutting a small piece and recheck it gspot to make sure it's still dv and then retry it.
|
|
sheva777 Member
Joined: 22 Feb 2006 Location: Malta
|
|
|
|