One could write a small Python server in one day which receives a chunked POST request and transcodes the video on the fly.
The same server could also offer a download link for the transcoded video, and also receive URL parameters for the transcoding options. Or the transcoded video itself is returned after the subprocess finishes.
Something along the lines of:
Server
import asyncio
import subprocess
from aiohttp import web
async def transcode_video(request):
cmd = [
"ffmpeg",
"-i", "pipe:0",
"-f", "mp4",
"-preset", "fast",
"output_file.mp4"
]
process = await asyncio.create_subprocess_exec(
*cmd,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE
)
async for chunk in request.content.iter_any():
process.stdin.write(chunk)
await process.stdin.drain()
await process.stdin.close()
await process.wait()
return web.Response(text="Video transcoded successfully!")
app = web.Application()
app.router.add_post('/upload', transcode_video)
if __name__ == '__main__':
web.run_app(app, port=8080)
Client
curl -X POST http://<server_ip>:8080/upload \
--header "Content-Type: application/octet-stream" \
--data-binary @video.mp4
This way no shared filesystem is required.