Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add redacted livestream archive files #154

Merged
merged 9 commits into from
Dec 19, 2019

Conversation

benhylau
Copy link
Member

@benhylau benhylau commented Sep 26, 2019

Daily livestream archives received from @darkdrgn2k. These already have some talks redacted as needed.

@garrying I would like these files to be hosted on https://2019.ournetworks.ca/livestream/ in our 2019 archived site. Where should I put them?

@darkdrgn2k my understanding is we don't need to alter the gateway here. We can simply set the env var in the player to use infura and it will replace all the URLs as they play?

Resolves #157

@dcwalk
Copy link
Member

dcwalk commented Sep 26, 2019 via email

@benhylau
Copy link
Member Author

Links that are tweeted out via share buttons are of the format:

https://2019.ournetworks.ca/livestream/?m3u8=live-2019-09-20.m3u8&from=QmU1Wd6uJdB35uWh9upnU5DF5PeZDekSkjtTEHUpXSYZY5

e.g. https://twitter.com/LauBenedict/status/1175163389032718336

This means the player will look for live-2019-09-20.m3u8 at https://2019.ournetworks.ca/livestream/ so while we can list the archive link on the recorded talks page, the player should play from https://2019.ournetworks.ca/livestream/?m3u8=live-2019-09-20.m3u8

Of course we can hack up the player to not respect the m3u8 parameter, but I would rather not do that.

@garrying
Copy link
Member

I think these m3u8 files should go somewhere else so that /livestream is just the web player instead of player + playlists. Could we put them in a folder named something like /playlists? or /media?

@benhylau
Copy link
Member Author

I think playlist at player root was the intention. The links are already tweeted out with m3u8=live-2019-09-20.m3u8 not m3u8=playlist/live-2019-09-20.m3u8, so doing this another way would require some weird prepending of playlist/ in front of the param in the player, which I rather not do.

In the past, we have put the video at player root:

# ipfs ls QmWsKvBvXUKaHcHzrUS91XV4k3YjQFdywQ7bY9BZVX4ghk
QmVnVomSomrHoV3QpCHyb6T2m8ex6ZqwmVezJyDXiYEci8 984       index.html
QmZBD7HdWkdBCB7fk7QX6wVqfpPpSSa11TzKD3SBykLmqw 36570     poster.png
QmXSz5L3d1zziP3UVTVBzPaGvkHJzVAE68V9kQVaN7ZrgG 1150      reset.css
QmdtMX4jKsfX5JoagJhxnrbBXUUERxE2fgnKoicy7vYQkz 27138     video-js.css
QmT72tXZYBxzdccyuabZnCCbbpZyoftb5DLegZqmYUfMqB 203869094 video.mp4
QmcGYGxbvncGK2ftcM764M14AF4pEfEWpC4GBBYtAFWTG3 68824     video.plugin.js
QmXMaSaanyLF7UQ5b74p18j1LZDkTrMCyJQKFJsAHSG1zU 4815      vjs.eot
QmVprfEknr45ke7Tr29j9mvAag9sEm3fKbGeJY2cpLuCUa 10367     vjs.svg
QmQVt3fftGoGfZPx9LQoKTkyjXaWLyCrhX8RQFe8XtqrHg 4651      vjs.ttf
QmdZJjKF8Acimsjdd16cnHnF3GuMG4Qza6aPfw45685B28 3503      vjs.woff

This was the ipfs show and tell so I feel keeping all these at livestream root would be appropriate?

#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-DISCONTINUITY
#EXTINF:40.000,
https://ipfs-gateway.live.mesh.world/ipfs/QmSjEs8kC8ZgLetzfpP7QTY45GVvzGeQRfLh4qkGxcswHT
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@darkdrgn2k I think we want to take these from ipfs.infura.io once we have them pinned right? If we are going to stream from here, we can probably keep them as relative?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new code seems to correct the issue that would arise from this

Tested using sed "s|https://ipfs-gateway.live.mesh.world||" test1.m3u8 and it seemed to work fine

However it re-append an ipfs server unless you clear out the value in
ipfs_gateway

Copy link
Member Author

@benhylau benhylau Dec 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you think I should get these onto ipfs.infura.io / ipfs.io? Now there are 1449 hashes and I am doing:

$ grep 'ipfs/' live-*.m3u8 | sed 's|.*ipfs/||g' > ipfs-cids.txt
$ cat ipfs-cids.txt | xargs -I {} curl "https://ipfs.infura.io:5001/api/v0/pin/add?arg=/ipfs/{}&recursive=true&progress=true" >> ipfs-cids.log

Which is taking forever and I don't think infura is actually able to locate some of the chunks... they are all pinned on live.mesh.world right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@darkdrgn2k the ipfs_gateway param is a little different in the Our Networks fork, so this is working now :D

@benhylau benhylau self-assigned this Dec 14, 2019
@benhylau benhylau mentioned this pull request Dec 16, 2019
3 tasks
@benhylau
Copy link
Member Author

benhylau commented Dec 17, 2019

Live Stream Archive and bookmarks now working with:

  • m3u8 (e.g. live-2019-09-20.m3u8) coming from static local directory livestream/
  • ts chunks coming from ipfs.io gateway by default
  • ts chunks gateway can be overridden with gw param (e.g. &gw=https://ipfs.infura.io)

You can try with this PR:

http://localhost:4000/livestream/?m3u8=live-2019-09-20.m3u8&from=QmU1Wd6uJdB35uWh9upnU5DF5PeZDekSkjtTEHUpXSYZY5

livestream-archive

Notice that share link is also fixed to show the m3u8 file passed through URL param.

All chunks are uploaded/uploading to ipfs.io and ipfs.infura.io via ournetworks/2019#128 (comment) and we are completely independent from live.mesh.world now with this PR.

@benhylau benhylau changed the base branch from master to recorded-sessions-update December 17, 2019 10:35
@benhylau benhylau mentioned this pull request Dec 17, 2019
11 tasks
@garrying garrying merged commit c068386 into recorded-sessions-update Dec 19, 2019
@garrying garrying deleted the livestream-archive branch December 19, 2019 05:37
garrying added a commit that referenced this pull request Jan 4, 2020
* updated include year param

* initial link add

* hash update

* adding skipProgramID

* add remaining links

* exclude description link for lightning talks

* adding lazyload attr

* add path attr

* 2019 index

* fix alignment

* adding livestream links

* adding playlist

* removed system update

* adding recorded talks

* fix order

* Add redacted livestream archive files (#154)

* Add redacted livestream archive files

* Fix share URL when m3u8 is passed in URL

* Change ts references to relative in live stream archive m3u8

* Switch to ipfs.io gateway for live and vod streams

* Remove hack that points our m3u8 fetch to live.mesh.world during conference

* Add live.m3u8 that points to next year message

* Use ipfs_gateway param in config everywhere and change to ipfs.io

* share cta visibility

* adding overflow helper to archive addresses

* fix mobile spacing for video player

Co-authored-by: Benedict Lau <b@deprecated.systems>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants