💾 Archived View for bbs.geminispace.org › u › istvan › 19392 captured on 2024-12-17 at 15:59:21. Gemini links have been rewritten to link to archived content

View Raw

More Information

-=-=-=-=-=-=-

Comment by 💎 istvan

Re: "Is streaming media possible? Was trying to set up a radio..."

In: s/GmCapsule-Issues

What does multiprocessing mean in this case? What limitations or effects does it involve?

💎 istvan [OP]

Sep 04 · 3 months ago

6 Later Comments ↓

🕹️ skyjake [mod...] · Sep 04 at 06:44:

By default, GmCapsule starts multiple separate processes to handle client requests. This allows it to have true concurrency for long-running requests. However, when running in a single process (`processes = 0`), Python's global interpreter lock means that only one of the threads that handle requests is able to execute code at the same time. Even in this case, I/O is not limited, so data transfers can be ongoing to/from multiple clients.

Even without multiple processes, you still can have multiple threads so the server is not going to lock up or anything, it just will be running slower, using a single thread at any given time.

💎 istvan [OP] · Sep 04 at 11:49:

Thank you very much for the detailed explanation!

🦁 Houjimmy · Sep 04 at 16:24:

Man, I found your link and started to watch your streaming. Is working pretty well and there is not much data usage, 15mb in 10 minutes. I also liked the music. Thank you for your hard work, I will probably listen to it every time I connect in Gemini.

💎 istvan [OP] · Sep 04 at 19:45:

@Houjimmy Not my stream! That stream is curated by the Hashnix community users. Not trying to steal credit for their creativity.

💎 istvan [OP] · Sep 04 at 21:53:

Edit: My mistake. I missed the [server] section.

🦁 Houjimmy · Sep 06 at 05:26:

Ok, I did not know. Anyway, is a good streaming. Thanks for sharing.

Original Post

🌒 s/GmCapsule-Issues

My approach was to place a script in the CGI directory that prints "20 audio/mpeg\r\n", and then opens a handle to the Icecast stream and begins reading and printing it 1024 bytes at a time. When I do this from gmcapsule, the page loads forever whereas hashnix is opening an audio player (tested in Lagrange). Not sure if something is wrong in my approach, or if gmcapsule is hanging where it waits for the script to terminate before returning output. Since it's a stream it isn't designed to...

💬 istvan · 9 comments · 1 like · Sep 04 · 3 months ago