2017 © Pedro Peláez
 

symfony-bundle video-bundle

Video bundle for Symfony 2

image

wotek/video-bundle

Video bundle for Symfony 2

  • Tuesday, August 27, 2013
  • by wotek
  • Repository
  • 0 Watchers
  • 0 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

VideoBundle

Build Status, (*1)

VideoBundle is a result of me learning Symfony2 Framework. I do hope you find it useful., (*2)

Features:, (*3)

  • Uploads video through provider API
  • Keeps track of uploaded files

Supported API's:, (*4)

  • Vimeo

1) Requirements

Bundle heavily depends on great REST client library Guzzle., (*5)

  • Guzzle (@see https://github.com/guzzle/guzzle)

If you don't have Composer yet, download it following the instructions on http://getcomposer.org/ or just run the following command:, (*6)

curl -s http://getcomposer.org/installer | php

Install VideoBundle

# Composer will automaticaly download & install & modify your composer.json
composer require wotek/video-bundle:dev-master

2) Configuration

Register bundle

# source: app/AppKernel.php
$bundles = array(
  // ...
  new Wtk\VideoBundle\WtkVideoBundle(),
  // ...
);

Update database schema

Movies bundle uses one table movies where movie metadata is held., (*7)

Create database if not already have it?, (*8)

app/console doctrine:database:create

Create database tables:, (*9)

app/console doctrine:schema:create

... or migrate database:, (*10)

app/console doctrine:schema:update

Providers

For now bundle consumes only Vimeo API. You need to configure access to API in app/config/config.yml configuration file., (*11)

Example:, (*12)

wtk_video:
  providers:
      vimeo:
          consumer_secret:    API Consumer
          consumer_key:       API Consumer Key
          token:              Token
          token_secret:       Token secret

3) Usage

Bundle provides (only) command line interface to manage video uploads., (*13)

Available commands:

Movie upload

Uploads given file using configured providers., (*14)

movies:upload [--provider="..."] [--path="..."] [--title[="..."]] [--description[="..."]]

Options:
 --provider            Provider name
 --path                Path to file
 --title               Uploaded video title (optional)
 --description         Video description (optional)

Currently there is not verbose information when file is being uploaded., (*15)

Example usage:, (*16)

$ app/console movies:upload --path=tofik.mov \
--title="Tofik" \
--description="Tofik is just jumping around" \
--provider=vimeo

Uploading tofik.mov this might take a while. Hold on. Go get a coffee
File id: 73208538 uploaded.
List uploaded movies

Lists all uploaded movies., (*17)

movies:list

Options:
 None

Outputs:

+----+----------+----------------------------------+----------+-----------+
| ID | RemoteID | Checksum                         | Provider | Completed |
+----+----------+----------------------------------+----------+-----------+
| 1  | 73206060 | 92513815a44ea80099f46bf8a871cd62 | vimeo    | 1         |
| 2  | 73208538 | 445df168c31e07ef806c788f8420e1fa | vimeo    | 1         |
+----+----------+----------------------------------+----------+-----------+
Get movie details

Retrieves movie details from API., (*18)

Usage:
 movies:details [--provider="..."] [--id="..."]

Options:
 --provider            Provider name
 --id                  Movie id

Outputs:

+--------------------+-----------+
| Property           | Value     |
+--------------------+-----------+
| generated_in       | 0.0165    |
+--------------------+-----------+
| [ ... ]            | [ ... ]   |
+--------------------+-----------+

The Versions