Giter Site home page Giter Site logo

riyaskp / php-video-transcoder Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 70 KB

Transcode video to mp4 and generate thumbnail. Yii2, ffmpeg, rabbitmq and aws s3

License: GNU General Public License v3.0

PHP 91.02% Batchfile 1.57% Shell 4.61% CSS 2.81%

php-video-transcoder's Introduction

VideoTranscoder PHP Yii2, ffmpeg, rabbitmq, AWS s3(optional)

VideoTranscoder convert video to mp4 format and generate a thumbnail.

CURL STRUCTURE

curl -X POST \
  http://YOUR_IP/upload \
  -H 'cache-control: no-cache' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -F name=THE-FILE-NAME \
  -F notify_url=THE-POST-HOOK-URL(Optional) \
  -F bucket=true(Optional to upload to s3) \
  -F [email protected]

CONFIGURE AWS S3

Add your S3 detail in config/params.php

's3key' => '**********',
's3secret' => '*********',
's3region' => 'us-east-2',
's3bucket' => '*********'

CONFIGURE RabbitMQ

RabbitMQ detail in config/rabbitmq.php

'connections' => [
    [
        'host' => '192.168.*.***',
        'port' => '5672',
        'user' => 'admin',
        'password' => '*******',
        'vhost' => '/',
        'heartbeat' => 0,
    ],
],

INSTALLATION

Docker

run

composer install
docker-compose up --build

once the docker is build, connect to docker container by

docker-compose exec app /bin/bash

In docker container

cd /var/www/html/transcoder
supervisord -c supervisord.conf

The curl url is localhost:5080

Manual

Install ffmpeg, rabbitmq

Clone this repository

run composer install

php-video-transcoder's People

Contributors

riyaskp avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.