PHPackages                             oktolab/media-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. oktolab/media-bundle

ActiveSymfony-bundle[Image &amp; Media](/categories/media)

oktolab/media-bundle
====================

In- and exportable media-metainformations with RESTful Api

1.0.19(7y ago)038221MITPHP

Since Jun 11Pushed 7y ago1 watchersCompare

[ Source](https://github.com/OKTOTV/OktolabMediaBundle)[ Packagist](https://packagist.org/packages/oktolab/media-bundle)[ Docs](https://github.com/OKTOTV/OktolabMediaBundle)[ RSS](/packages/oktolab-media-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (21)Used By (1)

OktolabMediaBundle
==================

[](#oktolabmediabundle)

In- and exportable media-metainformations with Api.

Notice: Standalone, the OktolabMediaBundle isn't very useful. It is intended to be overwritten and extended. Check out the OktoMediaBundle () for a more finished and ready to use Bundle.

Installation
------------

[](#installation)

```
composer require oktolab/media-bundle

```

Activate Bundle

```
//AppKernel.php
    public function registerBundles()
    {
        $bundles = array(
          ...
          new Okto\MediaBundle\MediaBundle(),
          ...
        );
    }
```

Configure Bundle
----------------

[](#configure-bundle)

```
# resolve target entities for Media linking

orm:
    resolve_target_entities:
        Oktolab\MediaBundle\Entity\EpisodeInterface: Okto\MediaBundle\Entity\Episode

oktolab_media:
    # enitites
    episode_class: "Your\Name\Space\For\Episode" # namespace to your Episode
    media_class: "Oktolab\MediaBundle\Entity\Media" # usually you dont need to change this
    series_class: "Your\Name\Space\For\Series" # namespace to your Series
    asset_class: "Your\Name\Space\For\Asset" # see the BprsAssetBundle for more information!
    # work in progress
    stream_class: "Your\Name\Space\For\Stream # used for livestreams. still work in progress

    # cornerbug settings
    origin:
        url: "https://your.websi.te" #https://www.oktolab.at
        position: "top-right" #top-right | top-left | bottm-right | bottom-left
        margin: "8" # pixel margin inset for cornerbug to player
        logo:  # link to the logo (png, jpeg). can even be a svg

    # encoding settings
    keep_original: true # if you want to keep the original uploaded video when encoding
    resolutions:
        720p: # your resolution
            name: 720p # name that can be displayed in your player/media
            type: "video" # video | audio  Audio isn't used very much, but should work
            sortNumber: 1 # sorts episode media by number
            stereomode: 0 # 0 = regular video, 1 = monoscopic, 2 = top/bottom 3 = left/right
            video_codec: h264 # the name of the codec you want to use
            video_framerate: 50/1 # frames per second you want to use
            video_width: 1280 # pixel width of video
            video_height: 720 # pixel height of video
            video_bitrate: 5000000 # maximum average bitrate to accept before reencoding
            crf_rate: 23 # see h264 crf_rate at ffmpeg doku. the lower, the better the videoquality but the file will be bigger
            preset: "veryslow" # ultrafast|superfast|veryfast|faster|fast|medium|slow|slower|veryslow|placebo gives the encoder more time to be efficient, resulting in a smaller file with equal quality. Increases the time it takes to encode by A LOT.

            audio_codec: aac # codec you want to use for your audio
            audio_sample_rate: 48000 #sample rate for your audio
            audio_bitrate: 256000 #bitrate for your audio
            container: mov # container you want to use
            public: true # flag for your media. can be used to show or hide media
            adapter: "video" # the filesystem adapter to use after encoding for this resolution
     #work in progress
    streamservers:
        player_url: #the public side stream CDN link
        rtmp_url:  #the private side RTMP Server url. Nginx or Wowza, etc.
        rtmp_control: #the private side RTMP Control module URl. (see Nginx rmtp_module)

    player_type: jwplayer (you can implement any other player like for example flowplayer, etc.
    player_url:  the javascript link for your player.

    encoding_filesystem: "cache" # the name of your filesystem to use for ffmpeg to write the temporary files to.
    posterframe_filesystem: "posterframe" # the name of the filesystem to use for posterframes
    sprite_fileystem: "posterframe" # the name of the filesystem to use for sprites
    default_filesystem: "video" # fallback filesystem if nothing else is defined
    serializing_schema: # the serializing schema to use for importing external episodes and series!
    worker_queue: oktolab_media # the worker queue for encoding episodes. see BprsCommandLineBundle for more
    sprite_worker_queue: oktolab_media_sprite # the worker queue for sprites
    sprite_height: 180 # defines the resolution for sprite images
    sprite_width: 320 # defines the resolution for sprite images
    sprite_interval: 5 # defines the minimum interval for sprites being made. Will automatically be higher if the video is longer

    api_urls:
        # defines what urls can be offered for API use. default urls are:
        'oktolab_media_api_list_series'
        'oktolab_media_api_show_series'
        'oktolab_media_api_list_episodes'
        'oktolab_media_api_show_episode'
        'oktolab_media_api_show_asset'
        'oktolab_media_api_import_series'
        'oktolab_media_api_import_episode'
        'oktolab_media_embed_episode'
        'oktolab_media_caption_for_episode'
        'oktolab_media_origin_for_episode'
        # these and your urls will be added to the bprs_applinkhelper service as available_apis. See BprsAppLinkBundle for more info

# You'll need to configure the bprsAssetBundle!
# Example

oneup_flysystem:
    adapters:
        gallery:
            local:
                directory: %kernel.root_dir%/../web/uploads/posterframes
        video:
            local:
                directory: %kernel.root_dir%/../web/uploads/videos

    filesystems:
        gallery:
            adapter: gallery
            mount: gallery
        video:
            adapter: video
            mount: video

oneup_uploader:
    chunks:
        maxage: 86400
        storage:
            directory: %kernel.cache_dir%/uploader/chunks
    mappings:
        gallery:
            frontend: blueimp
            storage:
                type: flysystem
                filesystem: oneup_flysystem.gallery_filesystem
        video:
            frontend: blueimp
            storage:
                type: flysystem
                filesystem: oneup_flysystem.video_filesystem

  bprs_asset:
      class:  "Your\Name\Space\For\Asset"
      filesystem_map: oneup_flysystem.mount_manager
      worker_queue: %worker_queue%
      adapters:
          gallery:
              url:  "http://YourProject/uploads/posterframes"
              path: "/path/to/your/assets/web/uploads/posterframes"
          video:
              url:  "http://YourProject/uploads/videos"
              path: "/path/to/your/assets/web/uploads/videos"
```

Routing
-------

[](#routing)

```
oktolab_media:
    resource: .
    type: oktolab_media
```

You can always adapt and overwrite this Bundle AND the routing with Bundle Inheritance and an advanced routing loader This bundle comes with a predefined jms serializer configuration for series and episodes (and can be directly used with elastica bundle) Notice: Bundle Inheritance is deprecated starting with Symfony3. You can still overwrite any part of this Bundle ()

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 98.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

20

Last Release

2853d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8308048b9a592599fa611b4b41964382146ee4b5f309fed00aa214ffff6ab5b3?d=identicon)[SrgSteak](/maintainers/SrgSteak)

---

Top Contributors

[![SrgSteak](https://avatars.githubusercontent.com/u/8882558?v=4)](https://github.com/SrgSteak "SrgSteak (272 commits)")[![EDV4BIZ](https://avatars.githubusercontent.com/u/31078768?v=4)](https://github.com/EDV4BIZ "EDV4BIZ (3 commits)")[![gries](https://avatars.githubusercontent.com/u/417823?v=4)](https://github.com/gries "gries (1 commits)")

---

Tags

mediarestful

### Embed Badge

![Health badge](/badges/oktolab-media-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/oktolab-media-bundle/health.svg)](https://phpackages.com/packages/oktolab-media-bundle)
```

###  Alternatives

[essence/essence

Extracts information about medias on the web, like youtube videos, twitter statuses or blog articles.

770562.9k3](/packages/essence-essence)[s9e/text-formatter

Multi-purpose text formatting and markup library. Plugins offer support for BBCodes, Markdown, emoticons, HTML, embedding third-party media (YouTube, etc...), enhanced typography and more.

2413.1M29](/packages/s9e-text-formatter)[dereuromark/media-embed

A PHP library to deal with all those media services around, parsing their URLs and embedding their audio/video content in websites.

182530.3k11](/packages/dereuromark-media-embed)[cohensive/embed

Media Embed (for Laravel or as a standalone).

120370.4k](/packages/cohensive-embed)[classic-o/nova-media-library

Tool and field that will let you managing files and add them to the posts

154172.0k](/packages/classic-o-nova-media-library)[kunstmaan/media-bundle

To build your perfect website you probably need images, video's or maybe even a presentation too. The Kunstmaan Media Bundle handles all those media assets and centralizes them so you can find your content just the way you like it: fast and efficiently. No central asset management module is useful without some pretty advanced image editing functionality. To provide this we have integrated the Aviary image editing service right from the interface.

38132.9k7](/packages/kunstmaan-media-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
