decode rtsp video stream from IP camera

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

decode rtsp video stream from IP camera

Stefan Ulbrich
Hi

I am trying to display a RTSP stream from two different onvif cameras which I start with 

gst-launch-1.0 rtspsrc --gst-debug=3 user-id="admin" user-pw="admin" location="rtsp://192.168.42.3:554/1/h264major" ! rtph264depay ! h264parse !  avdec_h264 ! autovideosink  # (with and w/h264parse)

The output shows a repeating 

0:00:05.663361958 11664 0x7f44600014a0 WARN            videodecoder gstvideodecoder.c:732:gst_video_decoder_setcaps:<avdec_h264-0> Subclass refused caps

Both streams can be displayed with mplayer and vlc

Any advice how to debug the problem?

Best
Stefan

PS: 
  • Ubuntu 16.04
  • Gst-Build (1.14 branch)
  • FFMPEG (release/3.4 branch, newer version failed to build)



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: decode rtsp video stream from IP camera

Olivier Crête-3
Hi,

Try doing "avdec_h264 ! videoconvert ! videoscale ! autovideosink", your video sink may not support the color format or size of the video so you may require a software conversion or scaling.

Olivier

On Mon, 2018-07-16 at 20:05 +0200, Stefan Ulbrich wrote:
Hi

I am trying to display a RTSP stream from two different onvif cameras which I start with 

gst-launch-1.0 rtspsrc --gst-debug=3 user-id="admin" user-pw="admin" location="rtsp://192.168.42.3:554/1/h264major" ! rtph264depay ! h264parse !  avdec_h264 ! autovideosink  # (with and w/h264parse)

The output shows a repeating 

0:00:05.663361958 11664 0x7f44600014a0 WARN            videodecoder gstvideodecoder.c:732:gst_video_decoder_setcaps:<avdec_h264-0> Subclass refused caps

Both streams can be displayed with mplayer and vlc

Any advice how to debug the problem?

Best
Stefan

PS: 
  • Ubuntu 16.04
  • Gst-Build (1.14 branch)
  • FFMPEG (release/3.4 branch, newer version failed to build)


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-- 
Olivier Crête [hidden email]

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: decode rtsp video stream from IP camera

Gst-Geek
In reply to this post by Stefan Ulbrich
Hi Stefan,

Use videoconvert and videoscale before the autovideosink for appropriate
conversion.

Also
rtsp decoding is slightly complicated. Use uridecodebin instead.
gst-launch-1.0 rtspsrc --gst-debug=3 uridecodebin
uri="rtsp://admin@admin:192.168.42.3:554/1/h264major" ! videoconvert !
videoscale !! autovideosink



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: decode rtsp video stream from IP camera

Stefan Ulbrich
In reply to this post by Olivier Crête-3
Hi 

Thanks for the answer. That did not change the output at all. It seems that it is the input that comes into the decoder that is incompatible

gst-launch-1.0 rtspsrc --gst-debug=3 [...] ! rtph264depay ! fakesink silent=false -v

produces:
> /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (12632 bytes, dts: none, pts: 0:00:03.014234812, duration: none, offset: -1, offset_end: -1, flags: 00002000 delta-unit , meta: none) 0x7f1ea8076520

Sometimes (nondeterministicly), I get "ERROR  libav :0:: no frame!"  

Best
Stefan

On Mon, Jul 16, 2018 at 9:59 PM Olivier Crête <[hidden email]> wrote:
Hi,

Try doing "avdec_h264 ! videoconvert ! videoscale ! autovideosink", your video sink may not support the color format or size of the video so you may require a software conversion or scaling.

Olivier

On Mon, 2018-07-16 at 20:05 +0200, Stefan Ulbrich wrote:
Hi

I am trying to display a RTSP stream from two different onvif cameras which I start with 

gst-launch-1.0 rtspsrc --gst-debug=3 user-id="admin" user-pw="admin" location="rtsp://192.168.42.3:554/1/h264major" ! rtph264depay ! h264parse !  avdec_h264 ! autovideosink  # (with and w/h264parse)

The output shows a repeating 

0:00:05.663361958 11664 0x7f44600014a0 WARN            videodecoder gstvideodecoder.c:732:gst_video_decoder_setcaps:<avdec_h264-0> Subclass refused caps

Both streams can be displayed with mplayer and vlc

Any advice how to debug the problem?

Best
Stefan

PS: 
  • Ubuntu 16.04
  • Gst-Build (1.14 branch)
  • FFMPEG (release/3.4 branch, newer version failed to build)


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-- 
Olivier Crête [hidden email]
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


--


Dr. Stefan Ulbrich | Principal Research Scientist

Website www.acceptto.com

Mobile +1 971 2854853

+49 179 7303230


Confidentiality Notice:This electronic transmission from Acceptto corporation contains information which is confidential and/or privileged. The information is intended for use only by the individual or entity named above. If you are not the intended recipient (or the employee or agent responsible for delivering this information to the intended recipient), you are hereby notified that any use, dissemination, distribution, or copying of this communication is prohibited. If you have received this information in error, please notify us immediately by replying to this email or telephoning us. Thank you.



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: decode rtsp video stream from IP camera

Stefan Ulbrich
I tried the same commands with both cameras on Ubuntu 18.04 – here they work perfectly fine (but it consumes quite a lot of resources–is there hardware acceleration possible?).

Nevertheless, I would love to locate the error source and use a custom build of gstreamer. How could I further debug into the problem?



On Tue, Jul 17, 2018 at 12:49 PM Stefan Ulbrich <[hidden email]> wrote:
Hi 

Thanks for the answer. That did not change the output at all. It seems that it is the input that comes into the decoder that is incompatible

gst-launch-1.0 rtspsrc --gst-debug=3 [...] ! rtph264depay ! fakesink silent=false -v

produces:
> /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (12632 bytes, dts: none, pts: 0:00:03.014234812, duration: none, offset: -1, offset_end: -1, flags: 00002000 delta-unit , meta: none) 0x7f1ea8076520

Sometimes (nondeterministicly), I get "ERROR  libav :0:: no frame!"  

Best
Stefan

On Mon, Jul 16, 2018 at 9:59 PM Olivier Crête <[hidden email]> wrote:
Hi,

Try doing "avdec_h264 ! videoconvert ! videoscale ! autovideosink", your video sink may not support the color format or size of the video so you may require a software conversion or scaling.

Olivier

On Mon, 2018-07-16 at 20:05 +0200, Stefan Ulbrich wrote:
Hi

I am trying to display a RTSP stream from two different onvif cameras which I start with 

gst-launch-1.0 rtspsrc --gst-debug=3 user-id="admin" user-pw="admin" location="rtsp://192.168.42.3:554/1/h264major" ! rtph264depay ! h264parse !  avdec_h264 ! autovideosink  # (with and w/h264parse)

The output shows a repeating 

0:00:05.663361958 11664 0x7f44600014a0 WARN            videodecoder gstvideodecoder.c:732:gst_video_decoder_setcaps:<avdec_h264-0> Subclass refused caps

Both streams can be displayed with mplayer and vlc

Any advice how to debug the problem?

Best
Stefan

PS: 
  • Ubuntu 16.04
  • Gst-Build (1.14 branch)
  • FFMPEG (release/3.4 branch, newer version failed to build)


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel