开发者

using FFMPEG to convert to MP4 with maximum browsers compatibilty

开发者 https://www.devze.com 2023-03-18 21:24 出处:网络
I\'m converting from WMV to FLV using FFMPEG, and my problem is that the FLV videos are so big! the 15 minutes video\'s size ranges between 150MB and 1GB!

I'm converting from WMV to FLV using FFMPEG, and my problem is that the FLV videos are so big! the 15 minutes video's size ranges between 150MB and 1GB!

I'm using the following FFMPEG command to convert and split WMV videos :

nohup nice -1 ffmpeg -y -ss 00:00:00 -t 00:15:00 -async 1 -i INPUT.WMV -acodec libmp3lame OUTPUT.FLV

And I've tried converting to MP4 before and the video size was much smaller than the FLV video.

So my questions are:

  • Would the MP4 videos have any compatibility issues browsers?
  • Would it work on iPhone, iPad? (I know FLV videos doesn't 开发者_如何学Pythonwork on iPhones or iPads)
  • What is the best FFMPEG command to convert to MP4 without losing the quality of the video?


A few points...

  1. Video size has to do with the bit rate, dimension, and codec. It does not have anything to do with the container.
  2. You can certainly expect 15 minutes of video to be large, assuming you want more than a postage stamp for viewing area. This is normal.
  3. Any time you re-compress something, you are going to lose quality. There is no way around this. You might be able to keep most quality by recompressing at a higher bitrate, but this defeats what you are trying to accomplish.

Bottom line, unless you need to, don't do it. Simply encode your videos at the appropriate bitrate to begin with.


For converting any video to mp4, use:

ffmpeg.exe -i INPUT.wmv -vcodec libx264  -sameq OUTPUT.mp4

If the quality is too low on that then set the bitrate to be around what you want:

ffmpeg.exe -i INPUT.wmv -vcodec libx264  -b 500k OUTPUT.mp4

The output mp4 file plays in Flash, browsers that support H.264 MPEG4, iOS, and Android.

0

精彩评论

暂无评论...
验证码 换一张
取 消