[Live-devel] Once again, SDP support for Live555 & interaction with FFMpeg ...

Dan Dennedy ddennedy at gmail.com
Tue Sep 15 14:41:38 PDT 2009


On Thu, Aug 27, 2009 at 6:52 AM, Sandy Walsh <swalsh at impathnetworks.com> wrote:
> Hi,
>
> We have a multicast stream, initiated from another process, which generates
> an .SDP file for the stream
>
> v=0
> o=MangoDSP 126 14843616424497153183 IN IP4 192.168.0.62
> s=Mango DSP Audio/Video
> m=video 7170 RTP/AVP 96
> a=rtpmap:96 H264/90000
> c=IN IP4 232.0.0.11
> a=fmtp:96
> packetization-mode=1;profile-level-id=42001E;sprop-parameter-sets=Z0KAHkLaAtD0QA==,aEjgGody
> a=control:__StreamID=270385256
>
> We've searched through the Live555 archives and there is mention of passing
> this to MediaSession::createNew(), but we're sort of stumped on making this
> a reality.
>
> Instead let me explain what we hope to achieve and perhaps someone can give
> some guidance?
>
> Ultimately our plan is to pass the stream onto FFMpeg for decoding/storage.
> When we try to open this stream directly with FFMpeg it takes forever (and
> often never) for the program to lock onto the stream, so perhaps there is a
> problem with ffmpeg and this h264 stream. But, when we open a unicast stream
> with openRTSP and pipe the output to ffmpeg it works fine.
>
> My question is, what processing beyond the RTSP negotiation does openRTSP do
> on the actual video stream? Does it strip off some network wrapper from the
> stream and pass a raw h.264 stream along for processing?

yes, it does not process the video stream other than re-framing from
network packetization.

> We're not really clear what value openRTSP brings to us solving our problem
> if we aren't using the RTSP handshake?

If it helps, I have made a testProgs/openSDP.cpp. You will have to
adjust the Makefiles to build it (or compile manually), and it
supports most of the options that openRTSP does since it just uses
playCommon. Um, I suppose it could be slightly out-of-date - I think
the last snapshot I compile it against was from February of this year.
Ross can consider including it if he thinks it will help reduce his
support burden (I surrender all rights to the following code).

#include "playCommon.hh"

Medium* createClient(UsageEnvironment& env,
                     int verbosityLevel, char const* applicationName) {
	return ServerMediaSession::createNew(env);
}

char* getOptionsResponse(Medium* client, char const* url) {
  return NULL;
}

char* getSDPDescriptionFromURL(Medium* client, char const* url,
			       char const* username, char const* password,
			       char const* /*proxyServerName*/,
			       unsigned short /*proxyServerPortNum*/,
			       unsigned short /*clientStartPort*/) {
  FILE *f = fopen(url, "r");
  char data[4096];

  data[0] = 0;
  if (f) {
    fread(data, sizeof(data), 1, f);
    fclose(f);
  }
  return strdup(data);
}

Boolean clientSetupSubsession(Medium* client, MediaSubsession* subsession,
			      Boolean streamUsingTCP) {
  subsession->sessionId = "mumble"; // anything that's non-NULL will work
  return True;
}

Boolean clientStartPlayingSession(Medium* client,
				  MediaSession* session) {
  return True;
}

Boolean clientTearDownSession(Medium* client,
			      MediaSession* session) {
  return True;
}

Boolean allowProxyServers = False;
Boolean controlConnectionUsesTCP = False;
Boolean supportCodecSelection = False;
char const* clientProtocolName = "SDP";


More information about the live-devel mailing list