Video Optimization

I am doing a project in video optimization, I am using FFmpeg, jw player as player, i think to  convert all videos to FLV, mp4, preference to mp4. I want to know the best methods for video optimization without loosing the quality
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
If you are talking going to web, you need to make the video smaller in file size so there will be some quality lost no matter what you do.  First, choose the h.264 format. There are a handful of things that effect the quality and size but I have found the bit rate to be most important.   I typically max it out at 1000kbps for web.  The other thing is to keep the size in ratio and the frame rate should not be above 30

H264, 320x240, 30fps, VBR 1 pass 700 kbps (target), 1,000 kbps (maximum).
Rakesh2013Author Commented:
I am working on a project similar to youtube, users will upload different file formats, aspect ratio, resolution etc. i want to convert the video and need to keep the quality as much as possible. i am developing on php.
Rakesh2013Author Commented:
@padas: thanks for the links.
Learn SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
If you are using youtube, I would just the default settings for 720p or 1080p HD and let youtube processing down size. In other words, just upload directly from your camera to youtube.  Or if you are editing, just save for desktop play before uploading.  It will be a lot easier for you.  Video takes a long time to deal with.  I would only monkey with the settings I have shown if you are hosting the video on your own.
Rakesh2013Author Commented:
I am not uploading my videos to youtube, I am doing a project similar to Youtube, I want to know when a user upload a video, the best way to save that video to the my server
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
Encoding video can be complex and youtube/vimeo have it figured out.  If you are going to display video on your site, beyond encoding, you are really best off using a CDN to serve your video.  A CDN distributes your one file across their network and allows somebody in California to access the California server and somebody in New York access the New York server.   There is not going to be a server in each state, but a handful across the country and world.  One of many CDN's is

As far as format, you will want to try and use h.264, ogg and webm.  One option is using as a player.  You can use multiple formts and the browser will select the first one it recognizes.
<video id="example_video_1" class="video-js vjs-default-skin"
  controls preload="auto" width="640" height="264"
 <source src="" type='video/mp4' />
 <source src="" type='video/webm' />
 <source src="" type='video/ogg' />

Open in new window

I like using as well

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.