INDEX  F.A.Q.  SEARCH  LATEST POSTS     Rules  Register  Profile  Private messages  Login


Search all forums or this forum: Advanced search
Streams in AVI File

Forum Index -> Video -> Programming Printer-friendly version
Reply to topic
Author Message
sheva777
Member


Joined: 22 Feb 2006
Location: Malta

Post Posted: Feb 27, 2006 04:13 Posts Comp View users profile Send private message Reply with quote

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

Post Posted: Feb 27, 2006 05:39 Posts Comp View users profile Send private message Reply with quote

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

Post Posted: Feb 27, 2006 05:44 Posts Comp View users profile Send private message Reply with quote

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

Post Posted: Feb 27, 2006 05:56 Posts Comp View users profile Send private message Reply with quote

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

Post Posted: Feb 27, 2006 06:02 Posts Comp View users profile Send private message Reply with quote

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

Post Posted: Feb 27, 2006 06:04 Posts Comp View users profile Send private message Reply with quote

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

Post Posted: Feb 27, 2006 06:43 Posts Comp View users profile Send private message Reply with quote

no its only 1gig

Reply to topic All times are GMT - 6 Hours
Forum Index -> Video -> Programming Page 1 of 1





You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Jump to:  
Display:   
About   Advertise   Forum Archive   RSS Feeds   Statistics