Jump to content

[3.3.0.0/3.3.1.0] stream quality settings not working in web application


Recommended Posts

Posted (edited)

Hi,

 

it seems that the stream quality settings in the web application are broken. The dropdown lists a multitude of options for resolution and bit rate combinations (144p up to 1080p@60 Mbps), but none of them can be selected. The selection is set to "auto (720p - 1.5 Mbps)" when the stream starts and none of the other available options stick after selection. The user selection is entirely ignored.

  • This behavior can be observed or all video files
  • It spans across multiple browsers/platforms as it is reproducible for
    • Firefox 59 and the current Chrome Canary on Windows 7 (desktop case)
    • Chromium 65 on Android 8.1 (mobile case)
  • There are no global bandwidth limits maintained on the server
  • There are no user-specific bandwidth limits maintained
  • The server and the desktop are located in the same subnet of a switched gigabit network
  • The mobile device is on a low traffic WIFI network with very good reception (SNR >35 dBm)
  • I'm running Emby Server 3.3.0.0 in a FreeBSD 10.3 jail (from package not ports).
  • FFmpeg version is 3.4.2,1

Stats for nerds:

Playback Info
	Player: Html Video Player
	Play method: Transcode
	Protocol: https
	Stream type: HLS

Video Info
	Player dimensions: 1728x944.0999755859375
	Video resolution: 720x360
	Dropped frames: 0
	Corrupted frames: 0

Transcoding Info
	Video codec: H264
	Audio codec: AAC
	Bitrate: 1.5 Mbps
	Transcoding progress: 2.0%
	Reason for transcoding: Media bitrate exceeds limit.

Original Media Info
	Container: webm
	Bitrate: 12.2 Mbps
	Video codec: H264 High
	Video bitrate: 12.2 Mbps
	Audio codec: EAC3
	Audio bitrate: 448 kbps
	Audio channels: 6
	Audio sample rate: 48000 Hz

Transcoding:

https://172.22.22.122:8920/emby/videos/132a95a2162a553ecc8e97b96bb0914b/hls1/main/0.ts?DeviceId=6521083d0205baf76e949813b97e9ada&MediaSourceId=132a95a2162a553ecc8e97b96bb0914b&VideoCodec=h264&AudioCodec=mp3,aac&AudioStreamIndex=1&VideoBitrate=1116000&AudioBitrate=384000&PlaySessionId=bf10ff4553ac4676a5a054b8af60b860&api_key=<redacted>&TranscodingMaxAudioChannels=2&RequireAvc=true&Tag=e9fc8fad20d6aed334388af521a5dcb4&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&h264-profile=high,main,baseline,constrainedbaseline,high10&h264-level=51&h264-deinterlace=true&TranscodeReasons=ContainerBitrateExceedsLimit

Media Info:

Format                                   : Matroska
Format version                           : Version 4 / Version 2
File size                                : 5.01 GiB
Duration                                 : 58 min 53 s
Overall bit rate                         : 12.2 Mb/s
Encoded date                             : UTC 2018-02-02 19:01:29
Writing application                      : mkvmerge v19.0.0 ('Brave Captain') 64-bit
Writing library                          : libebml v1.3.5 + libmatroska v1.4.8

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.1
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, RefFrames               : 4 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 58 min 53 s
Bit rate                                 : 11.7 Mb/s
Width                                    : 1 920 pixels
Height                                   : 960 pixels
Display aspect ratio                     : 2.000
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.265
Stream size                              : 4.82 GiB (96%)
Writing library                          : x264 core 152 r2851kMod ba24899
Encoding settings                        : cabac=1 / ref=4 / deblock=1:-3:-3 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / fade_compensate=0.00 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=48 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=0 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=8 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc=crf / mbtree=0 / crf=17.0000 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.30 / pb_ratio=1.20 / aq=3:0.80
Language                                 : English
Default                                  : Yes
Forced                                   : No

Audio
ID                                       : 2
Format                                   : E-AC-3
Format/Info                              : Enhanced Audio Coding 3
Format profile                           : E-AC-3+Atmos / E-AC-3
Codec ID                                 : A_EAC3
Duration                                 : 58 min 2 s
Bit rate mode                            : Constant
Bit rate                                 : 448 kb/s
Channel(s)                               : 15 objects / 6 channels
Channel positions                        : 15 objects / Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 kHz
Frame rate                               : 187.500 FPS (256 SPF)
Compression mode                         : Lossy
Stream size                              : 186 MiB (4%)
Language                                 : English
Service kind                             : Complete Main
Default                                  : Yes
Forced                                   : No

Text #1
ID                                       : 3
Format                                   : UTF-8
Codec ID                                 : S_TEXT/UTF8
Codec ID/Info                            : UTF-8 Plain Text
Duration                                 : 54 min 57 s
Bit rate                                 : 66 b/s
Count of elements                        : 723
Stream size                              : 26.7 KiB (0%)
Language                                 : English
Default                                  : No
Forced                                   : No

[... more subtiles in other languages... removed for brevity]

Any help would be greatly appreciated. Thanks!

 

 

 

