• Stars
    star
    450
  • Rank 97,143 (Top 2 %)
  • Language
    Python
  • Created about 15 years ago
  • Updated almost 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Quicktime atom positioning in Python for fast streaming

Quicktime/MP4 Fast Start

Enable streaming and pseudo-streaming of Quicktime and MP4 files by moving metadata and offset information to the front of the file.

This program is based on qt-faststart.c from the ffmpeg project, which is released into the public domain, as well as ISO 14496-12:2005 (the official spec for MP4), which can be obtained from the ISO or found online.

The goals of this project are to run anywhere without compilation (in particular, many Windows and Mac OS X users have trouble getting qt-faststart.c compiled), to run about as fast as the C version, to be more user friendly, and to use less actual lines of code doing so.

Features

  • Works everywhere Python (2.6+) can be installed
  • Handles both 32-bit (stco) and 64-bit (co64) atoms
  • Handles any file where the mdat atom is before the moov atom
  • Preserves the order of other atoms
  • Can replace the original file (if given no output file)

Installing from PyPi

To install from PyPi, you may use easy_install or pip:

easy_install qtfaststart

Installing from source

Download a copy of the source, cd into the top-level qtfaststart directory, and run:

python setup.py install

If you are installing to your system Python (instead of a virtualenv), you may need root access (via sudo or su).

Usage

See qtfaststart --help for more info! If outfile is not present then the infile is overwritten:

$ qtfaststart infile [outfile]

To run without installing you can use:

$ bin/qtfaststart infile [outfile]

To see a list of top-level atoms and their order in the file:

$ bin/qtfaststart --list infile

If on Windows, the qtfaststart script will not execute, so use:

> python -m qtfaststart ...

History

  • 2013-08-07: Copy input file permissions to output file.
  • 2013-08-06: Fix a bug producing 8kb mdat output.
  • 2013-07-05: Introduced Python 3 support.
  • 2013-07-05: Added launcher via 'python -m qtfaststart'.
  • 2013-07-05: Internal refactoring for clarity and robustness. Functions now work with named tuples. Backward compatability is maintained. Expect a future, backward-incompatible release to replace other functions.
  • 2013-07-05: Created an Atom namedtuple to represent a fourcc atom (name, stream position, and size).
  • 2013-01-28: Support strange zero-name, zero-length atoms, re-license under the MIT license, version bump to 1.7
  • 2011-11-01: Fix long-standing os.SEEK_CUR bug, version bump to 1.6
  • 2011-10-11: Packaged and published to PyPi by Greg Taylor <gtaylor AT duointeractive DOT com>, version bump to 1.5.
  • 2010-02-21: Add support for final mdat atom with zero size, patch by Dmitry Simakov <basilio AT j-vista DOT ru>, version bump to 1.4.
  • 2009-11-05: Added --sample option. Version bump to 1.3
  • 2009-03-13: Update to be more library-friendly by using logging module, rename fast_start => process, version bump to 1.2
  • 2008-10-04: Bug fixes, support multiple atoms of the same type, version bump to 1.1
  • 2008-09-02: Initial release

License

Copyright (C) 2008 - 2013 Daniel G. Taylor <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

aglio

An API Blueprint renderer with theme support that outputs static HTML
CoffeeScript
4,746
star
2

huma

Huma REST/HTTP API Framework for Golang with OpenAPI 3.1
Go
1,895
star
3

python-betterproto

Clean, modern, Python 3.6+ code generator & library for Protobuf 3 and async gRPC
Python
1,513
star
4

jpeg-archive

Utilities for archiving JPEGs for long term storage.
C
1,161
star
5

apisprout

Lightweight, blazing fast, cross-platform OpenAPI 3 mock server with validation
Go
639
star
6

restish

Restish is a CLI for interacting with REST-ish HTTP APIs with some nice features built-in
Go
497
star
7

nesh

An enhanced, extensible interactive shell for Node.js and CoffeeScript
CoffeeScript
287
star
8

openapi-cli-generator

Generate a CLI from an OpenAPI 3 specification
Go
154
star
9

arista

Arista Transcoder
Python
120
star
10

ladon

A small, simple cross-platform utility to process many files in parallel.
JavaScript
81
star
11

braintree_django

Braintree Django Module
Python
52
star
12

atom-api-blueprint-preview

Live preview API Blueprint in Atom
CoffeeScript
45
star
13

html5-space-fighter

HTML5 Space Fighter Game
JavaScript
30
star
14

apilint

Extensible REST API linter utility
JavaScript
27
star
15

malt.io

Malt.io free community for brewers
Python
26
star
16

qtrotate

Tools for handling rotated Quicktime/MP4 files
Python
26
star
17

qtfaststart.js

Javascript version of qt-faststart
JavaScript
21
star
18

guid-tool-web

GUID conversion tool website
Python
18
star
19

atom-language-api-blueprint

API Blueprint and MSON grammars for the Atom.io text editor.
CoffeeScript
14
star
20

django-ccss

Django CleverCSS
Python
13
star
21

tech-talk

Markdown slideshows with a built-in terminal that just works
JavaScript
13
star
22

mexpr

Micro expression parser library for Go
Go
12
star
23

node-desktop-uploader

Recursively watch directories and upload new/updated files
CoffeeScript
11
star
24

shorthand

Structured data & CLI shorthand syntax for Go
Go
10
star
25

atom-monokai-extended

Extended Monokai theme for the Atom text editor
CSS
9
star
26

unistyle

β„±π’Άπ“ƒπ’Έπ“Ž π˜π—²π˜…π˜ 𝘴𝘡𝘺𝘭𝘦𝘴 𝔣𝔬𝔯 GΜ³oΜ³lΜ³aΜ³nΜ³gΜ³ in a compact, zero dependency library.
Go
7
star
27

guid-tool

A tool to convert between various forms of GUID
Python
7
star
28

ffmpeg

FFmpeg + patches
C
7
star
29

eidolon

Generate JSON or JSON Schema from Refract & MSON data structures
CoffeeScript
6
star
30

paodate

Simpler Python date handling
Python
5
star
31

mateo

A simple API description interface library
JavaScript
5
star
32

sdt

Structured Data Templates
Go
4
star
33

peasant

An opinionated Node.js ES6 module lint/build/test/coverage helper
JavaScript
3
star
34

dotfiles

My public dotfiles to help bootstrap a new machine
Shell
3
star
35

polaris

Lightweight backend utilities for static websites
CoffeeScript
3
star
36

apiscrub

OpenAPI Scrubber
Python
3
star
37

bible-ref

Utilities for handling Bible references
CoffeeScript
2
star
38

homebrew-restish

Homebrew Tap for Restish https://rest.sh/
Ruby
2
star
39

casing

An intelligent casing conversion library for Go
Go
2
star
40

injectobot

Developer-friendly programmable IRC bot
CoffeeScript
2
star
41

huma-build

Docker build utility for Huma REST OpenAPI projects
Go
2
star
42

rhs-color

R.H.S. color conversion utilities
JavaScript
2
star
43

apibin

Example API with modern features
Go
2
star
44

nesh-hello

A simple example plugin for Nesh, the Node.js enhanced shell.
JavaScript
1
star
45

arista-website

Arista Transcoder Website
JavaScript
1
star
46

gaaflora-website

http://www.gaaflora.com/
HTML
1
star
47

vscode-sdt

Visual Studio Code support for Structured Data Templates
JavaScript
1
star