Le 26 juil. 2010 à 16:54, Johannes Raggam a écrit :

> hey plone devs,
> 
> while analyzing the collective.flowplayer code i came across the hachoir
> library which is used by p4a.video for metadata parsing of binary files.
> 
> the hachoir [1] library handles much more file types (e.g. mp4) than the
> FLVHeader parser implementation in collective.flowplayer.flv.
> 
> i've created an development branch on my github site [2] (no discussion
> about using github for development branches, please) where the hachoir
> library is used (besides a minor code cleanup).
> 
> is there any reason why the hachoir library isn't used by collective
> flowplayer?

No, and it would certainly be a good citizen for portal_transforms.

> 
> one thing against hachoir might be that it's slower than the FLVHeader
> implementation. i've written a test (test_metadata_profiling) which
> tracks the time for parsing the barsandtones.flv file found in the tests
> package of c.flowplayer (it's not a unittest in the correct sense). the
> results on my machine are:
> - FLVHeader: about 0.00053 seconds
> - Hachoir:   about 0.06162 seconds
> so FLVHeader is much faster. but in my opinion this might not be a
> problem for c.flowplayer since parsing flvfiles doesn't happen too
> often.

Hi, this is not a problem since metadata are sampled from the file at edit 
time, and not at publication time. 0.006 sec is nearly nothing compared with 
the time spent indexing these metadata.

hachoir is a pretty good module that's already used by other good Plone 3rd 
party extensions like atreal.richfile.metadata, p4a and perhaps others.

> 
> if you use mr.developer and want to try out my branch, just add the
> following to the appropriate places in your buildout config:
> 
> """
> [buildout]
> always-checkout = true
> auto-checkout +=
>    collective.flowplayer
> 
> [sources]
> collective.flowplayer = git
> git://github.com/thet/collective.flowplayer.git
> 
> """
> 
> [1] http://pypi.python.org/pypi/hachoir-metadata
> [2] http://github.com/thet/collective.flowplayer
> 
> _______________________________________________
> Product-Developers mailing list
> [email protected]
> http://lists.plone.org/mailman/listinfo/product-developers

_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to