Re: Can not start playing video wherever I want in an ASF file being b
- From: "Alessandro Angeli [MVP::DigitalMedia]" <nobody@xxxxxxxxxxxxxxxxxx>
- Date: Thu, 28 Jul 2005 12:10:37 -0400
"rvfr" wrote:
> While the ASF video file is being built (using
> WriteStreamSample() or WriteSample() functions of
> WMFormat v9.5 SDK), it is impossible to start playing
> wherever I want in it (no matter the movie player chosen
> : Media Player v10, DivX v6 Player, GraphEdit, etc).
> I can only play the file by its start point.
> But when file building is finished and I open it, I can
> start playing wherever I want.
>
> Is this seek restriction a limitation of WMFormat SDK or
> of the ASF format ? Are there something I am doing bad ?
>
> I noticed (via Windows Media ASFView) on a file not
> terminated properly (after a voluntary "crash") that :
> - file duration value is 00:00.000
> - 'Broadcast' and 'Live' attributes values are '1'
> - 'Data Object' size is not set and 'Data Object'does not
> have a packet count. I am surprised that these fields are
> not updated during streaming.
> Is that the problem ?
>
> Note: I have only one stream, the video stream (no audio
> stream).
This is the correct behavior with any chunked file formats,
not just ASF. Many header values (statistical values and
chunk sizes) are not known until the end and must then be
filled in after the file is complete. The same applies to
the file index, which is written at the end of the file,
after the data chunk. Those values can not be updated at
each write for 2 reasons: the seeking will slow down the
writing and the intermediate values will be relative to an
invalid file structure. Also, the reader only reads those
values once so, it they are there, it will rely on them and
will fail to properly read the growing file. If the values
are missing, the reader will just keep on reading, but
without seeking capabilities, like with a live stream.
--
// Alessandro Angeli
// MVP :: DigitalMedia
// a dot angeli at psynet dot net
.
- Follow-Ups:
- References:
- Prev by Date: Fail to add Window media player control in Smart Device(pocketPC)
- Next by Date: Re: Can not start playing video wherever I want in an ASF file being b
- Previous by thread: Can not start playing video wherever I want in an ASF file being b
- Next by thread: Re: Can not start playing video wherever I want in an ASF file bei
- Index(es):
Relevant Pages
|
Loading