Re: Can not start playing video wherever I want in an ASF file being b



"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


.



Relevant Pages

  • Can not start playing video wherever I want in an ASF file being b
    ... playing wherever I want in it (no matter the movie player chosen: ... Is this seek restriction a limitation of WMFormat SDK or of the ASF format? ... I have only one stream, the video stream. ...
    (microsoft.public.windowsmedia.sdk)
  • Re: Can not start playing video wherever I want in an ASF file being b
    ... > While the ASF video file is being built (using WriteStreamSample() or ... > Is this seek restriction a limitation of WMFormat SDK or of the ASF ...
    (microsoft.public.windowsmedia.sdk)
  • Re: FiltersAsync sample with WMA?
    ... > memory byte stream instead of from a file. ... the stock file source filter does using the registry (but it ... nothing about the stream format. ... (WMA is an audio-only ASF). ...
    (microsoft.public.win32.programmer.directx.audio)
  • CAsfMuxFilter audio/video sync problem
    ... Back here again after a few more days of investigating ASF streaming ... same when the stream is rendered to a file. ... when I add both audio and video input to the Asf ... So it seems like there is a problem in the ASF mux filter, ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: SCR in ASFs structure (two audio streams in WMP solution?)
    ... so that's the reason for using ASF. ... I have two ASF files working with the seeking: 2 Audio Stream Audio ...
    (microsoft.public.windowsmedia.sdk)

Loading