ColoradoSchoolOfMines / visplay

A libmpv and Qt based application for automating and controlling media playback on any display.
https://coloradoschoolofmines.github.io/visplay/
GNU General Public License v3.0
4 stars 1 forks source link

IPFS Source #21

Open sumnerevans opened 6 years ago

sumnerevans commented 6 years ago

IPFS may be a good way to handle local caching. We should allow sources to be specified as IPFS hashes.

sumnerevans commented 6 years ago

Work is happening on the ipfs-source branch.

sumnerevans commented 6 years ago

One difficulty here is that MPV does not natively understand how to open IPFS files. We need to create a mechanism for piping ipfs cat into MPV.

jhgarner commented 6 years ago

It sounds like we could unify asset files and assets themselves. For example, the following could be changed from CoolestVidEver: /home/user/videos/coolvid.mp4 to CoolestVidEver: file:/home/user/videos/coolvid.mp4 where the constructor for the file source would be called to try and parse what CoolestVidEver points to. A similar system could be used for IPFS. If we had CoolestVidEver: ipfs:/home/user/videos/coolvid.mp4 then the constructor could run the ipfs cat command and returns a dictionary like {CoolestVidEver: /tmp/cache/coolvid.mp4}

sumnerevans commented 6 years ago

Hmm... what if the video is larger than the free disk space? You would want to stream in this case...

jhgarner commented 6 years ago

Is there a way to stream raw data to MPV? I see we can tell it to read from stdin at launch but I don't see anything in libmpv about it.