|
|
| toomore |
Posted: Dec 18 2002, 06:00 PM |
 |
|
Unregistered

|
I've I couldn't get the correct audio frame count of a AVI file by use its StreamInfo structure. So I try to use the AVIStreamRead API to test the audio frame count repeatly. It works well when I read some avi file which less than 2GB, but when I use it to analyse a big avi file(8.2GB), the API return an error. These're my code: LONG hr; int StartSample; int EndSample; int i; int AudioFrameCount = 0; LONG ActualBytes; LONG ActualSamples;
StartSample = AVIStreamStart(pAVIStream); EndSample = AVIStreamEnd(pAVIStream);
for (i = StartSample; i < EndSample; i += ActualSamples) { hr = AVIStreamRead(pAVIStream, StartSample, AVISTREAMREAD_CONVENIENT, NULL, 0, &ActualBytes, &ActualSamples); if (0 != hr) { //some error processing } else ++AudioFrameCount; }
I've read the VirtualDub Source, but I can't understand the source. It's seems use some low-level file I/O API to read the data of a AVI file, not Microsoft's AVI API. Should I do the same thing? Thanks. |
 |
| fccHandler |
| Posted: Dec 18 2002, 06:31 PM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
Hello.
Microsoft's AVI API freaks out with files larger than 2GB. (I wouldn't call it a bug, though, since no AVI 1.0 file should ever be that big.) You could try using VirtualDub to save a segmented AVI (each segment < 2GB) and then I guess you could use the API to parse the segments.
Other than that, you'll have to write your own parser.
-------------------- May the FOURCC be with you... |
 |
| muf |
| Posted: Dec 20 2002, 05:38 PM |
 |
|
MCF team member
  
Group: Moderators
Posts: 179
Member No.: 46
Joined: 21-July 02

|
| QUOTE (fccHandler @ Dec 18 2002, 12:31 PM) | Hello.
Microsoft's AVI API freaks out with files larger than 2GB. (I wouldn't call it a bug, though, since no AVI 1.0 file should ever be that big.) You could try using VirtualDub to save a segmented AVI (each segment < 2GB) and then I guess you could use the API to parse the segments.
Other than that, you'll have to write your own parser.  |
OpenDML and a non-FAT (NTFS, ext2, etc) filesystem should be able to become over 4 GB.
--------------------
 |
 |
| fccHandler |
| Posted: Dec 20 2002, 07:03 PM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
@muf: I assume the file is OpenDML since he says it's 8.2GB. Can the Windows API parse OpenDML?
-------------------- May the FOURCC be with you... |
 |
| muf |
| Posted: Dec 20 2002, 07:27 PM |
 |
|
MCF team member
  
Group: Moderators
Posts: 179
Member No.: 46
Joined: 21-July 02

|
| QUOTE (fccHandler @ Dec 20 2002, 01:03 PM) | | @muf: I assume the file is OpenDML since he says it's 8.2GB. Can the Windows API parse OpenDML? |
If it wouldn't, the purpose of OpenDML would be quite useless. Btw, OpenDML is quite old. I wouldn't know why win98 and up wouldn't support it.
--------------------
 |
 |
| phaeron |
| Posted: Dec 20 2002, 10:26 PM |
 |
|

Virtualdub Developer
  
Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02

|
DirectShow can parse OpenDML hierarchical indexing information, but AVIFile, which you are using, cannot. Microsoft hasn't done anything to VFW for a long time except port it to Win64. |
 |