Important facts about commercial licenses

  • Licenses are perpetual. They do not expire and do not need to be renewed.
  • Licenses can be upgraded. You can upgrade to a more expensive license later paying only the difference in cost.
  • Pay attention to the distribution type - Hosted (sites / servers), binary (applications) or source (includes all the others). Choose according to your needs (more below).
  • All licenses allow commercial use unless otherwise indicated.
  • Read the full license by clicking on the icon.
  • Read more about licenses in our handy license guide.
Free

MIT license

The MIT license is an
open-source license.
You need to log-in or create an account
  • Create an account
  • Log-in
  • Please use your real name.
  • Account activation link will be sent to this address.
  • Minimum 8 characters

Clicking this button confirms you read and agreed to the terms of use and privacy policy.

(1 ratings)

Video Converter

Video Converter
Developed by Dobar Kod, Released May 8, 2011

A python module for video conversion, inspection and thumbnail generation, built on top of ffmpeg

Python

Tags: converter , encoder , ffmpeg , video

Video Converter 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.

Supported codecs and formats:

  • source: any format or codec that's supported by ffmpeg
  • target formats: Ogg, AVI, Matroska, WebM, FLV, Mov, MP4, MPEG-TS
  • target video codecs: Theora, H.264/AVC, DivX, VP8, H.263, Flv, MPEG-1, MPEG-2.
  • target audio codecs: Vorbis, AAC, MP3, MP2

Features:

  • Pythonic, clean, extensible code
  • extensive unit tests
  • tested on Python version 2.5, 2.6, 2.7
  • uses ffmpeg utilities, doesn't need to be linked against ffmpeg library itself

Module documentation is available here.

This module uses the ffmpeg utilities to do the actual media processing, and so requires them to be installed on the system (either system-wide, or to a custom location). Support for a particular format/codec depends on the underlying ffmpeg utilities being compiled with support for it.

Back to top

Quick Start

Import the module and create the Converter object:

>>> from converter import Converter
>>> c = Converter()

Examine video file:

>>> info = c.probe('test1.ogg')
>>> info.format.format
'ogg'
>>> info.format.duration
33.0
>>> info.video.codec
'theora'
>>> info.audio.codec
'vorbis'
>>> info.video.video_width
720
>>> info.video.video_height
400

Resize the video:

>>> conv = c.convert('test1.ogg', '/tmp/output.ogg', {
        'format': 'ogg',
        'video': {
                    'codec': 'theora',
                    'width': 160,
                    'height': 120,
                    'fps': 15,
                    'bitrate': 300 },
        'audio': {
                    'codec': 'vorbis',
                    'channels': 1,
                    'bitrate': 32 }  })

>>> for timecode in conv:
        pass

Extract a thumbnail from the frame 10 seconds in the video:

>>> c.thumbnail('test1.ogg', 10, '/tmp/shot.png')
View all 1 reviews »

User Reviews

  • Philip Kahn 6 months ago
    It looks solid, but all the paths are hard-coded for Linux and it doesn't play nice with Windows.
    Flag
    Was this helpful? Yes No

Questions & Comments


Or enter your name and Email
No comments have been posted yet.
You must be logged-in to vote. Log-in to your account or register now.