Nginx Live Stream Configuration

Hello,

I install lastest Kaltura CE 12.17 on a CentOs-7.
Everything is working well exept the Nginx Live Stream mod.
I follow instructions of this post :

Using Wirecast to send video on my server, the connection is ok but nothing happens on HTML5 Video Player even on the folder /var/tmp/hlsme/
I haven’t any server side error message.
Someone can help me to search where the problem could be ?

Thanks,
GreG

Hello @ZgreG,

I’ve never used Wirecast myself but if it can stream over RTMP, it should work.
As a starting point, I suggest you try with the ffmpeg command in the howto and see if files are created under /var/tmp/hlsme and whether errors are thrown to SRDOUT/STDERR, and also have a look at the Nginx error log.

Hello @jess,

Thanks for your reply.
I used the FFMPEG command and here are the results :

  • on local server : Connection to tcp://xxxx.fr:1935 failed (Connection refused), trying next address
  • on remote workstation : The stream is going right but when I stop it two error messages
> [flv @ 0x7fbf78817000] Failed to update header with correct duration.107.7kbits/s speed=   1x     
> [flv @ 0x7fbf78817000] Failed to update header with correct filesize.

In the two cases, nothing happens in the directory /var/tmp/hlsme.
I don’t have any Nginx error.
(Can you explain to me quickly what is SRDOUT/STDERR ?)

In the folder /var/tmp/, I created the forders hlsme with kaltura.apache owner.
I see that I have many strange folders :

drwxr-xr-x 2 kaltura apache 4096 Jun 16 11:38 hlsme
drwx------ 3 root    root   4096 Jun 14 12:58 systemd-private-2102f54c325d4cc9abd21af192b238b3-dovecot.service-gidGuK
drwx------ 3 root    root   4096 Jun 14 14:53 systemd-private-2102f54c325d4cc9abd21af192b238b3-httpd.service-gtHV0Y
drwx------ 3 root    root   4096 Jun 14 12:58 systemd-private-2102f54c325d4cc9abd21af192b238b3-kaltura-nginx.service-W66PFy
drwx------ 3 root    root   4096 Jun 14 12:58 systemd-private-2102f54c325d4cc9abd21af192b238b3-mariadb.service-aNlSKv

It’s possible to be an autorisation problem ?

Thank you,
GreG

Hi @ZgreG,

Nothing can happen until your client is able to communicate with Nginx [running the RTMP module] over port 1935 TCP. From your output, it looks like it fails to do so.
On the server run:
# netstat -plnt|grep nginx
make sure Nginx does indeed listen on port 1935 [RTMP default]. If you selected a different port for RTMP during the configuration phase then of course, you need to change the ffmpeg command on the client side accordingly.

Assuming everything looks OK on the server side, from the client run:
# telnet $NGNIX_HOST 1935

Make sure you arrive at a prompt, like so:

Connected to $NGNIX_HOST.
Escape character is '^]'.

if you do not, then you must have FW rules that are blocking the communication and you should adjust them so your client is able to reach the Nginx server over the RTMP port.

@jess

On server side :
# netstat -plnt|grep nginx

tcp 0 0 0.0.0.0:1935 0.0.0.0:* LISTEN 899/nginx: master p
tcp 0 0 0.0.0.0:88 0.0.0.0:* LISTEN 899/nginx: master p

On client side :
# telnet $NGNIX_HOST 1935

Trying x.x.x.x...
Connected to $NGNIX_HOST.
Escape character is '^]'.

Everything seems ok about communication …
No ?

@jess

Can you explain me quickly what do mean :

If it can help me to resolve my problem …
Many thanks,
GreG

When outputting to the screen, there is STDOUT [Standard Output stream] and STDERR [Standard Error stream].
All I meant is you should look for errors outputted to your screen when running all mentioned commands.

Please paste the full ffmpeg command you used when trying to stream and all the output you got.

@jess

Ok, thanks :slight_smile:

Here the full ffmpeg command :

$ ffmpeg -re -i /Users/Greg/Documents/www-dev/Kimsufi-GreG/Sources/PAP-test/tests/PAP-test.mp4 -c copy -f flv “rtmp://vodyou.fr:1935/kLive/Test”

And the output :

ffmpeg version N-86493-g623d217ed1 Copyright (c) 2000-2017 the FFmpeg developers
  built with Apple LLVM version 8.1.0 (clang-802.0.42)
  configuration: --disable-yasm
  libavutil      55. 66.100 / 55. 66.100
  libavcodec     57. 99.100 / 57. 99.100
  libavformat    57. 73.100 / 57. 73.100
  libavdevice    57.  7.100 / 57.  7.100
  libavfilter     6. 92.100 /  6. 92.100
  libswscale      4.  7.101 /  4.  7.101
  libswresample   2.  8.100 /  2.  8.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/Greg/Documents/www-dev/Kimsufi-GreG/Sources/PAP-test/tests/PAP-test.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : HandBrake 0.10.0 2014112200
  Duration: 00:01:48.08, start: 0.080000, bitrate: 103 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 97 kb/s, 25 fps, 25 tbr, 90k tbn, 180k tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 1 kb/s (default)
    Metadata:
      handler_name    : Mono
Output #0, flv, to 'rtmp://vodyou.fr:1935/kLive/Test':
  Metadata:
    major_brand     : mp42
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.73.100
    Stream #0:0(und): Video: h264 (Main) ([7][0][0][0] / 0x0007), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 97 kb/s, 25 fps, 25 tbr, 1k tbn, 90k tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (LC) ([10][0][0][0] / 0x000A), 48000 Hz, mono, fltp, 1 kb/s (default)
    Metadata:
      handler_name    : Mono
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=  482 fps= 25 q=-1.0 Lsize=     300kB time=00:00:19.17 bitrate= 128.3kbits/s speed=   1x

When I press q (to stop) I have this message :

[flv @ 0x7fdd67001600] Failed to update header with correct duration.
[flv @ 0x7fdd67001600] Failed to update header with correct filesize.
frame= 1260 fps= 25 q=-1.0 Lsize=     629kB time=00:00:50.28 bitrate= 102.5kbits/s speed=   1x    
video:556kB audio:9kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 11.368205%

I try this FFMPEG command :

$ ffmpeg -re -i /Users/Greg/Documents/www-dev/Kimsufi-GreG/Sources/PAP-test/tests/PAP-test.mp4 -c copy -f flv "rtmp://vodyou.fr:1935/kLive/TesT.m3u8"

(like my Live entry in KMC)

A the EOF I have the same error message :

[flv @ 0x7f95eb800000] Failed to update header with correct duration    
[flv @ 0x7f95eb800000] Failed to update header with correct filesize.
frame= 2700 fps= 25 q=-1.0 Lsize=    1437kB time=00:01:48.05 bitrate= 109.0kbits/s speed=   1x    
video:1280kB audio:20kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 10.565611%

@ZgreG,

Your command and output seem fine.
Although I am very confused about this:

Why does it work correctly from the outside and not from the server itself? does the server have a different IP for this hostname in /etc/hosts or something?

At any rate, while streaming, you’re suppose to see files added to
/var/tmp/hlsme:

Test-0.ts
Test.m3u8

and so on…
If you do not, what permissions are set on the /var/tmp/hlsme dir?
Also, what’s in the logs under /opt/kaltura/log/nginx?

It shouldn’t include ‘.m3u8’.
Your previous command was fine. See my last reply,
Also, you seem to alternate between upper and lower case, please make sure to be consistent. On a UNIX FS ‘TesT’, ‘test’ and ‘Test’ are not the same thing.

@jess

Ok, some news …
On the server, I try this command :

ffmpeg -re -i /var/local/PAP-test.mp4 -c copy -f flv “rtmp://5.135.188.49:1935/kLive/test”

The encoding process good without any error message :

ffmpeg version 3.2 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.8.2 (GCC) 20140120 (Red Hat 4.8.2-16)
  configuration: --prefix=/opt/kaltura/ffmpeg-3.2 --libdir=/opt/kaltura/ffmpeg-3.2/lib --shlibdir=/opt/kaltura/ffmpeg-3.2/lib --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC' --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC -I/opt/kaltura/include' --extra-ldflags=-L/opt/kaltura/lib --disable-devices --enable-bzlib --enable-libgsm --enable-libmp3lame --enable-libschroedinger --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libx265 --enable-avisynth --enable-libxvid --enable-filter=movie --enable-avfilter --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libvpx --enable-libspeex --enable-libass --enable-postproc --enable-pthreads --enable-static --enable-shared --enable-gpl --disable-debug --disable-optimizations --enable-gpl --enable-pthreads --enable-swscale --enable-vdpau --enable-bzlib --disable-devices --enable-filter=movie --enable-version3 --enable-indev=lavfi --enable-x11grab
  libavutil      55. 34.100 / 55. 34.100
  libavcodec     57. 64.100 / 57. 64.100
  libavformat    57. 56.100 / 57. 56.100
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/local/PAP-test.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : HandBrake 0.10.0 2014112200
  Duration: 00:01:48.08, start: 0.080000, bitrate: 103 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 97 kb/s, 25 fps, 25 tbr, 90k tbn, 180k tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 1 kb/s (default)
    Metadata:
      handler_name    : Mono
