Dr. jonny phd on Nostr: Helping a labmate stream a video from python that gets processed framewise as a ...
Helping a labmate stream a video from python that gets processed framewise as a series of arrays to the browser for some dashboard, and the amount of tutorials that encourage you to encode every frame as a b64 JPEG and dynamically update the src attribute on an img element are too damn high. I even saw an example in a major package that converted to jpg, rendered the jpg in a canvas element, and then re-rendered the canvas to a b64 jpeg string before setting it as an img src.
Sometimes it feels like the python ecosystem has just never heard of "video codecs" before
Published at
2025-04-23 23:41:35Event JSON
{
"id": "e0227e4edabba2c4f8ee5479b81a75f2015cbb80bd0ce2ed7b76b87767dca496",
"pubkey": "9926f6c53162329fcb33481f0c5db4a015bdd63d564636ea13c35d4975c176e3",
"created_at": 1745451695,
"kind": 1,
"tags": [
[
"proxy",
"https://neuromatch.social/users/jonny/statuses/114389922334138246",
"activitypub"
],
[
"client",
"Mostr",
"31990:6be38f8c63df7dbf84db7ec4a6e6fbbd8d19dca3b980efad18585c46f04b26f9:mostr",
"wss://relay.mostr.pub"
]
],
"content": "Helping a labmate stream a video from python that gets processed framewise as a series of arrays to the browser for some dashboard, and the amount of tutorials that encourage you to encode every frame as a b64 JPEG and dynamically update the src attribute on an img element are too damn high. I even saw an example in a major package that converted to jpg, rendered the jpg in a canvas element, and then re-rendered the canvas to a b64 jpeg string before setting it as an img src.\n\nSometimes it feels like the python ecosystem has just never heard of \"video codecs\" before",
"sig": "fc635f97171e4b904a87dfa55bf1310ee72ba8a450361cfdc67a6c2b3927ab74bf32de305b65fc82e8f25926b04c5629906be4e3daa349c28161a0e42985496d"
}