Roverr / rtsp-stream

Out of box solution for RTSP - HLS live stream transcoding. Makes RTSP easy to play in browsers.
MIT License
711 stars 167 forks source link

Cannot play transcoded hls stream on video.js and hls player #86

Open jenbhu opened 1 year ago

jenbhu commented 1 year ago

The transcoded stream file works fine on VLC.

However, it does not play on web players like video.js or hls.js.

Is this normal or is there a special config to make ?

0000sir commented 9 months ago

I have the same problem, this project was abandoned, it use ffmpeg for transcoding videos, but not run it directly, instead reference from github.com/riltech/streamer, that's much more difficult to debug.

In streamer project, the vcodec was copy to target ts, so if the source RTSP video can't play on videojs or reacthls, then the hls cannot be played too.

processCommands := []string{
        "-y",
        "-fflags",
        "nobuffer",
        "-rtsp_transport",
        "tcp",
        "-i",
        URI,
        "-f",
        "lavfi",
        "-i",
        "anullsrc=channel_layout=stereo:sample_rate=44100",
        "-vsync",
        "0",
        "-copyts",
        "-vcodec",
        "copy",
        "-movflags",
        "frag_keyframe+empty_moov",
    }