nginx-ts-module icon indicating copy to clipboard operation
nginx-ts-module copied to clipboard

How to play mpegts without HLS

Open chamchenko opened this issue 7 years ago • 5 comments

Hi I now that to play mpegts hls i have to use this link http://127.0.0.1:8000/play/hls/sintel/index.m3u8 but how to play the mpegts without hls I really have no clue

chamchenko avatar Feb 25 '18 21:02 chamchenko

Got myself thinking the same thing... Is it possible to just create a mpegts output?

shinctl avatar Mar 04 '18 16:03 shinctl

No clue for now and no one is answering if it's even possible. If you get anything about it please let me know

chamchenko avatar Mar 05 '18 19:03 chamchenko

Currently it's not possible. I was planning to implement exec feature, which would run ffmpeg (or whatever you want) with the original mpegts on input. This ffmpeg would send/transcode this mpegts. Maybe this can partially solve the issue. I'm currently short on time, but the code is mostly ready and I will undoubtedly finish it.

But reading mpegts from nginx is something that I didn't plan to support. One major reason for this is the following. If you have multiple workers, the mpegts client may connect to a wrong worker and have nothing to read. To fix this something like rtmp-auto-push should be implemented, which is a huge hack.

arut avatar Apr 06 '18 13:04 arut

@arut Are you still planning on implementing this exec function? Would greatly help me, since that would enable me to record the incoming stream with FFmpeg or running a script.

My use case is as follows: I have a remote IP camera and an Intel Edison which can retrieve the stream of this camera. Now I want to stream the content to a remote server and store the stream there and serve it as HLS. But the traversal of both streams needs to be secure, which prevents me from using your nginx-rtmp module, because FFmpeg and your module don't have support for RTMPS as far as I can tell. So this module would be ideal, because I can send the stream over HTTPS from the Edison to the server, but the only problem is that I can't record the stream. Any suggestions on how I could achieve this now? I was also thinking about using the HttpLua module to be able to run a script to do the recording, however as far as I can tell from the docs I don't have access to the stream name and therefore I can't use it to record..

cathmer avatar May 23 '18 16:05 cathmer

No clue for now and no one is answering if it's even possible. If you get anything about it please let me know

did you find a way to do this?

juni745 avatar Jul 30 '23 06:07 juni745