Search code examples
androidiosyoutubevideo-captureh.264

H.264, 720p Video Bitrate


Disclaimer: I know very little about Video codecs & encoding.

I'm developing an iOS and Android app that allows users to record videos. I want to be able to upload the videos to YouTube & have them play at 720p quality.

The videos I'm recording will always be less than 180 seconds, always be ~30fps and will always have audio.

  1. As far as I can tell, this means I need to record at a resolution of 1280x720, then I should be good. Is this correct?
  2. I'm trying to determine how large, on average, an H.264 video file will be per second of video. From my understanding, I need to know the bitrate of the videos. What will the bitrate of recorded H.264 video be on Android 2.2+, and iOS 5+? This Android developer page mentions a bitrate of "2Mbps" for "HD" video - is that 2 Megabytes per second or 2 Megabits per second? Will that rate be the same for any recorded H.264 video?

Part of the reason I'm so confused about this is because I did a test with 4 different Android-encoded videos of different lengths, and produced the following output;

File Size vs Time for Android-encoded H.264 videos

Wtf!?

Bonus points if you can link me to some iOS developer docs detailing this information - I've searched and can't find anything.

EDITS:


Solution

    1. Yeah, 720p stands for 1280x720. I think it is correct.
    2. To define how large your video file will be, you should record at a constant bitrate(CBR), but I doubt the camera will be using CBR while VBR(variable bitrate) is more efficient.
      Mbps stands for Megabits per second.
      I doubt that the rate will be the same as I stated earlier VBR could be used.

    Edit:
    Judging from the graph, it is definitely a VBR.