rtsp-stream icon indicating copy to clipboard operation
rtsp-stream copied to clipboard

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

Open jenbhu opened this issue 1 year ago • 1 comments

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 ?

jenbhu avatar Jun 22 '23 14:06 jenbhu

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",
	}

0000sir avatar Nov 16 '23 06:11 0000sir