Skip to content

Get IPFS CID back from uploader and invoke RECORDING_END trigger

Eli Mallon requested to merge ip/ipfs-hack into catalyst

Created by: cyberj0g

An ugly, but fully functional, hack to get back IPFS CID from catalyst-uploader and fire RECORDING_END trigger through log handling functions. Hope it's a good starting point to spec out a proper implementation of handling uploader output. Worst case it can be merged, if we need IPFS output tomorrow.

Catalyst issue: https://github.com/livepeer/catalyst/issues/154

Important: MP4 "streaming" is not currently supported by Mist, so this is tested with FLV output.

Testing:

  1. Add autopush to mist.conf, using Pinata JWT auth token
  "autopushes": [
    [
      "test",
"ipfs://:jwt_token@pinata.cloud/out.flv"
    ]
  ],
  1. Add RECORDING_END trigger (https://webhook.site/ is a convenient service for that)
"RECORDING_END": [
  {
    "handler": "https://webhook.site/id",
    "sync": false
  }
]
  1. Push:
ffmpeg -re -i bbb/source_000.ts -c:a copy -c:v copy -f flv rtmp://localhost/live/test
  1. Get CID from callback and watch (it takes about 5 mins for gateway URL to become available)
ffplay "https://gateway.pinata.cloud/ipfs/CID?filename=out.flv" 

CC: @yondonfu @victorges

Merge request reports