VideoHelp Forum




+ Reply to Thread
Results 1 to 7 of 7
  1. Member
    Join Date
    Feb 2006
    Location
    Malta
    Search Comp PM
    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
    Quote Quote  
  2. Renegade gll99's Avatar
    Join Date
    May 2002
    Location
    Canadian Tundra
    Search Comp PM
    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
    Quote Quote  
  3. Member
    Join Date
    Feb 2006
    Location
    Malta
    Search Comp PM
    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
    Quote Quote  
  4. Renegade gll99's Avatar
    Join Date
    May 2002
    Location
    Canadian Tundra
    Search Comp PM
    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?
    Quote Quote  
  5. Member
    Join Date
    Feb 2006
    Location
    Malta
    Search Comp PM
    yes the problem is with this particular file only..but it is the only one that I have that is DV-AVI (PAL)....
    Quote Quote  
  6. Renegade gll99's Avatar
    Join Date
    May 2002
    Location
    Canadian Tundra
    Search Comp PM
    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.
    Quote Quote  
  7. Member
    Join Date
    Feb 2006
    Location
    Malta
    Search Comp PM
    no its only 1gig
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!