Livepeer´s path to scale video transcoding - Phillip Angele
Devcon·Tue, Oct 9, 2018, 12:00 AM
Berlin Ethereum Meetup - 2018.08.28 Slides: coming soon
Transcript
Philip hi I'm Philip I've I'm doing product at life Pia life Pia is kind of platform as-a-service for video developers who want to add video to their application and the key differentiator is that we are using decentralized infrastructures to make this a reality this is all not that far we have a proof of concept that's currently running on ethereum but we aim to a more scalable approach that's coming later this year and to to do this to to allow video platforms to do their daily job we are creating a new type of mining the video mining that's coming to cryptocurrency miners who use GPUs to do cryptocurrency hashing and we aim to create an additional income for them so if you are a developer who wants to add video to your application you face a lot of pains right so it's really expensive to go after the services of the big five like Amazon or Google maybe not to start with but once you scale your video infrastructure up this is becoming really expensive and on the other hand you could self host get a bunch of root servers and and manage them on your own but this is hard to maintain requires a DevOps layer that it's most likely human resource intensive yeah to keep to keep a system running stable at scale if you do not do this basically if you go to the cloud providers you're also agreeing on renting the infrastructure from your competitor right if you want to create the next version of YouTube it's kind of weird to go to Google and rent infrastructure from them and there is like no alternatives available so yeah you couldn't just like go somewhere else so with life people are trying to create a marketplace a trustless marketplace so that anybody who has resources that he could contribute to a video network coochi Elam we are building orchestration services that are basically allowing you to share idle capacities in GPU mining rigs and other other resources and we would allow you to to share them or sell them on a marketplace so to do this effectively we needed to create a set of competition between the transcoders so transcoders are are the units that take a video and convert it in multiple resolutions so that they would run on any type of internet connection and any type of device that's out there and the the key for us was to find an unfair business advantage against other centralized providers who offer these by utilizing distributed infrastructures so we basically give - in Utah they have previously been creating these mining rigs I guess some of you have been in touch already containing out of graphic arts and dumped down motherboard and CPU to just control the rehashing on these cards but what most people do not know is that in these cards only parts of the chips in the cards are basically used for the hashing others are there for other purposes for example in Nvidia cards the N vank decoder and the Nvidia decoder and Nvidia encoder are separate asset chips that are apart from the CUDA cores that which do the actual encoding so you basically have in the lower part the CUDA cores that are being used for hashing these reprogram will compute units and then you have the Nvidia decoder and encoder and that's a success so that's circuits that can't do anything else then video decompression compression so you know there's a big price difference if you compare rendering video encoding video on a on a graphic card or if you render it on say AWS on AWS for rendering a live stream as we stream it from here on live pier he would basically pay like $3.00 per hour but the same graphic card or a graphic a similar graphic card in a mining rig would only produce an income of $1 50 in a whole day while it could render 48 hours of video so there's a huge difference in in the price between those who basically do hashing and those who rents their capacities currently for video encoding so and as you see the the difference is huge it's like a hundred times bigger for the same service the miners on the other hand have very low access cost to get into that game once our software is completely finished they can run this side by side next to their usual hashing within their cryptocurrency mining BOTS so they don't have to stop the usual operation they can use the idle chips next to it and in addition basically and that's giving them a second income stream the the resources that are available are massive so as you see that in that picture that's just one of the mining farms that Genesis mining has like a big caching contract provider there's a lot of them worldwide but this is not only applying to the big mining farms of course but everybody could use that in fact the big mining firms will have less of an opportunity here as they would have to spend dedicated resources the form of bandwidth to do that specific service while a home miner would basically be able to you know utilize his already available bandwidth to contribute to that service and institutional miner would have to get dedicated resources so of course like if we give you a video and you encode it from for us we have to make sure it's properly done if you don't do it properly we couldn't really use it so we had to design a passive validation mechanism to make this work and that's basically a combination of like what's the encoding settings so we use open source technology from the ffmpeg family to look into the video Elementary's and see if certain aspects of the video job has been properly done like it's the codec properly the bitrate the frame size stuff like this but we also probe the video quality so that's a tool from that has been released from Netflix for example called we math and what it does is it used its using perceived video hashes to to gain a metric on the video quality or basically a score on the video quality it allows us to see how well an encoder performed so how good the quality was that he was producing and it also allows us then to see if somebody cheated and tried to simplify the encoding process and we have to see if the content was tampered so if the the the content of the video itself was changed and we use perceptual video hashing for that as well where we would basically have an Pearson R algorithm that's telling us if parts of the video itself or of a single pictures in the video have been changed that's that was an open resource resource topic for the last couple of month but we were luckily getting into contact with researchers and developers from the ffmpeg community who volunteered to help us getting the spill so this is basically now in an alpha available with us and which are not available for you but we are testing it internally hopefully soon for you so these methods of validation basically allow us now to distribute video encoding jobs among any type of software so the encoding software does not have to come from us same with chips if there's somebody out there who's creating a new video encoding chip which is like way more efficient he can just contribute to our network without us ever touching his software it's a complete passive validation before we were using Turbots so before all the encoding that we've done have been CPU based and people are using true--but along with ffmpeg to really be able to validate if somebody has changed the encoding software but that's that's not really helping with driving competition up and that's what we do we try to create a scenario where transcoders compete against each other for the available work in the network we want to make them compete against price quality and performance so price we are creating a marketplace where it's it's not written in stone we're just creating it where there's like a secret auction happening where you ask the worker bit to get the work done and if you basically broadcasters send a good price that the that the other party is willing to pay for your chances your likelihood of you getting the job is higher now we're gonna live in a world where there's so much more worker than available work that we think only the chance on you know changing your price and bidding for the work is going to allow a huge competition on the price I come from a centralized company that is doing encoding services since quite some time I've started with a small start-up with friends in 2010/2011 here in Berlin to do this and solve this a couple of years ago to a US company and I know that there's always going to be that that threshold none of the companies want to step over in terms of price as they are onboarding costs for their customers their support cost they're much higher than the actual infrastructure or the operational cost so you know they will never allow a certain try thresholds to be broken and there has to be like an automatic software doing the price negotiation so that there is not so much room for price cut else building in that space and quality we want to allow that transcoders are able to like broadcast a higher price if they do a better quality but we also want to allow like older equipment to be able to do the video processing for networks that are not able to sustain a higher price not all video use cases are the same right you have video use cases where there's a real business model behind it and though the develop video developer who's implementing it can take more expensive but maybe better-looking technology or more performant technology but we also have markets where there's no business model and it's subsidized anyways so the more money they save along the way the longer they can run having now an marketplace that allows people to bid on both price and quality is going to differ allow the different markets to access the same marketplace Amazon sells the encoding for the same price for everybody right but there is businesses out there that's let's say India or somewhere else where the the business model behind these video use cases might never achieve the equilibrium that we see happening here in the Western world so in performance as the last so we create race conditions among trans coders to make sure that there's at least one really good performing transcoders who can then win the job and we do this so that even so it's a distributed network we give you some confidence that we will always have have your encoding or your live stream being maintained on a professional level a single there's like this in the end and not a single point of failure but at least one transcoder still carrying in your stream the result would be that there's a dramatic cost reduction we we say like we can we can get to like 5% of what the market price is today like from a $3 per hour price we think we can drop to like 6 and that's that's not like us our our cut of course that's the net income of what a transcoder what does life P does not has a plan to create a free market on top of that so it's just going to be an open source market that anybody could use without a middleman that's like gaining fees on top of it other than the actual transcoder and infrastructure providers we want to make sure that the overall quality is getting higher and higher over time so the competition itself should also incentivize transcoders to broadcast higher quality encoding jobs for a smaller price and also higher reliability maybe so the currently we say reliability is going to happen in our world through redundancies we're gonna have multiple production lines working simultaneously basically so one can fall off without harming the overall result so the market size for transcoding it's something that we can easily calculate through so in YouTube doesn't have like public numbers but in some of their press releases you can you can hear them saying we do like 300 hours of video every minute and that sounds up to like 8 18,000 concurrent live streams now with each and videography cart being able to render two streams you would only need 9000 of these cards to always render all of the incoming videos of YouTube in real time so it's just it's not really saying that we aim to do this it's just to give you a perspective on how much resources are active actually needed to do the job it's not that much with twitch for example you see they peak at 75,000 concurrent channels it's not even that all the twitch channels would get a transcoder only their partner programs member or only those viewers who have above 50 concurrent viewers would actually get a transcoder but still like 35,000 cards would be enough to render all of this in real time so now take the ethereal Network the ethereum network if you if you take the hash rate a TAS and divided on how many graphic cards you could run with it you would end up with about 6 million graphic cards Nvidia graphic arts doing that job so along with the ethereum proof-of-work hash power or the acid idol chips that are next to these graphic cards you could basically render about 12 million concurrent live streams all the time that's way more as the worldwide demand is so that sounds like a business threat right but it's really not so that's not a business threat for the enterprise customers it's a very over soft market with encoding or video in general they have specialized on niches in these enterprises to sell into certain verticals we are all not addressing this and they're also from a cost perspective not at that point where they desire a dramatic cost decrease so that's not for the enterprise it's also not for premium right Netflix and Coates every video it does a few hundred times it's literally brute forcing the encoding results to get the best possible outcome so also premium content providers it's not going to be interesting for them and even for the traditional broadcasters of the German television they you know they won't be interested they have their encoding solutions but what it really does it's it's creating a new market a new market for decentralized applications that first need a decentralized infrastructure to not lose their habits right and also to have a dramatic cost decrease here we have all heard about startups who we're lucky and got some venture capital or some funding and then they started to create a video product and just drained through their resources really really quickly I've seen that happening myself a couple of times where people had good ideas and even good funding and they started then they had a sudden success a lot of people were consuming their content or using their app and they were not able to build up a business model before they ran out of their funds now that's a huge risk and lowering the cost of the operation just means giving them a longer runway if we are at five percent of infrastructure cost for running a video platform it also means for somebody who's implementing that and using his capital against that service to be able to rent run 20 times longer so that gives him a lot more time to find a real business model and yeah then hopefully sustain and be able to compete against those who have the infrastructure already so this is targeting consumer products most likely consumer products that are not yet having a business model and trying to maybe over time find one but need a long runway to find it it's in a sense it's a sense where the competitive market is going to create a different niche it's it's not a horizontal we target it's really it's not really a vertical we target it's really horizontal for anybody to build on so maybe over time we're going to see people from the traditional enterprise maybe pick up our use case once it's fits but it's not their primary goal so that's it thank you very much for listening and run through it very quickly [Applause] is there any questions yeah correct so in in twitch if you are a nobody if you're not yet in their part and program and you have less viewers your highest quality is the quality of broadcast you only sent them one stream and that is what everybody has to consume before transcoder kicks in so anybody who is in the situation that she could currently not sustain the bandwidth from your source stream would not be able to properly watch that stream exactly yeah you try to send in the best possible qualities or the viewing experiences good right but you need the transcoding to sustain then the various internet connections and devices that they're on that are out there yes bandwidth is a limiting factor and similar to how it worked with proof-of-work mining where you as a miner had to find a reasonable resource of electricity now miners have to find affordable bandwidth as well we estimate with about 10 megabits up and download capacity per encoding job you do that's including a Headroom yes yeah the question was if we ask for fees but now we will not ask for fees the aim for life peers really to built an open-source community around this that can sustain and we have created a token that's being used as a utility token to secure our network from civil attacks but it's also not going to be used to pay for the service internally it's going to be easily that you use to pay for that service and the live key token really is only to basically secure who is allowed to do work in the network could you repeat that a little louder please so so the life peer product has been funded with a private token sale that will give us enough Headroom it's about 4 million enough Headroom with our small team to build that product to get it out the door and to get it running and it most likely is also enough to sustain this for 1 or 2 years to maintain it and to continue going but the aim of it is to become a more decentralized organization in the end that is not depending on on direct finances but would basically ask those who use that network to contribute also to it the life key token itself definitely will have some value in in my sense it acts also as a type of software license but that's not really it's not really true right because you could scale behind a single license as well but in the end to do work in the network or basically to Val to validation work in our network and at some certain point in the future you're going to need to live peer token and that's also going to give him some value depending on the adoption and use yes please could you repeat please so so we are using a delegated proof of stake system no we don't so proof of bandwidth is something that I have heavy doubt it's ever gonna work out cause it's so easy to emulate traffic in that sense I think we will not build our own peer-to-peer CDN but rather integrate with existing projects like for example the swarm project so there is existing projects out there that are trying to - to get like a proof for replication done and and the swarm system for example use that methodology swaps where in Swindell to mitigate the risk that you have for somebody not being able to pay you for the traffic that you served but all these concepts are highly experimental and none of them are yet proven to be working or to be easily to integrate and with us like with video infrastructure it's our on or off game either this works or it doesn't work like with video you have very little room for users having a bad experience and still accepting the service especially if you look at YouTube Facebook Twitter also Netflix what they do to improve the viewer experience today anybody who wants to compete in that has to at least do similar well so we're basically currently exploring ways for the delivery that that are not relying on a financial layer but I'm more a free service we are currently experimenting with vApp torrents using HTTP traffic next to it to sustain a live use case so you would basically have a CDN on one side a traditional CDN and you would have a web torrent stream on the other side and clients would basically be allowed to get partial data from the CDN and partial data from other users that are currently consuming the same content that's with us it's it's very good situation cuz with live stream you are like the only use case we're really everybody is yet the same content at the same time though for us it's working it's working out pretty well it's different for other use cases especially longtail use cases can't really use this but yeah we are looking into how to make this work as well our goal is not only to drive down the pricing with transcoding but our goal with live pier is really to drive down the price for overall video infrastructures cool one more so so currently currently the whole job negotiation and anything else works on chain that doesn't give us a lot of room for many transcoders we currently only have 15 transcoders that fight for the jobs in the network but that was just a proof-of-concept design later on we think about having a limited amount of orchestrators or validators that are basically sitting in between the transcoders and those who buy the transcoding resources that would mean that the validators might still be limited but they don't do the hard work they only do partial work the validation work and the real work happens with trans coders and that's then all off chain and and unlimited with the amounts where it's limited of course with the physical resources behind it but it's not limited as it doesn't require us to go through etherium each time we do one of these jobs yeah you're hitting a point there so yes you're right to make video in just a success you have to make sure that you're not too far away from the origin and one of the one of the new new network layers includes a region so that you would basically broadcast the availability of your work in a certain region and would not then get a job from Tokyo or from China yes so so core currently it's with with H with x264 and and the software encoding it's really only CPUs later with the GPU based very verification we going to do AMD and Intel that's coming to VA API and NVIDIA and that's basically come that's basically covering any graphic card provider out there and even the graphic chips that are in the intro CPUs we're discussing if it's also needed that we would go to a more a RM kind of infrastructure and see if we can get even P I boards and I mean there's like there's so few resources of so few devices out there that do not have a video encoding chip in the meantime it's crazy most likely even your television has one even so it's not used could you repeat please I'm sorry I don't understand oh I'm not part of that decision I joined life people in that decision was over in in my mind I I say so how do I put this without right and stepping on somebody's toes right so building apps on ethereum is really a bad idea right now right what I would need to get the original design to scale without us doing a huge protocol redesign and without us doing pushing everything off chain would be a fixed transaction cost but I think that's never going to happen and for known reason so why we chose ethereum because of the smart patent contract platform that's unmatched still is it the best place for us to be so for me as like the product guy I'm really not convinced I see so many reasons why we should not the our smart contract developers are very confident that we can push anything that's bloat right now off chain and make sure that these use cases then only needs etherium as the financial settlement layer and basically to do the proofs and challenges that would reveal a cheater in our system yeah thanks cool thanks
Automatic transcript — names and jargon may be misspelled.