1

My goal is to stream a color map to rtsp and from there to stream it to kvs. By color map I mean that I've created a numpy matrix, 32x24x3, that I write to the screen at around 7 fps, as shown here: Sending OpenCV output to VLC stream and convert it to an RTSP stream. My line is:

python3 rtsp.py | vlc -I dummy --demux=rawvideo --rawvid-fps=7 --rawvid-width=32 --rawvid-height=24 --rawvid-chroma=RV24 - --sout "#transcode{vcodec=mp4v,vb=200,fps=7,width=32,height=24,samplerate=44100}:rtp{sdp=rtsp://127.0.0.1:8557/color.sdp}"

This works and if I open the vlc GUI I can read it and see the frames. My next goal is to stream it to kvs using gstreamer. Usually I stream h264 source to kvssink and it looks like that (from amazon's tutorial):

 gst-launch-1.0 rtspsrc location="rtsp://127.0.0.1:8557/color.sdp"  ! rtph264depay ! video/x-h264, format=avc,alignment=au ! kvssink stream-name="colorStream" storage-size=512

But it seems that the gstreamer can't read the frames and I get:

INFO - freeKinesisVideoStream(): Freeing Kinesis Video stream.
DEBUG - curlApiCallbacksShutdownActiveRequests(): pActiveRequests hashtable is empty

I've tried all kinds of codecs but nothing works. Does anybody maybe have another solution?

dorforer
  • 71
  • 1
  • 4

1 Answers1

0

Amazon's documentation is either outdated or only works for some system configurations. I had the same issue and had to use a different gstreamer incantation. For you it would look like:

gst-launch-1.0 rtspsrc location="rtsp://127.0.0.1:8557/color.sdp"  ! rtph264depay ! h264parse ! kvssink stream-name="colorStream" storage-size=512

Note the h264parse in place of video/x-h264, format=avc,alignment=au. I spent hours figuring this one out and the lightbulb in my head went off after using the debug guide to precisely jack up the debug level of the part of the pipeline dropping frames, and then reading this issue thread on the KVS producer sdk repo.

I'm not a gstreamer expert and can't explain why this works, or why this plugin is considered "bad", but I hope this helps others stranded in the same problem.

3martini
  • 510
  • 2
  • 13