1
Possible Duplicate:
What bunch of ffmpeg scripts do I need to run “Video for everybody”?
I am in the process of converting large, high quality, mxf container files (using mpeg-1 video, PCM S16 LE audio) to both webm and mp4 format (for HTML 5). I will probably be using ffmpeg to convert these video files. I have been testing a few files trying to find the best compramise between encode time, video quality, and file size. I'm trying to find out what settings (size, bitrate, audio bitate) would be best suited for transcoding into webm and mp4 formats for web streaming.
Results:
Test 1:
Input file size: 253mb
Input file duration: 40 seconds
1.1:
Settings: 480x360, 400kbs video, 96kbs audio, 25fps - output webm
FFMPEG string: "ffmpeg -y -I test.mfx -vcodc libvpx -acodec libvorbis -b:v 400k pr 25 -s 480x360 -b:a 96k testoutput.webm"
Results:
Encode time: 26 seconds
Output File Size: 1.84mb
Compression ratio: 137.5%
1.2:
Settings: 480x360, 400kbs video, 96k audio, 25fps - output mp4
FFMPEG string: "ffmpeg -y -I test.mxf -b 400k -r 25 -s 480x360 -ab 96k testoutput.mp4"
Results:
Encode time: 16 seconds
Output File Size: 1.95mb
Compression ratio: 129.7%
1.3:
Settings: 480x360, 250kbs video, 96kbs audio, 25fps - output webm
FFMPEG string: "ffmpeg -y -I test.mfx -vcodc libvpx -acodec libvorbis -b:v 250k pr 25 -s 480x360 -b:a 96k testoutput.webm"
Results:
Encode time: 25 seconds
Output File Size: 1.33mb
Compression ratio: 190.5%
1.4:
Settings: 480x360, 250kbs video, 96k audio, 25fps - output mp4
FFMPEG string: "ffmpeg -y -I test.mxf -b 250k -r 25 -s 480x360 -ab 96k testoutput.mp4"
Results:
Encode time: 13 seconds
Output File Size: 1.41mb
Compression ratio: 179.4%
Test 2:
Input file size: 592mb
Input file duration: 116 seconds
2.1:
Settings: 480x360, 400kbs video, 96kbs audio, 25fps - output webm
FFMPEG string: "ffmpeg -y -I test.mfx -vcodc libvpx -acodec libvorbis -b:v 400k pr 25 -s 480x360 -b:a 96k testoutput.webm"
Results:
Encode time: 109 seconds
Output File Size: 7.08
Compression ratio: 83%
2.2:
Settings: 480x360, 400kbs video, 96k audio, 25fps - output mp4
FFMPEG string: "ffmpeg -y -I test.mxf -b 400k -r 25 -s 480x360 -ab 96k testoutput.mp4"
Results:
Encode time: 50 seconds
Output File Size: 7.04mb
Compression ratio: 84%
2.3:
Settings: 480x360, 250kbs video, 96kbs audio, 25fps - output webm
FFMPEG string: "ffmpeg -y -I test.mfx -vcodc libvpx -acodec libvorbis -b:v 250k pr 25 -s 480x360 -b:a 96k testoutput.webm"
Results:
Encode time: 105 seconds
Output File Size: 5.21mb
Compression ratio: 113.5%
2.4:
Settings: 480x360, 250kbs video, 96k audio, 25fps - output mp4
FFMPEG string: "ffmpeg -y -I test.mxf -b 250k -r 25 -s 480x360 -ab 96k testoutput.mp4"
Results:
Encode time: 45 seconds
Output File Size: 4.95mb
Compression ratio: 119%
Test 3:
Input file size: 1470mb
Input file duration: 274 seconds
( Full detail results have been omitted, see summary table below, same formatting as tests 1 & 2 )
Results table
- 1.1 - webm - size: 1.84 - time: 26
- 1.2 - mp4 - size: 1.95 - time: 16
- 1.3 - webm - size: 1.33 - time: 25
- 1.4 - mp4 - size: 1.41 - time: 13
- 2.1 - webm - size: 7.08 - time: 109
- 2.2 - mp4 - size: 7.04 - time: 50
- 2.3 - webm - size: 5.21 - time: 105
- 2.4 - mp4 - size: 4.95 - time: 45
- 3.1 - webm - size: 17.12 - time: 248
- 3.2 - mp3 - size: 17.17 - time: 129
- 3.3 - webm - size: 12.21 - time 237
- 3.4 - mp4 - size: 12.10 - time: 113
Conclusion: for the smaller file size ( 274mb ) webm provides a slightly better compression ratio btu takes roughly 55% longer. On the larger file sizes the file sizes are about the same, but encoding still takes around 45-50% longer.
Finally the question for you guys:
Question:
What settings / profiles can you suggest that will provide the most effective/efficient solution for my problem.