Edit: attached server and transcoding log files

Edit2: attached system.xml

ffmpeg-transcode.txt

server.txt

system.xml

Edited by best boy
Posted (edited)

I attached the requested log files to the OP.

 

Of most interest are probably these probing requests:

2018-03-16 23:49:02.640 Info HttpServer: HTTP GET https://172.22.22.122:8920/emby/Playback/BitrateTest?Size=500000. UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3372.0 Safari/537.36
2018-03-16 23:49:02.661 Info HttpServer: HTTP Response 200 to 172.22.22.11. Time: 21ms. https://172.22.22.122:8920/emby/Playback/BitrateTest?Size=500000 
2018-03-16 23:49:02.667 Info HttpServer: HTTP GET https://172.22.22.122:8920/emby/Playback/BitrateTest?Size=1000000. UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3372.0 Safari/537.36
2018-03-16 23:49:02.703 Info HttpServer: HTTP GET https://172.22.22.122:8920/emby/Playback/BitrateTest?Size=3000000. UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3372.0 Safari/537.36
2018-03-16 23:49:02.708 Info HttpServer: HTTP Response 200 to 172.22.22.11. Time: 42ms. https://172.22.22.122:8920/emby/Playback/BitrateTest?Size=1000000 
2018-03-16 23:49:02.942 Info HttpServer: HTTP GET https://emby.home.lan:8920/ScheduledTasks?IsEnabled=true. UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0
2018-03-16 23:49:02.944 Info HttpServer: HTTP Response 200 to 172.22.22.11. Time: 2ms. https://emby.home.lan:8920/ScheduledTasks?IsEnabled=true 
2018-03-16 23:49:02.957 Info HttpServer: HTTP Response 200 to 172.22.22.11. Time: 254ms. https://172.22.22.122:8920/emby/Playback/BitrateTest?Size=3000000 

From the timestamps it looks like BitrateTest?Size=1000000 and BitrateTest?Size=3000000 are send concurrently. I'd have expected to see these probing requests in sequence each waiting for a response of the previous one. This is essentially a BitrateTest?Size=4000000 :)

Edited by best boy
Posted

The bitrate tests don't relate to this. Is 3.3.1 available for freebsd yet?

Posted

Ok we may need to reevaluate once you have 3.3.1.

  • 1 month later...
Posted

I've just updated to 3.3.1.0 and the behavior is still the same.

The quality settings are set to auto (720p @ 1,5 MBit/s) and cannot be changed. This is independent of the client, it's location in the network segment and the content.

Posted (edited)

OK, I think I found the issue. It's related to the "LAN networks" settings (expert > advanced > LAN networks).

 

When this field was introduced, I added 192.168.0.0/255.255.0.0, 172.16.0.0/255.240.0.0 to expand on what is considered a local network by Emby. The server is in the 172.22.22.0/255.255.255.0 segment with IP 172.22.22.122.

It seems that there is a bug resulting in Emby not considering clients of the 192.168.0.0/16 net to be local.

 

Also, does that mean that external networks are at best limited to 720p @ 1,5Mbps? I do not have any bandwidth limitations configured. It looks like even gigabit Ethernet limits you down to that maximum, if it gets tagged as "external". 

That really questions the functionality of the network quality assessment code. It's not even funny how wrong it is. How does it work?

Can we disable it entirely and let external clients select their quality settings manually? Do we have to add 0.0.0.0/0 as LAN networks to disable it?

Edited by best boy
Posted

Please try again with the next release, thanks.

  • 1 month later...
Posted (edited)

Having this issue on my freebsd server. I manually updated to 3.4.1.0 and I still have this issue. I think it might be something that we're not setting properly?

Internally this works fine, and i'm able to play at whatever bitrate i want or just direct play. externally there seems to be some hard 1.5mbps bitrate limit that i can't seem to change?

adding 0.0.0.0/0 to lan networks allows this to work perfectly. is that the intended behavior?

Edited by slippy1
Posted

Hi, this sounds like you might have configured the servers max internet streaming bitrate setting. I would undo that and the lan network setting. Please let us know if this helps. Thanks.

Posted (edited)

As I have mentioned in any of my posts: I do not have bandwidth limitations configured. Not for users and not for the system. I've attached my settings.xml system.xml to the original post but the gist of it is:

<ServerConfiguration>
  [...] 
  <RemoteClientBitrateLimit>0</RemoteClientBitrateLimit>
  [...] 
  <LocalNetworkSubnets>
    <string>0.0.0.0/0</string>
  </LocalNetworkSubnets>
  <LocalNetworkAddresses />
  [...]
</ServerConfiguration>
Edited by best boy
Posted

I would remove the local network setting because that may cause the server to believe that every connection is local.

Posted

Yeah, but that's the workaround.

If we do not lead the server on to think everything is local, then some local networks will be considered external and exhibit the issue described: forced 720p @1.5Mbps.

For me this works just fine. I do not have external networks.

Posted

Ok, there were improvements and fixes to the in the latest release of emby server so we may just have to wait until that is available for freebsd. Thanks.

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...