lemunozm/termchat

Reduce band-wind in streaming

Opened this issue · 1 comments

This issue comes from reddit

It seems like the streaming data can be reduced on the sender side to reduce the band-wind.

Regarding "YUYV format, which contains 2 pixels per 4-byte block", until I can see, the YUYV format seems to hold the same data as RGB format for each 4-byte. So we can not reduce the band wind there. But we can do it in two other ways:

  • Reducing the size of the frame sent. Currently, the frame is really high for a terminal application: 640 * 480. By default could be less or even we can ask the receiver the expected size (which can take more effort to do, but more accuracy).
  • Since the data will be rendered as xterm color. the RGB can be converted to xterm (1-byte) on the sender side, reducing the band wind to a third part.