Skip to content
Advertisement

ffmpeg HLS transcoding and chunks upload to remote server

I am trying to create a so called origin server for storing the hls chunks and the manifest file on a remote server. The sending machine running ffmpeg is with IP: 192.168.178.50 and the web server which has to store both the HLS chunks and the manifest file is with IP: 192.168.178.100. My ffmpeg transcoding command line is:

JavaScript

But no matter what method I am using I got in the access log of my apache web server the following errors:

JavaScript

These are the supported methods on my web server:

JavaScript

My web server is running apache2 on Ubuntu 16.04:

JavaScript

So according to the access.log file no matter what method I define in the ffmpeg command line it is always trying to upload the chunks using HTTP POST, but the latter is already supported and the directory I am directing the chunks has even 777 rights. Am I missing something here?

Advertisement

Answer

I have created a bash script, which is installing NGINX, configuring it and limiting the access to a certain IP network on my Github page. You can check the solution at: Origin Server running on NGINX. The point is that as @mata said HTTP POST requires some kind of a handle which to process the POST requests and save them to the storage or you can use HTTP PUT, but in this case you need to explicitly allow it, because it is by default not allowed. My solution is actually allowing HTTP PUT only in one specific directory and it is also limiting the HTTP PUT method to only one IP. Make also sure to check my WIKI page for more detailed explanation.

Advertisement