Video hosting - compress video?

I plan to add videos to my site (1 minute or less clips for short greetings). Since this is a launch, the size of the video is very important.

  • Which format is best used to store downloaded video (for example: mp4, avi, mpeg, flv)? Requirement: the quality should be decent enough, while maintaining the file size as low as possible.

  • My platform is PHP. Are there any built-in or open-source frameworks for compressing / converting videos if the user uploads a video in a different format? For photos we use imaggemagik; is there something similar for the video?

  • Ideally, I want to avoid using a Flash video player. Is there a better option?

+4
source share
4 answers

1) What format is best used to store downloaded video - mp4, avi, mpeg, flash, etc.? (req - the quality should be decent enough, while maintaining the maximum size).

mp4 containing h.264. Then WebM as a backup.

2) My platform is in PHP, is there a built-in or open source environment for video compression / conversion if the user uploads a video in a different format? (Like for photos, we use imaggemagik, similarly nothing for video?)

ffmpeg seems popular

3) Ideally, I want to avoid using a flash drive for video, if there is a better option?

You will need Flash for backward compatibility, but between h.264 and WebM you will have widespread support for HTML 5 video.

+1
source

ffmpeg-php extension is what you need

http://ffmpeg-php.sourceforge.net/

0
source
Container

mp4 and the h264 codec is the only pair supported by all browsers.

h265 and VP9 provide better compression, but are still partially supported, and probably without hardware acceleration on most platforms.

As with h264, you will get better double encoding compression. The first pass creates statistics about the motion of the videos that are used in the second pass. Consult the ffmpeg documentation.

Also, encoding with a lower output resolution provides better quality than lowering the quality parameters. That is, if you have the original video with a resolution of 1080x720, encoding to the final (1080/3) x (720x3) output will save about 9 (3x3) bandwidth. Price quality is much better than 1080x720 streaming at 1/9 of the original bit rate. This is due to the way the brain works.

A good approach might be to offer high and medium low images, and through JS, the best video for the client. It makes no sense to broadcast fullHD to a 3G client or 1080p video for a client with a 800x400 screen.

0
source

Consider making your life easier with a service like http://m.vid.ly or a more comprehensive service like https://xmaven.com - this eliminates the headache of clutter with complex video settings and completely expands

0
source

All Articles