Closed MisterKirill closed 7 months ago
How did you fix this, if you did?
For future reference and people that have the same problem, I have a fix! It seems the command that NMS uses to transcode FLV to HLS is causing problems. The fix is as follows:
In NMS, look for node_trans_session.js.
Around line 67 it sets loads of arguments to run. I will paste what I have below and you can change it for whatever you need.
let argv = ['-i', inPath];
// Array.prototype.push.apply(argv, ['-c:v', vc]);
// Array.prototype.push.apply(argv, this.conf.vcParam);
// Array.prototype.push.apply(argv, ['-c:a', ac]);
// Array.prototype.push.apply(argv, this.conf.acParam);
Array.prototype.push.apply(argv, ['-c:v', 'h264', '-c:a', 'aac', '-strict', '-2', '-f', 'hls', '-x264-params', 'keyint=15:min-keyint=15', '-hls_time', '1', '-hls_flags', 'delete_segments', '-hls_list_size', '20', '-http_persistent', '0', mapStr]);
Maybe someone could look into the real problem and create a pull request to fix it.
Probably a problem with Hls.js, but when I'm trying to load stream in player like this:
it works perfectly only if the first segment is exist in playlist, and if there is no first segment, it loads only like 5 seconds of black screen:![Screenshot 2023-11-19 142504](https://github.com/illuspas/Node-Media-Server/assets/87936030/41f8ed37-ced8-410b-9ad0-5cdcbea5589b)
Node media server configuration: