Skip to content

Instantly share code, notes, and snippets.

@chrishobcroft
Created April 25, 2020 07:35
Show Gist options
  • Save chrishobcroft/3e5fe70c54a138675bdea66d929ffc50 to your computer and use it in GitHub Desktop.
Save chrishobcroft/3e5fe70c54a138675bdea66d929ffc50 to your computer and use it in GitHub Desktop.

####################

Video in Web 3.0

####################

Agenda

  • Introduction

  • Video in Web 2.0

  • Livepeer Project

  • videoDAC

    • simple-streaming-server

    • Pay-to-play Streaming App Template

    • simple-streaming-transcoding-server

    • livebulb

    • Future

(if I have time)

  • Livepeer Full-Stack Demo

    • Probabilistic Micropayments

Introduction

Workshop, not a lecture

  • I will present some stuff

  • You can interrupt and ask me questions

  • Please keep questions focussed on the content

Breakout session afterwards - please come talk to me about anything!

https://breakout.interspace.chat/videoDAC

There will be work for you to do (Linux and Mac, no Windows, srybtthat)

Install FFmpeg 
	sudo apt install ffmpeg
	https://www.ffmpeg.org/download.html#build-mac

P.S. Claim your POAP! @worthalter

Video in Web 2.0

Creators:

Artists, Vloggers, Photographers, Musicians, You, Directors, Celebrities, Journalists, Public Speakers, Dancers, The Big Star, The Props Department, Producers, Writers, Yogis, Videographers, Actors, Me, Promoters, Meditators, Podcasters, Vodcasters, Pornographers, Cinematographers, Choreographers, Performers, Camera-people, Sound-people, Lighting-people, Studio-people, Hair and Make-Up-people.

Consumers:

You + everyone you know.

Middlemen:

Players

  • Consumer: YouTube / Facebook / Netflix / Spotify / Vimeo / Twitch / tiktok / Twitter (Periscope)
  • Infrastructure: Amazon / Brightcove / Akamai / Wowza / Cloudflare
  • Institutions: BBC / RAI / CNN / Fox / Al Jazeera / ARD / China
  • Liberals: Associated Press / Independent / Freelance / Private Individuals

Funding

  • Advertising
    • Ad-blocking
  • Public (State)
    • You are watching Big Brother
  • Private (Corporate, Individual)
    • High-net-worth
    • Subscriptions

Livepeer Project

Open-source video infrastructure services on Ethereum Blockchain.

Objective: do stuff the internet needs for video:

decentrally
permissionlessly
open-source

Crypto-economically incentivised:

Inflation Funding Token (LPT)
Reward to nodes providing capacity to the network
"Continuous funding" mechanism (!)
https://coinmarketcap.com/currencies/livepeer/

Delegated Proof-of-Stake Protocol

on Ethereum mainnet
launched April 2018

Current Primary Focus: Transcoding Marketplace

GPU Mining
Probabilistic Micropayments

Current Secondary Focus: Protocol Governance

Voting
Community Engagement

livepeer.org github.com/livepeer

videoDAC

Project building on Livepeer

Decentralised Autonomous Community (not Organisation)

Funded via Livepeer's Inflation Funding Token (LPT)

Current Primary Focus: Stream-to-Earn / Pay-to-play

Payment in crypto
Real-time monetisation
See demo later...

Current Secondary Focus: Onboarding Community

Raising awareness of opportunities
Helping people who want to use it
See demo now!

simple-streaming-server

  • Overview of simple-streaming-server

    Objective: make it incredibly simple to get started using Livepeer.

Screenshot from 2020-04-25 12-34-15 Screenshot from 2020-04-25 12-34-17

(if I have time)

Pay-to-play Streaming App Template

  • What is a Template?

Objective: make it really easy for people to launch an app of their own

paying directly to a configured address :)
using their own simple-streaming-server
  • Simple User Experience

    Tap to turn on TV Tap to turn off TV

Screenshot from 2020-04-25 12-37-27 Screenshot from 2020-04-25 12-37-28 Screenshot from 2020-04-25 12-37-29 Screenshot from 2020-04-25 12-37-30

Preparation

Demo

  • Run Android Studio /usr/local/android-studio/bin/studio.sh
  • Load template in Android Studio
  • Change the package name from com.videodac.hls
  • Change the variables - configure to your own preferences
  • Generate some signing keys
  • Generate the .apk files

Full instructions

https://github.com/videoDAC/android

simple-streaming-transcoding-server

  • Overview of simple-streaming-transcoding-server

    Objective: make the content really really accessible

      in a variety of different sizes
    
      so that more people can watch live
    
      people on slow internet connections
    
      people with less-powerful devices
    

Screenshot from 2020-04-25 12-38-20

  • Run a Broadcaster using Livepeer (with a few more options this time):

./livepeer-linux-amd64/livepeer
-broadcaster
-rtmpAddr 127.0.0.1:1935
-httpAddr 127.0.0.1:8935
-orchAddr 127.0.0.1:8936
-transcodingOptions P144p30fps16x9
-v 4

  • Run an Orchestrator / Transcoder using Livepeer:

./livepeer-linux-amd64/livepeer
-orchestrator
-transcoder
-serviceAddr 127.0.0.1:8936
-cliAddr 127.0.0.1:7936
-httpAddr 127.0.0.1:8936
-v 4

  • Publish a test signal into the Broadcaster:

ffmpeg
-re
-f lavfi
-i testsrc=size=640x360:rate=30,format=yuv420p
-f lavfi
-i sine
-threads 1
-c:v libx264
-b:v 1000k
-preset ultrafast
-x264-params keyint=30
-strict
-2
-c:a aac
-f flv rtmp://127.0.0.1:1935/hello_world

  • Play back the source stream using

ffplay http://127.0.0.1:8935/stream/hello_world/source.m3u8

  • Play back the transcoded stream using

ffplay http://127.0.0.1:8935/stream/hello_world/P144p30fps16x9.m3u8

livebulb

Raspberry Pi Zero 512 Mb RAM 700 MHz CPU Wi-fi

Screenshot from 2020-04-25 12-38-41 Screenshot from 2020-04-25 12-38-42 Screenshot from 2020-04-25 12-38-43 Screenshot from 2020-04-25 12-38-45 Screenshot from 2020-04-25 12-38-46

Streaming via player hosten in IPFS, addressed using ENS :)

http://livefromudaipalace.videodac.eth.link/

Project: app to configure livebulb:

https://github.com/videoDAC/raspberrypi/issues/4

Talk to me about adding Bounties!

Future

  • Stream-to-earn Livestreaming App Template
  • Virtually Private Networking (Orchid)
  • Real-time Revenue Sharing DAO-like Communities
  • Platforms for distributed collaboration
  • Getting ready to play on TVs (Apple, raspberrypi, Samsung)

Livepeer Full-Stack Demo

Show a full Livepeer stack operating on Rinkeby

Broadcaster / Orchestrator / Transcoder (BOT) Network

Payment using Probabilistic Micropayments

Screenshot from 2020-04-25 13-00-03

Pre-prep

  • Download and unzip livepeer's latest binaries
  • Run the Orchestrator command below
  • Create Ethereum account
  • Send some ETH to the account
  • Configure the node using livepeer_cli -http 7936
      1. Get test LPT
      1. Invoke multi-step "become an orchestrator"
      • Bond all your test LPT to yourself
    • Wait for new round to start

Run a Broadcaster:

./livepeer-linux-amd64/livepeer
-network rinkeby
-ethUrl https://rinkeby.infura.io/v3/677f7a6e77204b11bb8ced8e04d5a8b3
-broadcaster
-rtmpAddr 127.0.0.1:1935
-httpAddr 127.0.0.1:8935
-orchAddr 127.0.0.1:8936
-transcodingOptions P360p30fps16x9
-depositMultiplier 1
-maxPricePerUnit 100000000
-pixelsPerUnit 1
-maxTicketEV 5000000000000000
-v 99
-blockPollingInterval 10

Run a Orchestrator:

./livepeer-linux-amd64/livepeer
-network rinkeby
-ethUrl https://rinkeby.infura.io/v3/677f7a6e77204b11bb8ced8e04d5a8b3
-orchestrator
-serviceAddr 127.0.0.1:8936
-cliAddr 127.0.0.1:7936
-httpAddr 127.0.0.1:8936
-pricePerUnit 50000000
-pixelsPerUnit 1
-ticketEV 1000000000000000
-orchSecret secret
-v 99
-blockPollingInterval 1

Run a Transcoder:

./livepeer-linux-amd64/livepeer
-network rinkeby
-transcoder
-orchAddr 127.0.0.1:8936
-orchSecret secret
-maxSessions 1
-cliAddr 127.0.0.1:7937
-httpAddr 127.0.0.1:8937
-v 99

Publish Content into the Broadcaster

ffmpeg
-re
-f lavfi
-i testsrc=size=640x360:rate=30,format=yuv420p
-f lavfi
-i sine
-threads 1
-c:v libx264
-b:v 1000k
-preset ultrafast
-x264-params keyint=30
-strict
-2
-c:a aac
-f flv rtmp://127.0.0.1:1935/hello_world

Show

Conclusion

suicidal goat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment