7

PS: First time gstreamer user here. :)

Im trying to stream video from a logitech c920 webcam connected to a beaglebone using gstreamer to an nginx server. But somehow rtmpsink is failing on me. However, with filesink im able to save the video on the beaglebone. Though I still have some frame loss issues and no audio, I want the streaming part to be working first. The command Im using is

GST_DEBUG=4 GST_DEBUG_FILE=gst2.log gst-launch-1.0 -v -e uvch264src device=/dev/video0 name=src auto-start=true average-bitrate=5000000 iframe-period=33  src.vidsrc  ! queue ! video/x-h264,width=1920,height=1080,framerate=30/1 ! h264parse ! flvmux ! rtmpsink location="rtmp://192.168.1.104:1935/hls/movie"

My debug output is here. gist

gstreamer just quits within 5 seconds.

I verified that the streaming server works. But from the client, gstreamer is not giving me any kind of error messages. Or I dont know how to debug it properly.

Im stuck on this issue for the last so many days. Any help would be appreciated.

Thank you.

Update 1

: Im able to send a local file to my rtmp server with ffmpeg and server is handling it as expected.

ffmpeg -re -i /Users/r3dsm0k3/10.mp4 -vprofile baseline -ar 44100 -ac 1 -c copy -f flv rtmp://192.168.1.4:1935/hls/example

Tried gstreamer with fakesink and it doesn't give any errors.

Update 2

Tried with v4l2src as well, without luck.

1 Answer 1

5

Finally figured it out. It was rather simple but on the server side of things.

I had to add publish_time_fix off; in the nginx config for rtmp server.

Thanks to this blog.

1
  • I was using this config option for a long time but with gstreamer 1.14 it stopped working. Gstreamer was failing with WriteN, RTMP send error 32 and WriteN, RTMP send error 9. I removed publish_time_fix off; it and I can publish again. They changed flvmux to use GstAggregator I guess it needs the default publish_time_fix.
    – iomihai
    Apr 3, 2018 at 9:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.