1
votes

I'm trying to catch HD video stream with DirectShow, then preview it and write to file. Some time before I worked with h264 stream from standard video signal encoder (axis, 704x5..) and all was OK. (AxisRtspSourceFilter + Matroska muxer)

But that source filter doesn't work with HD encoder (OPR-NH100, 1080p) so I've tried to find another filter. (rtsp url is like rtsp://x.x.x.x:554/sdi)

I've installed some filters and none of them works appropriate. it seems that I don't understand something.

MV Stream Source, MVNetworkSource, VideoProcessingProject RTSP, - doesnt work

filter from http://rtpstream.com/ outputs MEDIASUBTYPE_H264_bis - dont know how to handle it

Unreal RTSP - works in graphedit but not in my application (actually, doesn't preview while doing only preview. When I start record to file, both video in preview window and in file are with large artefacts).

Datastead RTSP Source - works well preview+record, but I can play recorded file only with VLC(among players); graphedit crashes.

I suppose that i can dive into problems with unreal/datastead filters and resolve them - but im suspect that there are some points that I completely don't understand. I thought that task of handling rtsp stream in Windows/directshow is fairly ordinary and there are some standard solutions for that.

But there are several questions begining with "I wrote my own RTSP filter and..." here at stackoverflow - that what is confusing me.

May be better way is to work with ffmpeg library? What was stopping me from that is existing application working with directshow.

update there is output from ffmpeg with "-rtsp_transport tcp" http://pastebin.com/xTA7fykS

if I set UDP as transport for the encoder and ffmpeg, there are a lot of frame drops

RTP: missed 23 packets

and video is corrupted

2

2 Answers

2
votes

We use the MainConcept RTSP Filter from their NetworkStreaming SDK. It works pretty good. We also use their Codec-SDK so I don't know if you can use this filter with other multiplexers or decoders.

Before using this, we also tried other (free) RTSP-Filters but most of these are not working with all RTSP sources. If this camera works another doesn't and vice versa.

2
votes

Tried adding this as a comment, but it's too long:

I wrote the VPP RTSP source filter and can add some info on how they work: in an RTSP filter you're doing essentially doing 2 things:

  • translating the SDP received via RTSP into a DirectShow media type,
  • translating RTP packets into DirectShow media samples that downstream decoders understand.

In the VPP RTSP source filter, we only handle H.264 video and AMR, PCM, AAC, LATM audio i.e. we only perform the translation of the SDP for those media types.

However the underlying RTSP/RTP library (live555) that we wrap, handles many more media types (live555 is quite extensive) and it is usually quite simple to add more media type support to the RTSP source filter provided that - you have an RTSP server supporting the media type - you have the necessary DirectShow decoder filters.

Another cause for failure, could be that the downstream decoder is rejecting the connection to the RTSP source filter e.g. if the profile is not supported, etc.

Please post the SDP, that might contain some further clues.