Your net (encoding) bitrate stays all the same.
Even with udp there is an overhead (if slightly smaller one than with tcp)!
The encoded stream is muxed into an transport stream (...you guess right: a small overhead, bits and bytes here and then), then it has to be packet into udp or tcp packets. Overhead again (as is mentioned above). These packets then have to be encapsulated in generic ip packets. Well - ...a small overhead again... Then the encapsulation of your cable or dsl transmission line... - a small...
I think you got it. :)
It depends even on the question, into how many packets your muxed stream will be divided, given a handshaked and maximum allowed packet size each stage. It's generic for each kind of internet transportation and mostly outside of our scope. Depending on numerous constraints at each stage an overhead of 0.5 to 5% will be added to the (inner/former) net rate.
Thats why all serious folk recommends to leave headroom over the transmission line. A generic rule (just my two cents) would be to leave - even on a well-known 'stable' - connection 30-40% of headroom. To give an example: If you have a 6500kbps upstream capacity, you shall not go over 4500kbps net bitrate for encoding. Going for 5000 or even 5500 may be bold already. =D
looking for maximum stable connection. I wonder if with UDP I can reach more stream bitrate.
This is a bit contradictory. Maximum
connection stability is reached by
not using more bitrate, as said. And TCP with its acknowledging mechanism gives more stability over long-looped buffering like the normal youtube latency (a couple of seconds), so there is a chance to resend (otherwise left-out) packets. On the other hand i don't have experience how twitch handles these things...