AVI Header
AVI Header
AVI Header
AVI Header
AVI Header
AVI Header AVI Header AVI Header AVI Header AVI Header AVI Header AVI Header AVI Header
AVI Header AVI Header
AVI Header
Go Back  Xtreme Visual Basic Talk > > > AVI Header


Reply
 
Thread Tools Display Modes
  #1  
Old 12-11-2011, 05:54 PM
Motortracker Motortracker is offline
Freshman
 
Join Date: Sep 2006
Posts: 42
Default AVI Header


HI guys/gals

i wrote a program to download and play AVI files the files are large in size and long time wise. I have the files playing as they are being downloaded but i can't see how long the file is or seek reliably.

i was reading that the AVI headers are in the last 512kb of the AVI file *why would't they put it at the start* lol so my question is is there a way to download the last 512Kb of the file i'm downloading. i have the Bytes Read and Length of the file while its downlaoding i'm just not sure where to go from there, or how to do it atleast.

If i had the length in time of the Avi file i could set the trackbar to be able to seek properly. or if someone has an idea how i could get the time of the video by using fps and some math i could prob do it that way too but idk how i would tell how i can find how many kb are in the fps i'm sure it changes so think that way is't going to be reliable.

so thinking finding out how to get the last 512kb would be the best option not sure if it can be done even. thanks for the help if you can
Reply With Quote
  #2  
Old 12-12-2011, 05:47 AM
Qua's Avatar
QuaAVI Header Qua is offline
Impetuous & volatile

* Expert *
 
Join Date: Apr 2005
Posts: 2,177
Default

You need to provide more information about which protocol you're using to download.

If you're using HTTP then I'm pretty sure you're out of luck. Other protocols do allow you you to request content from an arbitrary points in the file.
__________________
Reading is the foundation for all knowledge - Unknown.
Reply With Quote
  #3  
Old 12-12-2011, 10:37 AM
Motortracker Motortracker is offline
Freshman
 
Join Date: Sep 2006
Posts: 42
Default

iv'e tried HttpWebRequest and Weclient but if you help push me in the right direction i'll give another way a try, i'm more than welling to try to learn it .
Reply With Quote
  #4  
Old 12-12-2011, 12:00 PM
Flyguy's Avatar
FlyguyAVI Header Flyguy is offline
Lost Soul

Super Moderator
* Guru *
 
Join Date: May 2001
Location: Vorlon
Posts: 19,162
Default

Both use HTTP so you are out of luck.
Reply With Quote
  #5  
Old 12-12-2011, 12:52 PM
AtmaWeapon's Avatar
AtmaWeaponAVI Header AtmaWeapon is offline
Fabulous Florist

Forum Leader
* Guru *
 
Join Date: Feb 2004
Location: Austin, TX
Posts: 9,500
Default

There *is* a Range header in the HTTP 1.1 specification for supporting resumable downloads that may be useful. It lets you specify a range of bytes desired. Of course, you need to know the size of the file in advance to ask for the last 512kb *and* the server has to respond correctly to the header, but you're not completely out of luck.
__________________
.NET Resources
My FAQ threads | Tutor's Corner | Code Library
I would bet money 2/3 of .NET questions are already answered in one of these three places.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
AVI Header
AVI Header
AVI Header AVI Header
AVI Header
AVI Header
AVI Header AVI Header AVI Header AVI Header AVI Header AVI Header AVI Header
AVI Header
AVI Header
 
AVI Header
AVI Header
 
-->