Search code examples
luastreamrtmpd

RTMPD, stream name not found in any storage


I find myself in a odd situation. I am trying to configure a streaming server, using this tutorial, but unfortunately with no success. Currently I have the newest version of rtmpd server (build number: 784), that can be found here. I installed it, following the instructions on the tutorial. So far so good, the problem is that I am unable to test the server with the flowplayer example.

The configuration file:

configuration=
{
  daemon=false,
  pathSeparator="/",
  logAppenders=
  {
      {
          name="console appender",
          type="coloredConsole",
          level=6
      },
      {
          name="file appender",
          type="file",
          level=6,
          fileName="/opt/crtmpserver/logs/crtmpserver.log",
      }
  },

  applications=
  {
      rootDirectory="applications",
      {
          description="FLV Playback",
          name="flvplayback",
          protocol="dynamiclinklibrary",
          default=true,
          aliases=
          {
              "simpleLive",
              "vod",
              "live",
              "WeeklyQuest",
              "SOSample",
              "oflaDemo",
          },
          acceptors =
          {
              {
                  ip="0.0.0.0",
                  port=1935,
                  protocol="inboundRtmp"
              },
              {
                  ip="0.0.0.0",
                  port=6666,
                  protocol="inboundLiveFlv",
                  waitForMetadata=true,
              },
              {
                  ip="0.0.0.0",
                  port=9999,
                  protocol="inboundTcpTs"
              },
          },

          externalStreams =
          {
              {
                  uri="rtsp://user:pass@link-to-stream",
                  localStreamName="pidg",
                  forceTcp=true,
              },
          },
          validateHandshake=true,
          keyframeSeek=true,
          seekGranularity=1.5, --in seconds, between 0.1 and 600
          clientSideBuffer=12, --in seconds, between 5 and 30
          --generateMetaFiles=true, --this will generate seek/meta files on application startup
          --renameBadFiles=false,
      mediaFolder="/opt/crtmpserver/media"
      },
  }
}

The link to the rtsp stream works and it has been tested with ffplay and vlc.

The error

I get, upon trying to connect to the stream is:

/thelib/src/netio/epoll/iohandlermanager.cpp:120 Handlers count changed: 3->4 IOHT_TCP_CARRIER
/thelib/src/netio/epoll/tcpacceptor.cpp:185 Client connected: 127.0.0.1:50947 -> 127.0.0.1:1935
/thelib/src/application/baseclientapplication.cpp:257 Stream NR(1) with name `` registered to application `flvplayback` from protocol IR(4)
/thelib/src/application/baseclientapplication.cpp:268 Stream NR(1) with name `` unregistered from application `flvplayback` from protocol IR(4)
/thelib/src/application/baseclientapplication.cpp:257 Stream NR(2) with name `` registered to application `flvplayback` from protocol IR(4)
/thelib/src/protocols/rtmp/basertmpappprotocolhandler.cpp:1043 Play request for stream name `pidg`. Start: -2; length: -1
/thelib/src/protocols/rtmp/basertmpappprotocolhandler.cpp:2164 No live streams found: `pidg` or `pidg`
/thelib/src/mediaformats/readers/streammetadataresolver.cpp:207 Stream name pidg not found in any storage
/thelib/src/protocols/rtmp/basertmpappprotocolhandler.cpp:1075 We are going to wait for the live stream `pidg`
/thelib/src/application/baseclientapplication.cpp:268 Stream NR(2) with name `` unregistered from application `flvplayback` from protocol IR(4)
/thelib/src/application/baseclientapplication.cpp:257 Stream ONR4R(3) with name `pidg` registered to application `flvplayback` from protocol IR(4)

The flowplayer

code is:

<script>
$f("rtmp_player", "http://releases.flowplayer.org/swf/flowplayer-3.2.18.swf", {
        clip: {
               url : 'pidg',
               live : true,
               provider: 'rtmp',
              },

        plugins: {
               rtmp: {
               url: 'flowplayer.rtmp-3.2.13.swf',
               netConnectionUrl: 'rtmp://127.0.0.1/flvplayback' ,
                       subscribe:true,

                }
              }
            });
</script>

I tried to make it as similar to the tutorial, since I can't share the stream at this point.

I've lost quite some time trying to solve it on my own, can you please help me?

EDIT:

After some tests I figured out that the problem is that the server doesn't stream the the external streams!


Solution

  • I'm interested on a pure rtmpd solution, but unfortunately I didn't have the time to provide one, so I decided to switch to libav for the encoding and stream it to 127.0.0.1:6666. The command I used was:

    avconv -options -i rtsp_link -options -f flv metadata -title='cam' -streamName='cam' 'tcp://127.0.0.1:6666'
    

    and I managed to play it from the link rtmp://127.0.0.1/live/cam

    If someone manages to provide a pure rtmpd solution I'll gladly accept it instead of my answer but for now, I will accept mine in case someone else is stuck on the same problem.