Hello all,

First thanks to the developers for an awesome effort, and a very usable 
open source application.  :)

What I'm doing is the following:

1) capture live video from webcam (format is MP4 in AVI) using mencoder 
to capture and also transcode on the fly to FLV
2) use flvtool2 to annotate captured file with FLV metadata for 
duration, keyframes, etc
3) resulting file progressive download/streamed using lighttpd (I am 
considering moving to red5)

Now, on to the questions.  I've scanned the last few months archive of 
this list, and I haven't found answers (I think ;) ), so here we go.

Is the FLV metadata (duration, keyframe info, etc) all in the header at 
the beginning of the file, or is it also spread out through the file?  
Looking at annotated FLV files with a hex editor leads me to think it's 
at the beginning, but I downloaded and read the FLV/SWF spec

** WARNING DEVELOPERS THAT NEED TO NOT KNOW THE SPEC, SKIP UNTIL YOU SEE 
/WARNING  **
(that's for those who reverse engineer and thus cannot read the spec)

and while the spec confuses me a bit, it leads me to believe that the 
metadata is spread throughout the file.

** /WARNING OKAY, IT'S SAFE TO READ BELOW **

I've scanned the red5 code but I'm still confused (maybe I need to read 
it more thoroughly).  I've also looked at the flvtool2 code, but I'm not 
a Ruby guy, and it doesn't look sane.  Also there's a Python lib called 
"flashticle" that I'm looking at but so far I haven't answered my question.

Next question, about live vs. progressive streaming.  I'm using the same 
process above to capture and transcode video, but then immediately 
streaming it out to a browser/player without doing the metadata 
annotation step.  I was hoping the player would be able to treat video 
it's already played as if it were annotated, i.e., I wanted the player 
to be able to move backwards in the stream with the scrubber, and then 
jump back to the front of the stream, catching the live video again.  
What happens instead is that
the player plays the whole stream back from where it started, rather 
than being able to move to an arbitrary point in the past, and it can't 
get back to the start without reloading.

Is this normal behavior when streaming live?  Is it a characteristic of 
the specific player I'm using?  (I'm using a commercial player with some 
custom modifications, done by the vendor).

If this is simply how live streaming works, and the FLV metadata needs 
to be part of the file, I am considering developing a mechanism to add 
FLV metadata annotation to the transcoding step.  However, I know that 
duration can't be set - it's not known until the streaming stops!  But, 
can flash players be "tricked" by something like, say, setting duration 
to 0 or -1 or 99999?


Thanks to all for taking the time to read this long-winded post!


Cheers,

Robert

_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to