Capture H.264 frames in appsink

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

Capture H.264 frames in appsink

Gary Metalle

Hi

 

I’m trying to write an app that will capture H.264 frames from an IP camera via an RTSP source into an app sink. It’s actually a shared library for a SIP application for video calls. As long as I can extract the H.264 frames and forward them on, I don’t have much to do to get this working.

 

Here is the pipeline I’m using:

 

rtspsrc name=rtspsrc is-live=TRUE location="rtsp://admin:admin@192.168.1.51:554/stream1" latency=100 ! rtph264depay name=depay ! video/x-h264,stream-format=byte-stream,alignment=nal ! appsink name=sink emit-signals=TRUE drop=TRUE

 

I seem to be capturing frames ok and I’d even go as far as saying they are valid, but from debug output further up the chain there doesn’t appear to be a reference frames and when I try to view the remote video I just see a black screen (once and only once I saw a broken up image). I have also tried adding the width/height/framerate fields in as well, but that hasn’t helped.

 

The fact that I don’t think there are any keyframes makes me nervous and perhaps (probably) why the remote side is showing a black screen because it is only receiving difference frames. The camera source is set-up to be 720x480 at 20 fps, iframe interval is 20, VBR 5000 kbps.

 

Regards

 

Gary Metalle

Embedded Software Engineer

 


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

Re: Capture H.264 frames in appsink

Yasushi SHOJI-2
Hi Gary,

On Fri, Apr 7, 2017 at 6:53 PM, Gary Metalle <[hidden email]> wrote:
> I seem to be capturing frames ok and I’d even go as far as saying they are
> valid, but from debug output further up the chain there doesn’t appear to be
> a reference frames and when I try to view the remote video I just see a
> black screen (once and only once I saw a broken up image). I have also tried
> adding the width/height/framerate fields in as well, but that hasn’t helped.

Make sure that your stream doesn't have any IDR with other method.

I just googled and found this:
http://stackoverflow.com/q/1957427/

Also, if you own the IP Cam, check its manual and see if it's possible to
change interval of IDR.  It might be longer than you expected.

Hope this helps,
--
           yashi
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel