I'm trying to create a pipeline that will take periodic snapshots from an rtsp stream (ip camera) using the h264 decoder hardware in the Raspberry Pi.
From this pipeline: gst-launch-1.0 rtspsrc location=$cam user-id=$user user-pw=$pw latency=500 \ ! rtph264depay \ ! h264parse \ ! omxh264dec ! videoscale \ ! videorate drop-only=true max-rate=1 ! video/x-raw,framerate=1/30 ! jpegenc \ ! multifilesink location=$HOME/data/snapshot-%04d.jpg I get this error: ... Progress: (request) Sent PLAY request ERROR: from element /GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0: Internal data stream error. Additional debug info: gstomxvideodec.c(2886): gst_omx_video_dec_loop (): /GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0: stream stopped, reason not-negotiated Execution ended after 0:00:00.682983356 Setting pipeline to PAUSED ... ... Based on my research it looks like videorate can't handle a framerate=0/1? Which I think means it's a variable frame rate? I'm confused as to why this is happening because I can use this pipeline to display the video feed on the Raspberry Pi desktop: gst-launch-1.0 rtspsrc location=$cam user-id=$user user-pw=$pw latency=500 ! \ rtph264depay ! h264parse ! omxh264dec ! videoconvert ! videoscale ! autovideosink I can use this pipeline to capture .jpg snapshots form the rtsp stream using the main processor (but it uses 106% of the cpu) gst-launch-1.0 rtspsrc location=$cam user-id=$user user-pw=$pw latency=500 \ ! rtph264depay \ ! avdec_h264 ! videoscale \ ! videorate drop-only=true max-rate=1 ! video/x-raw,framerate=1/30 ! jpegenc \ ! multifilesink location=$HOME/data/snapshot-%04d.jpg \ I'm also wondering if there is a way to get the omxh264dec plugin to output a downsampled frame rate and/or resolution? Or does that have to be done in the general processor? |
Hi,
Did you get the solution to problem ? I am trying to do something similar and facing same issue, -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by geoffm
Can't really test, but a few comments. You should probably launch with
--gst-debug=4 (or whatever debug level) so that you can see what is failing to link. I'd also drop frames before scaling them. There's no reason to rescale every frame just to drop most of them. Something like gst-launch-1.0 rtspsrc location=$cam user-id=$user user-pw=$pw latency=500 \ ! rtph264depay \ ! h264parse ! omxh264dec \ ! videorate drop-only=true max-rate=1 ! video/x-raw,framerate=1/30 \ ! videoscale \ ! jpegenc ! multifilesink location=$HOME/data/snapshot-%04d.jpg Finally, this might have been a problem that was since fixed, but I once had an issue with textoverlay or similar where CPU usage was high when the color format was I420, but was just fine when it was RGBA. If the CPU usage is high, you can try specifying the format to convert to (like video/x-raw, format=RGBA). -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |