I have setup crtmpserver to stream over rtsp feeded by ffmpeg. I would like to add authentication (I prefer feeding only from local host and access only with a password) so I uncommented the entries in the user file and flvplayback. Now both feeding and connecting to the stream give me an error. When I now try to feed with ffmpeg with 'http://user1:password1@localhost:8554/live' then I get the error below. I probably am missing something obvious..... all suggestions welcome.
/build/buildd/crtmpserver-1.0~dfsg/thelib/src/netio/epoll/tcpacceptor.cpp:154 Client connected:
127.0.0.1:56785 ->
0.0.0.0:8554/build/buildd/crtmpserver-1.0~dfsg/thelib/src/netio/epoll/iohandlermanager.cpp:100 Handlers count changed: 2->3 IOHT_TCP_CARRIER
/build/buildd/crtmpserver-1.0~dfsg/thelib/src/protocols/rtp/rtspprotocol.cpp:709 Not enough data. Wanted: 291; got: 0
/build/buildd/crtmpserver-1.0~dfsg/thelib/src/protocols/rtp/rtspprotocol.cpp:709 Not enough data. Wanted: 291; got: 0
/build/buildd/crtmpserver-1.0~dfsg/thelib/src/protocols/http/httpauthhelper.cpp:229 Invalid character detected
/build/buildd/crtmpserver-1.0~dfsg/thelib/src/protocols/http/httpauthhelper.cpp:80 Unable to parse response: Digest username="user1",realm="My realm...",nonce="be61670412c275e87ad917c1e2bd36c0",uri="rtsp://localhost:8554/live",response="fff062142471dfe054aa640bcb993476",algorithm=MD5
/build/buildd/crtmpserver-1.0~dfsg/thelib/src/protocols/rtp/basertspappprotocolhandler.cpp:319 Authorization failed: challenge: Digest realm="My realm...", nonce="be61670412c275e87ad917c1e2bd36c0", algorithm="MD5"; response: Digest username="user1",realm="My realm...",nonce="be61670412c275e87ad917c1e2bd36c0",uri="rtsp://localhost:8554/live",response="fff062142471dfe054aa640bcb993476",algorithm=MD5
/build/buildd/crtmpserver-1.0~dfsg/thelib/src/netio/epoll/tcpcarrier.cpp:78 Unable to read data.
127.0.0.1:56785 ->
127.0.0.1:8554/build/buildd/crtmpserver-1.0~dfsg/thelib/src/netio/epoll/iohandlermanager.cpp:109 Handlers count changed: 3->2 IOHT_TCP_CARRIER
/build/buildd/crtmpserver-1.0~dfsg/thelib/src/protocols/protocolmanager.cpp:44 Enqueue for delete for protocol [RTSP(8)]
/build/buildd/crtmpserver-1.0~dfsg/thelib/src/application/baseclientapplication.cpp:216 Protocol [RTSP(8)] unregistered from application: flvplayback
# cat applications/flvplayback.lua
application=
{
description="FLV Playback Sample",
name="flvplayback",
protocol="dynamiclinklibrary",
mediaFolder="/var/lib/crtmpserver/mediaFolder",
aliases=
{
"simpleLive",
"vod",
"live",
"WeeklyQuest",
"SOSample",
"oflaDemo",
},
acceptors =
{
{
ip="0.0.0.0",
port=554,
protocol="inboundRtsp"
},
{
ip="0.0.0.0",
port=8554,
protocol="inboundRtsp"
},
},
externalStreams =
{
},
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,
--enableCheckBandwidth=true,
authentication=
{
rtmp={
type="adobe",
encoderAgents=
{
"FMLE/3.0 (compatible; FMSc/1.0)",
"My user agent",
},
usersFile="/etc/crtmpserver/conf.d/users.lua"
},
rtsp={
usersFile="/etc/crtmpserver/conf.d/users.lua"
}
},
}
# cat conf.d/users.lua
users=
{
broadcast="vbrick",
user1="password1",
user2="password2",
user3="password3",
gigi="spaima",
a="a",
}
realms=
{
{
name="My realm...",
method="Digest",
users={
"user1",
"user3"
},
},
{
name="My second realm...",
method="Basic",
users={
"user2",
"broadcast",
"user1",
"gigi"
},
}
}