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
514 stars 117 forks source link

Too long to convert mp4 -> hls #122

Closed MobileheadSherman closed 2 years ago

MobileheadSherman commented 2 years ago

Hello I m using your library for building video streaming service but too long to converting mp4 -> hls How to improve and make it faster ? Please help me. Thanks

khasanshadiyarov commented 2 years ago

@MobileheadSherman Facing the same issue, did you find any solution?

khasanshadiyarov commented 2 years ago

I have tried to use mp4->hls conversion with different videos and I see that conversion time doesn't depend on the file weight.

Tests: 13.5Mb Video -> 23sec with 26 .ts files 38.2Mb Video -> 16sec with 3.ts files

Probably it depends how your mp4 was rendered, if someone faces the same problem, try to use different videos or different export settings for your mp4 videos.

aminyazdanpanah commented 2 years ago

It depends on your hardware resources and how much resource are dedicated to the transcoding process.

MobileheadSherman commented 2 years ago

I used VPS (good performance AWS EC2 Medium)