0

I am developing a E-Learning website where people can upload videos.

When someone uploads a video, they usually upload it in 1080p full HD which is good. Now the issue is that when people watch the videos, they are only in 1080p and some people have bad internet (including myself) so watching a video in 1080p is not optimal.

So I assume that converting the video to different formats (720p, 360 etc..) is the best way to go here. So I tried using FFMpeg, and it works, but its really slow, especially since some videos are over 10 minutes long and over 1gb in size.

I use this command in FFMPEG:

ffmpeg -i video.mp4 -vf scale:1280:720 -strict -2 output.mp4

This works, but its really slow.

Is there any better way to do this? Since some people upload 5-10 videos and every video has to be in 3 different formats (1080p(original) 720p, 360p).

Can someone give me some guidelines how to tackle this issue, as this kind of stops the website from progressing atm.

Thanks

  • 1
    It could be faster. It depends on the CPU and memory available in the machine you are converting these videos, and the scaling algorithm. See also http://stackoverflow.com/questions/33338536/what-is-the-fastest-way-to-scale-down-a-h264-video-in-21 for more guidance. – F.Igor Apr 12 '17 at 16:08
  • You could also accomplish this using a video API, that does the uploading, transcoding and delivery for you where it will automatically create the appropriate formats/dimensions for you (360p,720p,1080p) as well as do adaptive streaming. If that sounds like something you could use for your solution check out: www.synq.fm – l33tstealth Apr 12 '17 at 18:02
  • @l33tstealth What do you mean by video API, can you give some more details about these. – Suraj Gupta Jul 10 '18 at 12:36
  • @SurajGupta, no problem video APIs let you do various things with online video, such as uploading, playback and encoding. A few companies doing this in the video space are: mux.com, bitmovin.com,vidyard.com, cloudinary.com, AWS Elemental Mediaconvert API , I recommend looking these up to get a better idea of the APIs available for online video. – l33tstealth Jul 13 '18 at 04:59

0 Answers0