Livepeer 🛠Building Disruptive Web3 Streaming Apps with Livepeer Studio
ETHGlobal·Sun, Oct 9, 2022, 12:00 AM
Join Eric Tang of Livepeer for a workshop titled, "Building Disruptive Web3 Streaming Apps with Livepeer Studio." This workshop is part of ETHNewYork 2022, a three-day in person hackathon that will feature hackers, mentors, enthusiasts, sponsors and speakers who are all gathering in New York June 24-26, 2022 to talk about the future of money, finance, the web, ownership, the way software works and the way power is distributed. We're excited about a new frontier. ---------------------------------------------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com
Transcript
[Applause] [Music] thanks everyone for being here my name is eric tang and i'm the co-founder and cto of live pier today i want to talk a little bit about building disruptive web 3 streaming applications with livecare studio which is a set of developer tools that we recently launched but before we get into that if you're unfamiliar live pier is building the video streaming layer of web 3. um and in order to talk about you know building disruptive streaming applications um i want to cover a couple of topics one is what what are some of the core tenants of web 3 applications right what what makes it unique and how does it compete with traditional web 2 applications especially around these consumer apps i want to give a quick introduction into video streaming technology and then i'll give you a couple examples of um you know new new technical architecture that you can start to follow and start to think about your hacks and of course talk about the exciting part which is the hackathon prices cool let's dive in core tenants of web 3 applications so let's take a look at you know some of the this like historic view right like what uh where did we come from and why um what what is web3 actually putting forward um back in the 70s and the 80s when the web was first invented we were really in this kind of read-only world right we've people created protocols and we were able to kind of send messaging messages around to each other and when that evolved to this web 2 world we started to have this read and write ability right we were able to interact with applications and and actually write information into the back end and that enabled us to build much more much richer user experiences than they gave to gave rise to these really interesting applications that are on the web in web 3 we started to introduce this new component which is ownership right so now you can read write and own and with that new element we can start to think about building new types of applications that are way more interesting than what we have today in terms of consumer apps right so so one of the things that are really interesting that's happening is in web 3 people are users are becoming owners right and and there's a lot of there's a lot already being written about the owner economy lots of applications that are building in this space already around the owner economy anywhere from digital assets to d5 to tools right let me um one really interesting example here i want to highlight um we use youtube today to watch video right artists launch their music videos on youtube and and people can watch it there's an interesting experiment and a company called glass on glass you can still watch music videos just like youtube but the additional thing is now you can also purchase music video nfts so in what um and if you if you're a fan you went out glass and you purchased a music video nft which is a limited edition you start to create a direct relationship with the um with the creators and as the creators become more and more popular the fans start to be able to take take ownership and be benefit from from the success of these creators because these nfts are limited editions and owning these limited editions early in the career of an artist can become a lucrative thing later down the line when the artist becomes more more famous another interesting toolkit tool that we have now is incentive design and permissionless participation right so what does that really mean um well in the web 2 world we have this you know technical architecture where we have the front end and the backhand and the database all living in this centralized ecosystem right so the user data lives in that in that siloed environment and and these these environments are proprietary intellectual properties that are developed by companies and that are owned that are owned by the company and ran by the companies right in the web 3 world we have blockchain architecture right so the blockchain essentially is replacing the backend database and becoming the user the user database right we have smart contracts that are also open source and composable and that we can use to program digital assets and on top of that we have clients and users so this creates a full this fully decentralized model of building application where there isn't intellectual property but the ownership and the ownership and the interaction from the user data happen in an open way and this introduced some interesting tools that we have so now we have a way to create incentives right so this incentive design mechanisms um you know are really popular in d5 but it doesn't only live in d5 right um for example it solves this really interesting uh prop conundrum in the web 2 world where when you're building a new consumer application you go you get to this cold start problem right you build an application and no one knows about it and you have to bootstrap this new uh this user base from scratch and and if you look at the network effect curve right the more user you have the more the more valuable the application becomes but in order for the application to become valuable you need to have these users so this bootstrap phase is really hard to get get by and it's really really cost costly for companies to build these user bases well in web 3 we have this new tool that our tokens right so in the early phase when there's not a lot of users we now have a way to create financial incentives for people to participate in the applications that help us smooth out that demand curve and over time you have the financial utility and the application util utility cross that helps you get to network effect a lot faster and you know in a much more uh smoother curve and you know much less cos much less costly for for the application developers and this is already um starting to take shape in the past few years uh even in the infrastructure space so here we see a lot of interesting computation infrastructure has been bootstrapped using these token mechanisms where you know each year a lot of value is being distributed to the participants in these protocols and these protocols and infrastructures are being bootstrapped and becoming this global and and really efficient infrastructure but it doesn't stop there right it's not just about tokens creators can also take not take part in this and currently a lot of creators are taking part in this through nfts right and you can kind of look at nfts as a way to capture demand and in this demand curve where you have the long tail of um you have the long tail fans where you can't monetize as much um in the the way you monetize their attention is by ads right so you know youtube and things like that but for your more um for your more loyal fans you can start to sell nft collections and over time these nft collections can help the the creator capture more of the economics on this demand curve another really interesting example is dows right so dao at the very beginning were you know groups of people that are coming together putting together a treasury and they start to figure out rules of how to operate and and use use the resources in the treasury but over time it it's also evolved into this interesting um way to to collaborate and actually do projects and and develop things and create products right so now we have dow governance we have dell tokens that go through these governance mechanisms they have their own inflation schedule and token supply there's a market for these dell tokens that can be traded on the d5 marketplaces so essentially what you can do now is you can create a project create a dow launch your own token and use that token liquidity to bootstrap the participation in your dow and build products on top of that so it solves your product building problem it solves your user like initial user bootstrap problem and and and it creates this new new way of um distributing ownership of these applications in the early days to the users and and being live here we see a lot of these um these applications starting to come online these are you know interesting consumer mass mass adoption applications not just you know blockchain niche applications right and we're seeing a lot of interesting examples in the verticals of decentralized social networking uh in web 3 creative economy and also starting to see that in decentralized gaming where games are being created but also there's um very non-trivial like video streaming components in these games so how does that all relate to you know video streaming on live here you know we're talking about building a disruptive streaming app right in order to do that let's let's go through a quick um quick overview of video technology and and see how how it worked in the web 2 world and and how it is working in the web 3 world video accounts for about 80 percent of the internet's traffic right so without a doubt it's the most important tool that you can use when you're building a mass consumer application and the reason is that video is the most effective tool for storytelling and for communication right it's the most direct and the most dynamic and the most impactful so if we look at video streaming application there's there's really three parts right there is your video ingest or video upload your video playback and your video processing a traditional video application you know architecture technical architecture looks something like this right you have your you kind of have your on the left side you have your server side logic for your application that's connected to your database right you have a front end where there's a player that's loading from the from the server logic and the player allows people to and the front end allows people to upload a video into a media server and which is which is kind of the linchpin of this whole thing the media server allows you to upload the video using a transcoding engine to transcode the video so that it can be streamed it can be the video will get stored into an object storage it gets put into a cdn for caching and it gets put into um into the video player right so um for the video ingest component you know we have we have these uh little three uh three little squares right um and you know as a product for live streaming people usually use tools like obs studio right which is very popular among twitch streamers um these are kind of live broadcasting tools um the the advance of instagram or or tik tok or other mobile applications are giving rise to mobile um kind of mobile native broadcasting and video creation and as well as kind of like in browser we have in-browser broadcasting as well oh boy i'm running out of battery here my computer running out of juice yeah usb all right back at it um so in terms of for for live peer we we have a set of tools for you to uh for developers to build uh video ingest or upload experiences with a mobile sdk that allows anyone to build a mobile application that broadcasts a live stream into live peer and and we also have an in-browser sdk that allows anyone to build an in-browser broadcasting experience so you know your user don't doesn't don't have to download like obs or something like that moving over to delivery and playback right usually for mass scale video applications videos need to be uploaded into a cdn right and that's usually from a from a media server but sometimes video can also be delivered directly from a media server right depending on kind of your use case uh but there's al there's always a video player uh that's in the front end um and you know there are lots of open source solutions lots of close star solutions um and that's the video player um the playback is usually um in the most popular playback mechanism is called hls it's a it's a file format it's a it's an apple standard and because apple's apple they control the market and they dictate how video streaming works um and adaptive varied streaming is a really important concept here as well and what that means is when you're watching videos um even though every everyone thinks that they're watching the same video but they're actually watching different versions of the video that's being transcoded right so imagine if i if i record a video in 4k i upload it into a video streaming platform and someone is watching it on their mobile phone they're not watching my 4k video that's being uploaded right they're watching a much smaller version like a 360p or 480p version that's been transcoded down and this is a really important concept because in order for video to be delivered at mass to to all the the viewers around the world it needs to be it needs to be delivered no matter what networking condition no matter what device they're using right and and that means video needs to be transcoded into many different formats to accommodate for that uh so here's a pretty good example imagine um i am um you know i'm walking on the street um near my near my home where there's pretty good um cell reception um and i'm watching a 720p i get home i i'm on my wi-fi it automatically switches to 1080p right maybe then i go i go for a run and i run through an alley where there's no good wi-fi reception it can go it can go direct um directly down to a 360p and this this type of switching can happen in a seamless way so that users don't even notice that's being switched right sometimes you know when you're watching netflix it starts out really grainy and it becomes like a high resolution after a couple seconds um that's that's you know adaptive bit rate streaming at work right to help optimize your viewing experience um video delivery playback we talk about video players right there's a there's a bunch of options out there um we're happy to provide some recommendation for you as you're thinking about building your apps video processing right it's another really important component that happens in the back end that you know people don't usually think about until you start to really build an application um oh thanks i got it yeah and and video processing um is is really transcoding right you get we talked about that a little earlier and transcoding is actually a really computationally intensive step right because what you're doing is you're decompressing the video uh you're recompressing it down to the different versions and then repackaging it re-encoding it and then you're storing it and usually you know it happens something like this right like you just transcode it all in many different versions especially especially for live streams it can be even more costly because live streams every second is new video right so every um so so there needs to be a lot of concurrent uh transcoding that that happens to to support um a consumer at scale um live streaming applications um and that's where you know live here comes in right live here is a decentralized video processing infrastructure network i'm not going to get into too much of how life here works um just on the high level the way the way it works is there's a global registry and a set of smart contracts that controls um who gets to participate in a network and how and who gets rewarded right anybody anybody can participate through through this protocol and the participants are basically gpu providers that you know have a ton of gpus right now there's about a hundred particip participating nodes on the network a lot of these nodes are kind of data professional data centers around the world there's up to about 70 000 gpus in the network processing video any given time right and and this is completely decentralized which means any of these nodes can go away at any point and the network software is written in a robust way that it will automatically retry so that the end user isn't viewing experience is never impacted there's a there's this kind of on-chain and off-chain portion of the protocol so that all the video streaming components in this protocol are completely off-chain but they're cryptographically signed so that only the setup and the settlement happen on the on the blockchain and you know we recently moved over to arbitram which provided a lot of really nice benefits in terms of gas price and and scalability and the economic mechanism works something like this right where token holders can stake tokens towards um the node operators on the network uh when they when they stake their tokens they get a portion of the rewards of of those operators and over time they they get to align their incentive and you get to create this flywheel where the increased volume of video going to the network creates more revenue for the for the participants on the network which creates more value for token holders that drives uh that drives the demand of the of the token which which over time creates more value creates more um volume for for the network right so and that kicks you into this uh this flywheel um so talking a little bit about building with with live pure studio um it's live your studio is the is the toolkit for web3 video developers right so there are three components to it there's you can live stream you can do video on-demand streaming uh and you can mint nfts um so here are a couple of examples right um in order to add video streaming to your hack you can just use a simple set of apis um the api allows you to upload your video into live pier and it will ingest your video it will transcode it it will store the video for you it'll cache the video and we'll give you a playback url and all you have to do is is embed that playback url into the video player of your choice put in your application and then you're done your video now becomes streamable additionally if you want to mint a video nft using that video that you just uploaded you all you do is configure your upload to also export to ipfs and now when you when you get back is the playback url plus the cid or the ipfs hash uh for that video then you can use that that hash and use the video minting ap video minting sdk that live here has and then mint the nft on a evm compatible blockchain another example you can add live streaming into your app into your hack what does that mean it means all you have to do is you create a live stream in the live peer api and then you when you create the live stream it gives you a ingest url that you are that you can use to ingest your video into and there's a there's an authentication key that allows you to do that after that the video gets ingested transcoded stored sent to the media server and you can play back that video right and all of that is done automatically now uh another interesting thing that you can do is add token gating so what does that mean it means you can you can say i'm live streaming now as a creator but only only the people who own my nft are allowed to watch my live stream right so the way that works is you configure the you configure for your live stream to be token gated and when you ingest the video it it becomes playable but every time anyone wants to watch the video there is a web hook call that gets that gets kicked off through the media server and you can implement a webhook handler for using any logic that you want right you can check for usually people check for ownership of an asset in a wallet right and and of course the the kind of the wallet address can come with the web hook call so you can go on the blockchain look at the state the data on the blockchain and make a decision on whether a user is allowed to watch a video or not and that's how you token get a video getting back to um getting back to you know ideas and prizes right um there's 200 uh there's 20 000 of total prizes um for for life here this time um what we're looking for are experimentations in social applications right here are some examples um there's a there's recently uh there's an interesting uh protocol that got launched called lens protocol and it's kind of a a a social graph smart contract framework that allows anyone to build um social applications on top and people have been experimenting with lens plus live peer building kind of video video centric social applications that are pretty interesting but beyond that there's already a lot of existing examples that you can take a look at there's one there's an application called discover that's been live for a while there's an application application called beam that's kind of a decentralized netflix um there's there's lens tube um iris is another project that's that's uh it's building a live peer integration with lens so lots of interesting kind of opportunities here especially if you think about incentive design and how and how you can create incentives for creators to come and um and be early adopters in these um in these social applications uh and talking about creators um we're also we also would love to see experimentations in the creator application space or in the creator economy right and i think there's already some really interesting creator applications in web 3. nba top shot is probably the the biggest one right where um and if you think about the mba or if you think about the basketball players as creators uh they're able to to sell nfts through the topshop platform mirror is another good example right where writers are creators and writers are able to use a number of different kind of value creation value capture mechanisms offered by mirror and it's kind of a web 3 version of media right um another category that that we're seeing a lot of interesting um experimentation around is decentralized game gaming plus streaming right so obviously decentralized gaming is not just about video streaming uh but what we're seeing is when you add video streaming onto onto the gaming component um gaming becomes a lot more viral right and we've we've seen this in the web 2 world where um games are now kind of almost created for twitch streams uh to to uh to look to look really good and to look really fun right uh and we're starting to see even in game broadcasting components with you know sdks like genvid right where um you know game developers are embedding video streaming capabilities in the game because it's such a um such an effective mechanism for driving driving more gamers to come and play their games right so we love to see that um of course there's a lot of interesting it kind of crosses over with with metaverse right a lot of interesting meta verses are are being built in web 3 right now um or even see some weddings that happen in the metaverse especially during uh because of covet um so yeah so the first place is ten thousand second second place seven thousand and third places three thousand um yeah uh come and find us at the booth we'd love to help you with your hack uh we have our developing the development team here product team here um if you have any questions at all if you want to talk to us about your hack ideas um yeah come and find us i think we have a couple of minutes for q a uh if anybody have any questions i'm happy to have to answer them yeah yeah really really good question so the question is about token gating right like where is the token where where is the gating happening right um it's really great question um the the problem that it solves is that it's gating the actual video streams instead of getting the just the front end web page right because if you only get the front-end web page what happens is people gain access to the web page go and copy the video url and share it and it's over right um so so the way this works is it actually issues a jwt in the video streaming component in the in the video streaming workflow uh so that um only and it creates a session id per user a per viewer so that um you're you're you're essentially giving you know about 60 seconds of viewing rights uh every time it it's um every time it's being granted and then you can re-grant yeah yeah so the question is about what about the back end how does that happen um currently um the application implements the back end right so you basically register a webhook callback url and then the webhook just have just calls that url with the uh with the parameters from the front-end right of course there's if you want to build a dap that you don't want to build a backhand how do you do that where you you can you can do a couple of things there's actually um there's two protocols that i know of that are working on this one is called unlock protocol another is called lit protocol both of these things allow you to kind of build a build adapt using the dapp architecture if you're interested in building a building some tooling around those steps with live pier i think that would also be a fantastic hack and we'd love to give you a price for that yeah yeah the question is is there a way to upload audio files and the answer is yes uh you can you can upload audio files you can also stream um doing doing a live stream uh do a live stream of an audio only stream and that would also just automatically work yeah yeah can you upload just an audio file you can yeah it's the i think it's the same way that you would upload a video file and then as you can just upload the audio file um yeah yeah good question so for token gated streams um do the do the you know transcoders on the network have access to those to those streams the answer is yes it would have to go through the gpus in order to get get it transcoded right you could um you could uh configure the um you could configure the stream so that it doesn't get transcoded and you could and you know the output stream would just be the source stream that comes in if that's what you want to okay i think the question is about royalties right so if you want to if you want to create um if you don't so so for example if you want to create a video uh create an ft um and be able to distribute royalty to the original creator um how that would work is that right cool um it it just works like um creating an ft that has realty are already built in right um so live here actually just gives you the ability to mint that nft um how like whatever nft that you want to mint um you can just you can just do that um you know the sdk basically allows you to specify the um specify the contract address uh and from there um the sdk packages up the metadata in a nice format and puts it into ipfs so that you can just use that as your nft metadata and everything which is um it can be done and and you can of course customize the the metadata however you want for the nft [Music] uh yeah so the question is uh can can can i say um can i like rotate between different transcoders so that no one gets you know no one gets the whole thing technically yes but you have to build it yourself yeah and then the way you would do that is to run a live peer node right and then you can just build that kind of scheduling mechanism into the node and of course the whole stack of life here is open source if you're interested in doing that i can show you how i can show you where where it is in the code last call all right well thank you for being here um yeah our team will be here all weekend i personally will be here all weekend so come and say hi
Automatic transcript — names and jargon may be misspelled.