Coder Social home page Coder Social logo

bihicheng / python-video-converter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from senko/python-video-converter

0.0 2.0 0.0 4.54 MB

Python Video Converter (ffmpeg wrapper)

Home Page: http://vault.senko.net/components/python-video-converter/doc/index.html

python-video-converter's Introduction

Video Converter

Build Status

Video Converter is a Python module for converting video files from one format and codec to another.

It uses the FFmpeg multimedia framework for actual file processing, and adds an easy-to-use API for probing and converting media files on top of it.

Quickstart

from converter import Converter
c = Converter()

info = c.probe('test1.ogg')

conv = c.convert('test1.ogg', '/tmp/output.mkv', {
    'format': 'mkv',
    'audio': {
        'codec': 'mp3',
        'samplerate': 11025,
        'channels': 2
    },
    'video': {
        'codec': 'h264',
        'width': 720,
        'height': 400,
        'fps': 15
    }})

for timecode in conv:
    print "Converting (%f) ...\r" % timecode

Documentation and tests

There's a fair amount of documentation in doc/ directory. To generate it from Sphinx sources, use:

python setup.py doc

and then visit doc/_build/html/index.html.

To run the automated tests:

python setup.py test

The test suite assumes you already have the required ffmpeg and ffprobe tools installed on your system.

Installation and requirements

To install the package:

python setup.py install

Note that this only installs the Python Video Converter library. The ffmpeg and ffprobe tools should be installed on the system separately, with all the codec and format support you require.

If you need to compile and install the tools manually, have a look at the example script test/install-ffmpeg.sh (used for automated test suite). It may or may not be useful for your requirements, so don't just blindly run it - check that it does what you need first.

Authors and Copyright

Copyright © 2011-2013. Python Video Converter contributors. See the AUTHORS.txt File.

Licensing and Patents

Although FFmpeg is licensed under LGPL/GPL, Video Converter only invokes the existing ffmpeg executables on the system (ie. doesn’t link to the ffmpeg libraries), so it doesn’t need to be LGPL/GPL as well.

The same applies to patents. If you’re in a country which recognizes software patents, it’s up to you to ensure you’re complying with the patent laws. Please read the FFMpeg Legal FAQ for more information.

python-video-converter's People

Contributors

cepreu2github avatar kami avatar koles46 avatar legrisdev avatar marvin avatar mutschler avatar ouhouhsami avatar senko avatar tahajahangir avatar

Watchers

 avatar  avatar

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.