Reputation: 1840
I'm making a website that is something like "youtube" which allows people to upload their videos and then playback within that site.
I'm using Videojs for the video playback and I'm trying to use ffmpeg for converting their videos to a smaller file size but remain almost the same quality as the original.
For now, I'm not sure which format should I choose from. I tried mp4 and webm and sometimes the file size after I convert to mp4 is smaller than webm but, it is also sometimes larger than the original file size. I don't know which is the best format in terms of file size and quality. I'm hoping to convert any video file to a smaller file size.
The command that I'm using now is "ffmpeg -i test.mov test.mp4" and "ffmpeg -i test.avi test.webm"
Anyone could recommend me the best one? In terms of file size and also the quality. Thanks
Upvotes: 0
Views: 2470
Reputation: 1840
Just in case if others need this. I'm using this to convert any video file to mp4 for online web videos. The command that I'm using is "-b:v 200k -vcodec libx264 -acodec aac -b:a 96k -strict -2" I think this is well optimized for file size and quality. If anyone else have a better one, please do share. Thanks!
Upvotes: 1