Using curlftpfs to publish HLS stream on a remote host

Filip S

Member
I did find something about using HLS steaming on OBS using the record option and ffmpeg.
https://obsproject.com/forum/resources/how-to-do-hls-streaming-in-obs-open-broadcast-studio.945/

But I only ftp/ftps acces on web hotel provider.
It looks like the FFMPEG can do ftp also but did not like to fill the server with alots of *.ts files so I did try to make my nginx on the small raspberry PI4 using curlftpfs to mount access to the hls directory on the remote server like this:

curlftpfs -o allow_other ftp://useraccount:userpassword@xxx.hosting.dk /mnt/remotehost
Then the nginx is used to make the HLS to a remote FTP/Webserver but the nginx did not accept to use the mounted (hls_path /mnt/remotehost/hls;) so luck with that.

Nginx did give me problems with the permissions but it would have been a very nice solution – maybe someone can explain why its not working for me and why nginx complains ?

So using a local mounted device and it would be possible use rsync to keep the hls directory with files simular was testeted but rsync was making som *.tmp files and the remote ftp was not really working the way I needed – I found a way using this:

rsync -v -r -c --inplace --delete /var/www/html/livestream/ /mnt/remotehost/www/xxx.hosting.dk/hls

This should be working but I suspect the way nginx is making the *.ts files are not the same way the ffmpeg does via the OBS record way – playout works fine local on nginx after rsync.

Using OBS ffmpeg recording writing to the /mnt/remotehost/hls is working just fine on my OBS computer with the mounted remote host on my Linux Obs computer.

curlftpfs is available on most unix/linux distributions also https://helpmanual.io/help/curlftpfs/

Maybe the nginx is making the *.ts files encrypted with some timeout it can play but another webserver can not just publish the files – I am not really sure about this but maybe someone on this community know why and possible change nginx to make simular files like ffmpeg do in OBS.
I am no really sure what webserver my webhotel is running possible apache.

Anyway following the OBS guide

https://obsproject.com/forum/resources/how-to-do-hls-streaming-in-obs-open-broadcast-studio.945/

and using curlftpfs did work on my OBS computer and on the remote webserver.

My goal was to use nginx to make the HLS stuff so no a complet succes with that but it should be possible using srt or rtmp to make the HLS.

Any suggestions ?
 
Top