Hi,
This is a commonly requested feature. I have plans to implement it
after the next release.
I'll have to choose a proper XML parser (probably expat), and support
the XML format used by flvtool, or one of the formats I have posted at
http://schemas.flvmeta.org/.
I guess I can easily support YAML and JSON, too, as flvmeta embeds
YAML and JSON parsing libraries.
About flvtool, if you have a local ruby installation, you only have to
type "gem install flvtool2" which will create the appropriate wrapper
script which you'll be able to execute as if it were a native
executable program. You'll then be able to locate the flvtool ruby
files on your system using your favorite search tool, and start to
hack at your leisure :)
No compilation will be ever involved, ruby was designed like this,
write scripts, and execute them directly.
I believe implementing cuepoint injection in flvmeta might require a
relatively deep knowledge of the source code, but it's GPL, so you can
do whatever you want with it, as long as anything you release is GPL
too !
Now for the technical details, there are a few things that must be
taken into account.
First of all, if cuepoints are injected in the metadata tag, it will
cause the onMetadata tag to become bigger, therefore, all existing
keyframe indices will become invalid because the file offsets will
have changed too, so you'll have to recompute every keyframe offset by
adding the difference between the size of the metadata before, and
after the injection.
It becomes more complicated if the cuepoints are injected at various
points in the file, because the same problem will apply, but the new
offsets will have to be computed differently after each cuepoint is
inserted, so you'll have to modify the onMetadata tag after having
written the file once, causing another write, this time only modifying
existing data, since the onMetadata tag will not become bigger by only
modifying the existing numeric offsets to keyframes.
It is also possible to compute all offsets before writing the file, by
keeping all AMF cue points in memory, and adding their total size to
the correct offsets of the metadata that will have to be kept in
memory too...
It should be very fast with flvmeta, depending on the file size, of
course. At least, the speed should be comparable to the current
metadata injection speed.
Chatting will be difficult for me, I have very little time to do so,
better use the flvmeta dev group to discuss about it.
If you need any pointer to start hacking flvmeta, please don't
hesitate, I should find a moment to reply (but don't expect me to
reply immediatly ;-) ).
Regards,
Marc
On Mar 30, 5:07 pm, aditya <
adi...@gmail.com> wrote:
> Ok i got the answer from thishttp://
stackoverflow.com/questions/5486081/flvmeta-add-cuepoints-to-f....