Get IPFS CID back from uploader and invoke RECORDING_END trigger
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:
- Add
autopush
tomist.conf
, using Pinata JWT auth token
"autopushes": [
[
"test",
"ipfs://:jwt_token@pinata.cloud/out.flv"
]
],
- Add
RECORDING_END
trigger (https://webhook.site/ is a convenient service for that)
"RECORDING_END": [
{
"handler": "https://webhook.site/id",
"sync": false
}
]
- Push:
ffmpeg -re -i bbb/source_000.ts -c:a copy -c:v copy -f flv rtmp://localhost/live/test
- 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