Giter Club home page Giter Club logo

python-webm's Introduction

Python-WebM
===========

The python-webm package is an interface to the Google WebM new video/image codec
which promise a better compression of image and video data.
The interface uses ctypes to call the libvpx/libwebm Google libraries installed
in the system.
At the moment only the libwebm library is wrapped and with some limitations.


Platforms
---------

Here a list of platforms with the current support status of the python-webm
package:

* Windows: SUPPORTED
* Ubuntu: SUPPORTED
* Mac OS X: SUPPORTED


Prerequisites
-------------

Below a list of prerequisites to use the python-webm package:

* Python 2.6.5+ (http://www.python.org)
* Python nose (http://code.google.com/p/python-nose)
* libwebp from sources (http://www.webmproject.org/code/#webp-repositories) or
  binary distribution for the target OS
* Python PIL (http://www.pythonware.com/products/pil)

If you are installing the WebP library by sources remember to compile and
install libwebp after libvpx. To compile and/or install every library following
the instructions shipped within.


Usage
-----

Decode and encode functions are defined int the respective webm.decode and
web.encode modules.

Functions to convert YUV images to RGB[A]/BGR[A] are available in the webm.yuv
module. At the moment the result image is in greyscale format due to a
uncompleted conversion algorithm.


Unit testing
------------

To run the unit tests you must first install the Python nose package from the
official web site http://code.google.com/p/python-nose or from PyPI (preferred)
by running:

  $ easy_install nose

Nose is a very helpful library to discover, manage and run unit tests. If you
are lazy and you want to run the tests immediately just run:

  $ nosetests -s -x

to discover and run the unit tests, without capturing the stdout (-s) and
stopping the tests at the first fail or error (-x).

python-webm's People

Contributors

expobrain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

python-webm's Issues

call to _decode() results in segmentation fault

What steps will reproduce the problem?
1. WEBP_IMAGE_DATA = bytearray(file(raw_image, "rb").read())
2. result = decode.DecodeRGB(WEBP_IMAGE_DATA)
3. observe crash

What is the expected output? What do you see instead?
call should return None for failure

What version of the product are you using? On what operating system?
python-webm-0.2.2
libwebp-dev 0.1.3-3+nmu1
libwebp2 0.1.3-3+nmu1

Please provide any additional information below.
in _decode() the call bitmap_p = decode_func(str(data), size, width, height) 
returns None and there is no check for None. The subsequent call
memmove(bitmap, bitmap_p, size) causes a segfault.

Original issue reported on code.google.com by [email protected] on 2 Oct 2014 at 6:15

Attachments:

support for lossless modes

I've added support for lossless modes to the copy we have in tree.

Please consider merging, this is trivial stuff:
http://xpra.org/svn/Xpra/trunk/src/xpra/codecs/webm/encode.py

Original issue reported on code.google.com by [email protected] on 27 May 2013 at 10:18

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.