Spaces:
Paused
Paused
File size: 608 Bytes
e138454 2d89c1c e138454 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import aiohttp.web, asyncio, pathlib, uvloop
async def main():
app = aiohttp.web.Application()
app.add_routes([aiohttp.web.static('/', pathlib.Path(__file__).resolve().parent, show_index=True)])
runner = aiohttp.web.AppRunner(app)
await runner.setup()
site = aiohttp.web.TCPSite(runner, port=7860)
await site.start()
while True:
ffmpeg = await asyncio.create_subprocess_exec('ffmpeg', '-stream_loop', '-1', '-re', '-i', 'video.mp4', '-c', 'copy', '-f', 'flv', 'rtmp://studio-rtmp.rumble.com/live/s-4nn6tq-lo42-padw-171f72')
await ffmpeg.wait()
uvloop.run(main()) |