General considerations when compressing videos, for PC and/or mobile devices (Flash / HTML5)
support, other, video, compression, general, h.264, html5
When compressing videos in H.264 format it is a good practice to look for an option to optimize (or prepare) the compressed videos for "streaming" or "fast start".
Internet (computer) is different from television, television displays videos in an interlaced way* and computers display videos in a progressive way*. If your source video is interlaced (most videos recorded by video cameras are) then you will need to deinterlace it before encoding it, or you can also use the deinterlace option that is built-in the majority of compression programs. If your source video is NOT interlaced, then the best thing to do is not to deinterlace it in order to produce a higher quality encoded video.
*More info about progressive vs interlaced video here:
Wikipedia: Progressinve scan
Wikipedia: Interlaced video
Please, finde bellow two tables with recommended settings for compressing videos in H.264 format. In general, these settings produce very good quality videos (depending on the compression/encoding software being used).
Note: The following recommended settings should only be used as a starting point. Visible video quality also depends on the encoding software. We recommend to experiment with your tools and different settings until you get the desired results.
Setting | Value | |||||
Total Bit Rate - approx - (WebTV Quality) |
500Kbps | 700Kbps | 1000Kbps | 1250Kbps | HD 720p 2000Kbps |
HD 1080p 3500Kbps |
File Name | Use .mp4 file extension. Do not use special characters (tildes, etc.). | |||||
Video Track | ||||||
Codec | H.264 | |||||
Profile | "Main" or "Baseline" (level 3.0)* | |||||
Para Flash + HTML5 (General: better quality) |
Main* | Main* | Main* | Main* | Main* | Main* |
For Flash + HTML5 (Better mobile compatibility) |
Baseline | Baseline | Baseline | Baseline | Main* | Main* |
Frame Reordering | No | No | No | No | Yes - if available - | Yes - if available - |
Optimize for | "Streaming" / "Fast start" / "Web Optimized" | |||||
Compression Quality | High / Best - if available - | |||||
Frame Rate | 25 (PAL) 29.97 (NTSC) 30 (NTSC) |
|||||
Bit Rate | 450 kbits/sec | 604 kbits/sec | 904 kbits/sec | 1122 kbits/sec | 1902 kbits/sec | 3378 kbits/sec |
Dimensions | 512 x 288 | 640 x 480 | 720 x 480 ( NTSC) 720 x 576 (PAL) |
720 x 480 ( NTSC) 720 x 576 (PAL) |
1280 x 720 | 1920 x 1080 |
Audio Track | ||||||
Codec |
AAC: for Flash + HTML5 - better mobile compatibility - MP3: for Flash Only compatibility. |
|||||
Sample Rate | 32, 44 or 48 kHz | |||||
Channels | Mono | Stereo | Stereo | Stereo | Stereo | Stereo |
Bit Rate | 96 Kbps | 128 Kbps | 128 Kbps | 128 Kbps | 160 Kbps | 160 Kbps |