-- Leo's gemini proxy

-- Connecting to bbs.geminispace.org:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini; charset=utf-8

Big files over Gemini (was Video over Gemini)


I was thinking of how you could do Video over the Gemini protocol. And to quell any fears of bloat, I don't mean to embed video but a way to deliver video (and larger audio).


My proposal is to use a playlist like file that includes the location of the video segments and timestamps of said segments, so if you want to jump around you only have to download the particular segment and not the whole file.


I probably just over engineered something that is more appropriate to deliver over ftp/ftps but I got enthusiastic.


Posted in: s/Gemini

πŸš‚ MrSVCD

Jan 17 Β· 4 months ago


8 Comments ↓


πŸͺ michal_atlas Β· Jan 17 at 17:30:

It's fun to think about though, and what you're describing afaik can't be done with FTP as it only allows linear reading of an entire file, so the scheme you've thought up would need to be used similarly there as well. I don't know much about which formats could be used like that well, but I recently found that .ts could afaik be arbitrarily concatenated so that could perhaps work nicely.


πŸš‚ MrSVCD [OP] Β· Jan 17 at 23:11:

The MPEG transport stream used in digital broadcast does support arbitrary splitting of the stream. It has been around for a long time. If you start ever block/file with a full frame it would be easier for the video player to get up to speed.

I presume that webm could do a similar thing.


😎 flipperzero · Jan 17 at 23:39:

I don't think anything necessarily needs to be concatenated or timecoded between length in a longform video or audio recording, as most formats seem to play just fine from DL over gemini (you can go to auragem.letz.dev/search in order to test that out via the search engine's indexed audio field or categorized mimetypes) and even if it doesn't render within the Gemini client is just fine: that's the purpose. Much like in the same way with gopher, gemini is meant to fetch media files meant to open and play them in the appropriate application as personally assigned. You open an mp4 or webm, it should be able to open in VLC. mp3 and ogg will play in client, or you could play it in clementine too.


πŸͺ michal_atlas Β· Jan 18 at 01:38:

The question here was specifically if one wanted to seek in a file that isn't downloaded in its entirety or that is downloaded out of order. Otherwise you're right that every file can just be downloaded linearly with standard gemini/gopher.

I guess it's better to keep it that way and just share around links to other protocols if need be, but it'd be a cute experiment to see what limits gemini could be stretched to.


πŸ‘» mediocregopher [...] Β· Jan 18 at 09:41:

What you're describing is pretty similar to MPD, so check that out if you haven't. MPD is used for DRM video streams, but I don't think there's anything stopping it from being used in drm-free video playback either. VLC apparently supports it according to some sources. So yeah that'd be a good place to start.


If MPD isn't quite right, as others have said, what you're asking for is independent of Gemini in any case. You would want some kind of file or protocol of a defined spec, and then some separate application (like VLC) to handle that. A URL to the video (or manifest or whatever) can be input into a gem text document like any other URL, and the gemini client would pass that off to the appropriate application like it does for any other file/protocol format it doesn't know how to handle.


πŸ‘€ nikhotmsk Β· Jan 18 at 16:55:

I am developing a video conference software called Trunk Line. It is not based on gemini, but who knows.


πŸš‚ MrSVCD [OP] Β· Jan 18 at 18:20:

I have had some time to think about this and what I actualy want is a way to split up big files into smaller chunks so if you get an error on your download you can try again but not from the beginning.

I got to thinking about how a index file would look like. It needs a checksum in my head so I remember the sha256sum program on my system so I took inspitation from that. The checksum uses hex encoding so I desided that if a line start with a "T" it is a tag line that contains information.


T name 은채도 What a Good Morningβ˜€οΈ #μ΅œμ˜ˆλ‚˜ #μ˜ˆλ‚˜ #YENA #LE_SSERAFIM #HONGEUNCHAE #GOOD_MORNING #ν™•μ‹€ν•œ_건_Good_Morning [1tsP_r2Vzck].webm
T hash sha256
0aa618f965cafb7c279bc94ceb8b5ff77f1a5829ddbf70ec7d26ae198dfb0b76  videoaa
T size 1048576
42f6fe4e1747b8ed23c7728bc43ad7ba21ce6a04bf84103861901ee4559c9fb2  videoab
T size 1048576
4f820b08f3427718a50b0243eb5d7673a7018488c94ba9523b71120253209757  videoac
T size 1048576
2e28bb36fd424c347d5c8dd509f86e53727b7fb03808e268f0549f5d0a2b79e8  videoad
T size 910796
T miliseconds 187180

Tags so far:

MUST Tags

T name <file name>

This tag sets the name of the file to be downloaded. The index file name MUST be the same as the <file name> + .gembig If it is not the download does not start.

T hash <hash type>

This tag sets the hash to be used. This tag MUST be used.

T size <number of bytes>

This tag sets the expected size of the chunk to be downloaded. This tag MUST be after every hash/file line.

Optional Tags

T miliseconds <miliseconds>

This tag specifies the legnth in miliseconds of the chunks since the last miliseconds tag. This tag is to be used when the file is a media file so the media player can potentionaly seek in audio/video.


This is inspiration and not even close to a final idΓ©a. I think I have a RFC styleguide to read if nothing else.


Ps. After looking at what I have written I realized that I have not given up on the idea of Video transfer. I just envision it as media player and downloader in one.

Also big files in my mind for Geminispace is in the 10-100MByte range.


😎 flipperzero · Jan 19 at 11:51:

NGL I wouldn't mind video playback rendered right on client, maybe could even be possible utilizing such 3rd-party embedded media player defined by what's default on system, of which could be able to parse the video w.o downloading and saving locally to track between the timecode.


That out of the way, I would like to point out in case it's of any interest, but when you click an audio or video file on Lagrange it doesn't automatically permanently download it to your disk. Instead, it makes a temporary internal save of the media and either plays it out in client or prompts an application to open it in, after which is discarded after playback and closed program.

-- Response ended

-- Page fetched on Sun May 19 17:12:21 2024