Output #0, flv, to 'rtmp://5.135.188.49:1935/kLive/test':
  Metadata:
    major_brand     : mp42
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.56.100
    Stream #0:0(und): Video: h264 (Main) ([7][0][0][0] / 0x0007), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 97 kb/s, 25 fps, 25 tbr, 1k tbn, 90k tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (LC) ([10][0][0][0] / 0x000A), 48000 Hz, mono, 1 kb/s (default)
    Metadata:
      handler_name    : Mono
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 2700 fps= 25 q=-1.0 Lsize=    1437kB time=00:01:48.05 bitrate= 109.0kbits/s speed=   1x    
video:1280kB audio:20kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 10.562756%

But nothing in the folder /var/tmp/hlsme.

The permissions for the folder /var/tmp/hlsme are :
> drwxr-xr-x 2 kaltura apache 4096 Jun 16 11:38 hlsme

The kaltura_nginx_access.log and the kaltura_nginx_errors.log are empty.

The service kaltura-nginx is running good.

service kaltura-nginx status

Redirecting to /bin/systemctl status  kaltura-nginx.service
● kaltura-nginx.service - nginx - high performance web server
   Loaded: loaded (/usr/lib/systemd/system/kaltura-nginx.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2017-06-14 12:58:14 CEST; 2 days ago
     Docs: http://nginx.org/en/docs/
  Process: 28986 ExecReload=/bin/kill -s HUP $MAINPID (code=exited, status=0/SUCCESS)
 Main PID: 899 (nginx)
   CGroup: /system.slice/kaltura-nginx.service
           ├─  899 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
           ├─28987 nginx: worker process
           ├─28988 nginx: worker process
           ├─28989 nginx: worker process
           ├─28990 nginx: worker process
           └─28991 nginx: cache manager process
Jun 14 12:58:08 vodyou.fr systemd[1]: Starting nginx - high performance web server...
Jun 14 12:58:13 vodyou.fr nginx[322]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Jun 14 12:58:14 vodyou.fr nginx[322]: nginx: configuration file /etc/nginx/nginx.conf test is successful
Jun 14 12:58:14 vodyou.fr systemd[1]: Started nginx - high performance web server.
Jun 15 03:35:45 vodyou.fr systemd[1]: Reloaded nginx - high performance web server.

Edit /etc/nginx/nginx.conf so that:

error_log  /opt/kaltura/log/kaltura_nginx_errors.log;

becomes:

error_log  /opt/kaltura/log/kaltura_nginx_errors.log debug;

Then restart the Nginx daemon with:
# service kaltura-nginx restart
Try to stream again and look at what’s outputted to /opt/kaltura/log/kaltura_nginx_errors.log

@jess

Ok I’ve some results now in kaltura_nginx_errors.log :slight_smile:

SERVER SIDE

ffmpeg -re -i /var/local/PAP-test.mp4 -c copy -f flv “rtmp://5.135.188.49:1935/kLive/test”

2017/06/16 18:49:01 [notice] 14763#14763: using the "epoll" event method
2017/06/16 18:49:01 [notice] 14763#14763: nginx/1.12.0
2017/06/16 18:49:01 [notice] 14763#14763: built by gcc 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC)
2017/06/16 18:49:01 [notice] 14763#14763: OS: Linux 3.14.32-xxxx-grs-ipv6-64
2017/06/16 18:49:01 [notice] 14763#14763: getrlimit(RLIMIT_NOFILE): 1024:4096
2017/06/16 18:49:01 [notice] 14765#14765: start worker processes
2017/06/16 18:49:01 [notice] 14765#14765: start worker process 14766
2017/06/16 18:49:01 [notice] 14765#14765: start worker process 14767
2017/06/16 18:49:01 [notice] 14765#14765: start worker process 14768
2017/06/16 18:49:01 [warn] 14766#14766: audio_filter_process_init: failed to get AAC encoder, audio filtering is disabled. recompile libavcodec with libfdk_aac to enable it
2017/06/16 18:49:01 [notice] 14765#14765: start worker process 14769
2017/06/16 18:49:01 [notice] 14765#14765: start cache manager process 14770
2017/06/16 18:49:01 [warn] 14767#14767: audio_filter_process_init: failed to get AAC encoder, audio filtering is disabled. recompile libavcodec with libfdk_aac to enable it
2017/06/16 18:49:01 [warn] 14768#14768: audio_filter_process_init: failed to get AAC encoder, audio filtering is disabled. recompile libavcodec with libfdk_aac to enable it
2017/06/16 18:49:01 [warn] 14769#14769: audio_filter_process_init: failed to get AAC encoder, audio filtering is disabled. recompile libavcodec with libfdk_aac to enable it
2017/06/16 18:49:01 [warn] 14770#14770: audio_filter_process_init: failed to get AAC encoder, audio filtering is disabled. recompile libavcodec with libfdk_aac to enable it
2017/06/16 18:49:07 [notice] 14765#14765: signal 3 (SIGQUIT) received, shutting down
2017/06/16 18:49:07 [notice] 14766#14766: gracefully shutting down
2017/06/16 18:49:07 [notice] 14768#14768: gracefully shutting down
2017/06/16 18:49:07 [notice] 14767#14767: gracefully shutting down
2017/06/16 18:49:07 [notice] 14769#14769: gracefully shutting down
2017/06/16 18:49:07 [notice] 14766#14766: exiting
2017/06/16 18:49:07 [notice] 14768#14768: exiting
2017/06/16 18:49:07 [notice] 14767#14767: exiting
2017/06/16 18:49:07 [notice] 14769#14769: exiting
2017/06/16 18:49:07 [notice] 14768#14768: exit
2017/06/16 18:49:07 [notice] 14767#14767: exit
2017/06/16 18:49:07 [notice] 14766#14766: exit
2017/06/16 18:49:07 [notice] 14770#14770: exiting
2017/06/16 18:49:07 [notice] 14769#14769: exit
2017/06/16 18:49:07 [notice] 14765#14765: signal 17 (SIGCHLD) received
2017/06/16 18:49:07 [notice] 14765#14765: cache manager process 14770 exited with code 0
2017/06/16 18:49:07 [notice] 14765#14765: signal 29 (SIGIO) received
2017/06/16 18:49:07 [notice] 14765#14765: signal 17 (SIGCHLD) received
2017/06/16 18:49:07 [notice] 14765#14765: worker process 14767 exited with code 0
2017/06/16 18:49:07 [notice] 14765#14765: worker process 14768 exited with code 0
2017/06/16 18:49:07 [notice] 14765#14765: signal 29 (SIGIO) received
2017/06/16 18:49:07 [notice] 14765#14765: signal 15 (SIGTERM) received, exiting
2017/06/16 18:49:07 [notice] 14765#14765: signal 17 (SIGCHLD) received
2017/06/16 18:49:07 [notice] 14765#14765: worker process 14766 exited with code 0
2017/06/16 18:49:07 [notice] 14765#14765: signal 29 (SIGIO) received
2017/06/16 18:49:07 [notice] 14765#14765: signal 17 (SIGCHLD) received
2017/06/16 18:49:07 [notice] 14765#14765: worker process 14769 exited with code 0
2017/06/16 18:49:07 [notice] 14765#14765: exit
2017/06/16 18:49:22 [notice] 14862#14862: using the "epoll" event method
2017/06/16 18:49:22 [notice] 14862#14862: nginx/1.12.0
2017/06/16 18:49:22 [notice] 14862#14862: built by gcc 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC)
2017/06/16 18:49:22 [notice] 14862#14862: OS: Linux 3.14.32-xxxx-grs-ipv6-64
2017/06/16 18:49:22 [notice] 14862#14862: getrlimit(RLIMIT_NOFILE): 1024:4096
2017/06/16 18:49:22 [notice] 14864#14864: start worker processes
2017/06/16 18:49:22 [notice] 14864#14864: start worker process 14865
2017/06/16 18:49:22 [notice] 14864#14864: start worker process 14866
2017/06/16 18:49:22 [notice] 14864#14864: start worker process 14867
2017/06/16 18:49:22 [notice] 14864#14864: start worker process 14868
2017/06/16 18:49:22 [notice] 14864#14864: start cache manager process 14869
2017/06/16 18:49:22 [warn] 14865#14865: audio_filter_process_init: failed to get AAC encoder, audio filtering is disabled. recompile libavcodec with libfdk_aac to enable it
2017/06/16 18:49:22 [warn] 14867#14867: audio_filter_process_init: failed to get AAC encoder, audio filtering is disabled. recompile libavcodec with libfdk_aac to enable it
2017/06/16 18:49:22 [warn] 14866#14866: audio_filter_process_init: failed to get AAC encoder, audio filtering is disabled. recompile libavcodec with libfdk_aac to enable it
2017/06/16 18:49:22 [warn] 14868#14868: audio_filter_process_init: failed to get AAC encoder, audio filtering is disabled. recompile libavcodec with libfdk_aac to enable it
2017/06/16 18:49:22 [warn] 14869#14869: audio_filter_process_init: failed to get AAC encoder, audio filtering is disabled. recompile libavcodec with libfdk_aac to enable it
2017/06/16 18:49:44 [info] 14865#14865: *1 client connected '5.135.188.49'
2017/06/16 18:49:44 [info] 14865#14865: *1 connect: app='kLive' args='' flashver='FMLE/3.0 (compatible; Lavf57.56' swf_url='' tc_url='rtmp://5.135.188.49:1935/kLive' page_url='' acodecs=0 vcodecs=0 object_encoding=0, client: 5.135.188.49, server: 0.0.0.0:1935
2017/06/16 18:49:44 [info] 14865#14865: *1 createStream, client: 5.135.188.49, server: 0.0.0.0:1935
2017/06/16 18:49:45 [info] 14865#14865: *1 publish: name='test' args='' type=live silent=0, client: 5.135.188.49, server: 0.0.0.0:1935
2017/06/16 18:51:33 [info] 14865#14865: *1 deleteStream, client: 5.135.188.49, server: 0.0.0.0:1935
2017/06/16 18:51:33 [info] 14865#14865: *1 disconnect, client: 5.135.188.49, server: 0.0.0.0:1935
2017/06/16 18:51:33 [info] 14865#14865: *1 deleteStream, client: 5.135.188.49, server: 0.0.0.0:1935

CLIENT SIDE (wirh same error message at the end of stream)

ffmpeg -re -i /Users/Greg/Documents/www-dev/Kimsufi-GreG/Sources/PAP-test/tests/PAP-test.mp4 -c copy -f flv “rtmp://vodyou.fr:1935/kLive/Test”

2017/06/16 19:02:30 [info] 14868#14868: *2 client connected '82.235.134.184'
2017/06/16 19:02:30 [info] 14868#14868: *2 connect: app='kLive' args='' flashver='FMLE/3.0 (compatible; Lavf57.73' swf_url='' tc_url='rtmp://vodyou.fr:1935/kLive' page_url='' acodecs=0 vcodecs=0 object_encoding=0, client: 82.235.134.184, server: 0.0.0.0:1935
2017/06/16 19:02:30 [info] 14868#14868: *2 createStream, client: 82.235.134.184, server: 0.0.0.0:1935
2017/06/16 19:02:30 [info] 14868#14868: *2 publish: name='Test' args='' type=live silent=0, client: 82.235.134.184, server: 0.0.0.0:1935
2017/06/16 19:04:18 [info] 14868#14868: *2 deleteStream, client: 82.235.134.184, server: 0.0.0.0:1935
2017/06/16 19:04:18 [info] 14868#14868: *2 disconnect, client: 82.235.134.184, server: 0.0.0.0:1935
2017/06/16 19:04:18 [info] 14868#14868: *2 deleteStream, client: 82.235.134.184, server: 0.0.0.0:1935

And yet, you’re saying that WHILE STREAMING there is nothing under /var/tmp/hlsme/? After the ffmpeg command is done the files will be cleared so I want to make sure you are checking this while actively streaming and not afterwards.

@jess
Yes I’ve just checked with my client stream.

I’m not sure what you mean by “I checked with client stream”…
What I want you to do is run the ffmpeg command and then SSH to the server and run:
# ls -al /var/tmp/hlsme

I launch the stream with my client and checked on the server folder.

So I found the files …
They are in :

/var/tmp/systemd-private-#KEY#-kaltura-nginx.service-WH2Hue/tmp/hlsme

And I confirm that at the end, the files are deleted.

I don’t understand what /var/tmp/systemd-private-#KEY#-kaltura-nginx.service-WH2Hue/tmp/hlsme is…
The Nginx config has:

hls_path /var/tmp/hlsme/;

in /etc/nginx/nginx.conf
When streaming, do you or do you not see the m3u8 and the ts files there?
Did you change the configuration to place the files in a different path? if so, why? if not, what’s under /var/tmp/hlsme when you stream?

No, I didn’t change the path in nginx.conf

# RTMP configuration
rtmp {
    server {
	listen 1935; # Listen on standard RTMP port
        chunk_size 4000;

        # This application is to accept incoming stream
        application kLive {
                live on; # Allows live input from above
                dash on;
                dash_path /var/tmp/dashme;

                hls on; # Enable HTTP Live Streaming
                hls_cleanup on;
                hls_sync 100ms;
                hls_fragment 2s;

                hls_path /var/tmp/hlsme/;


        }
    }
}

I see the m3u8 file and all TS files, during streaming, in the folder :
/var/tmp/systemd-private-#KEY#-kaltura-nginx.service-WH2Hue/tmp/hlsme

I don’t know why !!!