Jump to content

Live bandwidth usage.


ewoliver

Recommended Posts

ewoliver

Hey all,

 

I've set my client (iOS) to 480p/420kbit/sec. However in a 15 minute period I managed to use nearly 400MB of data.

 

My back of the napkin math seems to indicate I should have used ~46MB in the same period.

 

Any idea what's up?

Link to comment
Share on other sites

ewoliver

At the bottom of the log it shows ~48MB total data between audio and video if I'm reading it correctly. But somehow my iPhone chewed through way more than that if my pfsense logs and iPhone data log are to be believed.

 

Not sure what to make if it.

 

Edit: pretty sure I'm not reading it right

Edited by ewoliver
Link to comment
Share on other sites

Jdiesel

There is definitely something strange going on in your transcoding logs. Lots of "VBV underflow" errors which is usually an indication that your buffer size is too small. What if you raise the quality to 480p/1Mbit and try again? 

Link to comment
Share on other sites

Jdiesel

It is interesting that raising the quality decreased the overall bandwidth. My thought was that the 420Kbit/s setting was too low of a target for video itself which caused the maxbitrate setting to be ignored. Raising the quality seems to support this idea however I am not an expert on ffmpeg. Maybe someone else can chime in with some more insight. It may just be that the "maxrate" and "bufsize" needs to be tweaked for ultra low quality settings or the audio bitrate (384Kbit/s in this case, almost half of the overall bitrate) needs to be reduced.

Edited by Jdiesel
Link to comment
Share on other sites

ewoliver

It is interesting that raising the quality decreased the overall bandwidth. My thought was that the 420Kbit/s setting was too low of a target for video itself which caused the maxbitrate setting to be ignored. Raising the quality seems to support this idea however I am not an expert on ffmpeg. Maybe someone else can chime in with some more insight. It may just be that the "maxrate" and "bufsize" needs to be tweaked for ultra low quality settings or the audio bitrate (384Kbit/s in this case, almost half of the overall bitrate) needs to be reduced.

 

The overall data would have been similar if I'd have let it go for the full 15 minutes.

 

I'm wondering if ffmpeg is entirely ignoring the data setting.  Interestingly the visual quality does seem to vary based on the setting.

 

I've got CRF 22 set in the transcoding options, I don't think that should make a difference but maybe having that set causes ffmpeg to ignore the maxbitrate setting somehow.  I doubt that though because at emby's default setting it still passes CRF 23 through the options.

 

- Evan

Link to comment
Share on other sites

ewoliver

check the size of the files in the transcoding temp folder.

The files seem appropriately sized.  ~800kbps (300KB files).  I'm wondering if the way I'm accessing the server has something to do with it (through OpenVPN).  I've opened the port on my wan and I'm streaming directly as a test right now.  I'll report back in a minute.

 

As as side note, we really should have control over the audio output when we are severely constraining bitrate -- if I only want 720kbps total bitrate I probably don't need 384kbps of audio.

 

Edit: 145MB for 2.5 minutes of streaming, even directly over wan with no VPN involved.  I was really hoping the VPN was dropping tons of packets or some such and causing duplicate traffic.  No such luck.

Edited by ewoliver
Link to comment
Share on other sites

You are effectively doing that with this topic. Can you see http requests in the log? Are any of the segment files being requested more than once?

Link to comment
Share on other sites

ewoliver

The only way I would know how to do that would be on the client side, and since the client is an iPhone that's not jailbroken I don't know how to do that.

 

Is there a way to tell the server to log incoming requests?

Link to comment
Share on other sites

ewoliver

Update:

 

I tested the bandwidth useage in safari (web client) on my iPhone and found data useage to be in line with expectations. 420kbps set on client, 2.5 minute stream:

 

Expected useage 8MB, actual useage 11MB

 

So I would wager this is specific to the iOS client itself.

 

- Evan

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...