grainger-illinois / CTCast

Apache License 2.0
0 stars 0 forks source link

Very long messages are not being sent properly #58

Closed romerorisa closed 1 year ago

romerorisa commented 1 year ago

As tested in the meeting with Shubham on 10/31, long messages when sent as captions and as audio descriptions (text to speech) weren't working properly. Some messages were cut out. This might have something to do with the delay being used and the buffer capacity of the live video player.

angrave commented 1 year ago

There are 59.94 fields (still images) broadcast per second. Call this 60 frames per second for easy mate

Fundamental max rate: https://en.wikipedia.org/wiki/Talk:EIA-608 is 2 bytes per 60hz* field ("image"). There are ~30 even frames per second (and 30 odd frames per second). So max data rate for each caption stream is 60 characters per second (including control characters).

We should assume the max size of the buffer in the caption encoder hardware could be very small (e.g. 60 characters) before it starts dropping stuff.

Real frame rate is a bit under 60HZ: "60/1.001" = 59.94; so let's use a limiting rate of 59.5 characters (including control codes) per second to be safe.

romerorisa commented 1 year ago

solved with #61. Will have to add comments to why we are using 0.6s as sleep time for future development.