Skip to main content

Introduction

ztfy.media is a ZTK/ZopeApp ZTFY package used to automatically convert and display medias files (audios, videos…).

It was developed in the context of a medias library management application handling several kinds of medias (mainly images, videos, and audio files), to be able to automatically display these contents in web pages.

Medias conversions

Automatic medias conversions implies several pre-requisites:

  • the ‘’ffmpeg’’ executable must be available in your path;

  • you have to rely on a ZEO connection handling a blobs cache directory;

  • you have to create and register (with a name) this ZEO connection in your site management folder (see ztfy.utils.zodb.ZEOConnection object);

  • you have to create and register (without name) a ZTFY medias conversion utility.

Medias conversion utility allows you to define listening address and port of a ZeroMQ process which will wait for conversions requests. These requests are automatically done when an IObjectAddedEvent is notified on a IFile object containing contents for which a converter has been registered; default converters based on FFmpeg are available for images, video and audio files, but you can provide your own converters for any kind of custom file.

Medias conversion utility also allows to define in which formats you want to convert the new medias. All conversions are actually done with the help of FFmpeg, each conversion being done in a dedicated sub-process handling it’s own ZEO connection.

Converted medias are stored in the ZODB as Blob files in the original media file annotations.

HISTORY

0.1.12

  • added configuration options to medias converter to force conversion of medias already provided in target content type. This can be required if uploaded medias don’t provide properties for correct random access to any part of the video or audio file.

0.1.11

  • updated FlowPlayer fonts path in CSS

  • corrected logger name

  • removed missing imports

0.1.10

  • corrected conversions code (based on “pyams_media” package source code) to use libAV ‘avconv/avprobe’ tools

  • added MP4 and WebM conversions options

  • updated FlowPlayer to release 6.0.5

  • updated medias previews

0.1.9

  • corrected video frame size names array

0.1.8

  • added small check in requested formats

0.1.7

  • use new “getMagicContentType()” function from ztfy.extfile package

  • use non-empty suffix when detected content-type is unknown

0.1.6

  • added flush on some video output files

  • added sound file thumbnail in audio preview

  • always use temporary files for Quicktime video conversions

0.1.5

  • automatically include a video player watermark on videos thumbnails

  • updated video preview template

0.1.4

  • reset video bitrate command line option to “-b” (instead of “-b:v”) to be compatible with all FFmpeg versions

  • updated video preview for Firefox compatibility

0.1.3

  • added one second before checking ZMQ processes startup

  • updated package resources

0.1.2

  • register ZMQ medias converter process exit callback

0.1.1

  • removed forgotten ‘print’ statement

  • update README

0.1.0

  • first release

Release files for ztfy.media 0.1.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ztfy.media 0.1.12
File Size Uploaded
ztfy.media-0.1.12.tar.gz 451.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ztfy.media 0.1.12
File Interpreter ABI Platform
ztfy.media-0.1.12-py2.7.egg Legacy Egg format - - Details

Total release size: 1.1 MB

Release files / ztfy.media-0.1.12.tar.gz

Download URL ztfy.media-0.1.12.tar.gz
Size 451.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4e6acc3f5abc869e57cb6fbfb7db40b3311d75e470af50f008bf79ef476b628e
BLAKE2b-256 checksum
How to use checksums
ef84dcb20dce01f772e58c8a3e95d7bc6949885dbbe073b17bacab0992fb3d69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / ztfy.media-0.1.12-py2.7.egg

Download URL ztfy.media-0.1.12-py2.7.egg
Size 611.0 kB
Tags Egg
SHA-256 checksum
How to use checksums
8039fe54d8a9b84f435ad665d1db9152d1239fa923286ba3759d8cdecc794a73
BLAKE2b-256 checksum
How to use checksums
27ef1447c4d000056f581345467e209eaf268eae47b2b3867e8d53bcf32be162
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.12 This release

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page