Fwd: hlssink : can 'playlist-root' be a remote server
I am trying to stream a live video from IP camera to remote client (Like Microsoft Edge browser) using HLS protocol.
My question is, how to make the files (seg*.ts and playlist.m3u8) get copied to remote web server (call it PC2) rather than in the local directories. Is playlist-root used for this purpose?
I have Linux machine (call it PC1) which runs the following command
gst-launch-1.0 rtspsrc location="rtsp://<camera url>" ! rtph264depay ! h264parse ! mpegtsmux ! hlssink max-files=2 target-duration=2 location=/hlsdir/seg00%d.ts playlist-location=/hlsdir/playlist.m3u8 playlist-root=<web server IP address>
When I give the 'location' and 'playlist-location' as the local directories of the PC1, everything works fine independent of the what is given in the playlist-root.
Point to note here is that as per my requirement I want the web server to be different and remotely located from the my Linux machine (PC1) which is running the above command.
But, when I give the 'location' and 'playlist-location' as per the directories of PC2 (which is a remote web server) and in the
'playlist-root' I give the IP address of web server, I get an error of 'No such file or directory' as below:
Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Progress: (open) Opening Stream Progress: (connect) Connecting to rtsp://<camer url> Progress: (open) Retrieving server options Progress: (open) Retrieving media info Progress: (request) SETUP stream 0 Progress: (request) SETUP stream 1 Progress: (open) Opened Stream Setting pipeline to PLAYING ... New clock: GstSystemClock Progress: (request) Sending PLAY request Progress: (request) Sending PLAY request Progress: (request) Sent PLAY request ERROR: from element /GstPipeline:pipeline0/GstHlsSink:hlssink0/GstMultiFileSink:multifilesink0: Error while writing to file. Additional debug info: gstmultifilesink.c(790): gst_multi_file_sink_write_buffer (): /GstPipeline:pipeline0/GstHlsSink:hlssink0/GstMultiFileSink:multifilesink0: No such file or directory Execution ended after 0:00:00.215107823 Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ...
I want to know how HLSSINK uploads the files to remote web server using the property of 'playlist-root', does it use FTP or HTTP? I have added MIME types of .ts and .m3u8 in the my web server configuration.