quasarstream / PHP-FFmpeg-video-streaming

📼 Package media content for online streaming(DASH and HLS) using FFmpeg
https://www.quasarstream.com/op/php/ffmpeg-streaming?u=php-ff
MIT License
516 stars 118 forks source link

can we run this in cron alert #62

Closed ngcgolf11 closed 4 years ago

ngcgolf11 commented 4 years ago

can we run this one on cron alert and it will automatically do all the things. can it automatically detect input video resolution and transcode the video according to predefined streams can we use widewine or any drm tool with this one please help me in this matter.

aminyazdanpanah commented 4 years ago

You should create your own script to transcode your videos and run in it on a corn job. You can also use some libraries such as Symphony(The Console Component) and Laravel(Queues).

You can use any DRM system such as Google's Widevine., Microsoft's PlayReady, and so on. You just need to fetch encryption keys from these DRM systems and encrypt your stream with the key you got. For example, you can use Guzzle to fetch the key and encrypt your stream using FFmpeg.

See here for more information.

aumkarthakur commented 4 years ago

I have actually achieved it it's really easy all you have to do is create a php script which read all uploaded video and transcode it. I have a cronjob hitting that script every 10 min. So when any user upload any video after 10 min it gets transcoded and uploaded to AWS S3.

This was all possible because of this amazing library by @aminyazdanpanah .

Below are few screenshots:

Screenshot 2020-06-21 at 7 22 03 PM Screenshot 2020-06-21 at 7 21 43 PM Screenshot 2020-06-21 at 7 21 19 PM

ngcgolf11 commented 4 years ago

@aumkarthakur Can you share me your php script please I am requesting you bro

aumkarthakur commented 4 years ago

@ngcgolf11 Sorry bro but it's Intellectual property of IPSTUDIO (the company I work for). I have no right over it.

ngcgolf11 commented 4 years ago

can you guide me how i can write code or any sample on the base of my own code