I’m using GStreamer 1.18.4 attempting to connect to an RTSP live camera and convert the stream to HLS format. While I successfully connect to the stream and generate the playlist.m3u8
and video segments, I’m encountering an issue. When playing the entire playlist in VLC or through an HTML video element, the video appears corrupted. Although each segment looks fine on its own, the complete playlist exhibits pixelation on moving objects, such as cars and people, and there is no audio.
Here’s the GStreamer command I used:
gst-launch-1.0 -v -e rtspsrc protocols=tcp location=rtsp://<rtsp-address>:8554/stream ! queue ! rtph264depay ! h264parse ! mpegtsmux ! hlssink location="%06d.ts" target-duration=5
I attempted to use hlssink2, but I wasn’t able to get any output. I received a warning: WARNING: erroneous pipeline: could not link mpegtsmux0 to hlssink2-0
.
I tried the following SO answer but I got the same pixelated result.
When I use filesink
, the output appears fine, so it seems like the issue may be related to how I’m using hlssink
.
Any idea what’s wrong with my HLS playlist?