<p>Since bandwidth is fixed, first step to maximize quality is to full use that bandwidth so bitrate should be set to that number.</p>

<p>Frame rate will make a modest difference, once a fixed bitrate is specified, since typically x264 places keyframes 250 frames apart and so all or most frames in a random second are delta frames, so leave that between 24 to 30.</p>

<p>For keeping a given quality, size increases, but not linearly, with resolution. So 1080p, with 2.25 times the no. of pixels as 720p, takes around, say, 1.5 to 1.8 times to keep the same quality. This choice depends entirely on the nature of content. For live-action material, 480p is good enough. Remember, till the advent of HD a decade ago, American television audiences had been watching 480i feeds for decades. For 2D animation, with sharp edges, 720p may be a better choice.</p>

CC BY-SA 3.0
2016-02-10T06:05:40.933Z
And, for a fixed byte rate, what's the difference between reducing resolution vs leaving it untouched and letting the codec decide how to compress the image best?
Guig
CC BY-SA 3.0
2016-02-10T06:26:41.213Z
What's the source resolution and the display resolution?
Gyan
CC BY-SA 3.0
2016-02-10T09:22:02.843Z
Source varies from 1080p to 4k. I'm targeting mobile, so height of 1000+px. Also, to make things more complicated, I'm working on 360 videos so what is shown on the screen is only part of the video that is streamed
Guig
CC BY-SA 3.0
2016-02-10T09:33:54.950Z
The encoder doesn't decide whether to reduce resolution. It works with the raw uncompressed frames it's given and does the best it can given the constraints you set. So, for a given bitrate, pick the lowest resolution that looks good on the display you're streaming to.
Gyan
CC BY-SA 3.0
2016-02-10T05:48:32.497Z
2016-02-10T05:48:32.497Z
Gyan
<p>I want to stream a video on a device full screen (therefore, the dimensions of the display are fixed)</p>

<p>What should I focus on to offer the best experience for a given bandwidth? Should I have other concerns than bandwidth (GPU...)?</p>

<p>Here is my understanding so far:</p>

<ul>
<li><p>fps is very straightforward in how it works. I don't seen a big difference between 15fps - 30fps+ (compare to the other parameters I can change) But since videos are compressed based on frames deltas, I'm not sure caping fps save any noticeable bandwidth. It might save GPU decoding and rendering, but I'm not sure of that either: Let say the screen has a refresh rate of 60Hz, would that help to have a video fps of 15 vs 30? It still probably helps on the decoding, but most devices are fine with those rates.</p></li>
<li><p>dimensions (ie 720p, 2k...) The video will be stretched or reduced to fit screen size. For a constant byte rate, Do I get a different result with a 480p with 0.1 byte/pixel/frame ratio vs than a 720p with a 0.04 byte/pixel/frame (~same total) ?</p>

<ul>
<li>Would the response change if the size of the screen is roughly 480p vs much larger?</li>
<li>Does that impact decoding/rendering at all? I guess decoding because you have to decode every pixel. Not sure about rendering since the size of the displayed video is fixed.</li>
</ul></li>
<li><p>Finally byte rate. This is the closest parameter to the bandwidth constraint. Is fixing byte rate gonna find the best compromise to do to offer the best quality, or should I still change other parameters?</p>

<ul>
<li>Does changing keyframes frequency lower the bandwidth used (while having the downsides of having less keyframes like for seeking)</li>
</ul></li>
</ul>

<p>(I'm using ffmpeg h264 encoder)</p>

<streaming><framerate><compression><keyframes>
How to compromise between byte rate, resolution and fps
Guig
# How to compromise between byte rate, resolution and fps

(Asked by: username_0 on 2016-02-10)

I want to stream a video on a device full screen (therefore, the dimensions of the display are fixed)

What should I focus on to offer the best experience for a given bandwidth? Should I have other concerns than bandwidth (GPU...)?

Here is my understanding so far:

* fps is very straightforward in how it works. I don't seen a big difference between 15fps - 30fps+ (compare to the other parameters I can change) But since videos are compressed based on frames deltas, I'm not sure caping fps save any noticeable bandwidth. It might save GPU decoding and rendering, but I'm not sure of that either: Let say the screen has a refresh rate of 60Hz, would that help to have a video fps of 15 vs 30? It still probably helps on the decoding, but most devices are fine with those rates.
* dimensions (ie 720p, 2k...) The video will be stretched or reduced to fit screen size. For a constant byte rate, Do I get a different result with a 480p with 0.1 byte/pixel/frame ratio vs than a 720p with a 0.04 byte/pixel/frame (~same total) ?

  + Would the response change if the size of the screen is roughly 480p vs much larger?
  + Does that impact decoding/rendering at all? I guess decoding because you have to decode every pixel. Not sure about rendering since the size of the displayed video is fixed.
* Finally byte rate. This is the closest parameter to the bandwidth constraint. Is fixing byte rate gonna find the best compromise to do to offer the best quality, or should I still change other parameters?

  + Does changing keyframes frequency lower the bandwidth used (while having the downsides of having less keyframes like for seeking)

(I'm using ffmpeg h264 encoder)

**Tags:** streaming, framerate, compression, keyframes


---

## 1 answers

### Answer by username_1 on 2016-02-10. Score: 1 | Accepted answer

Since bandwidth is fixed, first step to maximize quality is to full use that bandwidth so bitrate should be set to that number.

Frame rate will make a modest difference, once a fixed bitrate is specified, since typically x264 places keyframes 250 frames apart and so all or most frames in a random second are delta frames, so leave that between 24 to 30.

For keeping a given quality, size increases, but not linearly, with resolution. So 1080p, with 2.25 times the no. of pixels as 720p, takes around, say, 1.5 to 1.8 times to keep the same quality. This choice depends entirely on the nature of content. For live-action material, 480p is good enough. Remember, till the advent of HD a decade ago, American television audiences had been watching 480i feeds for decades. For 2D animation, with sharp edges, 720p may be a better choice.

> **Comments:**
> **username_0**: And, for a fixed byte rate, what's the difference between reducing resolution vs leaving it untouched and letting the codec decide how to compress the image best?  
> **username_1**: What's the source resolution and the display resolution?  
> **username_0**: Source varies from 1080p to 4k. I'm targeting mobile, so height of 1000+px. Also, to make things more complicated, I'm working on 360 videos so what is shown on the screen is only part of the video that is streamed  
> **username_1**: The encoder doesn't decide whether to reduce resolution. It works with the raw uncompressed frames it's given and does the best it can given the constraints you set. So, for a given bitrate, pick the lowest resolution that looks good on the display you're streaming to.  

---

