ffmpeg+CRTMPServer+ffplay: File not found. fullPath:

2,474 views
Skip to first unread message

windj007

unread,
Mar 1, 2012, 4:18:12 PM3/1/12
to C++ RTMP Server
Hello!

First of all I'd like to thank you for good job! The server works "out
of the box" in case of flv-files' streaming.

I have the dataflow "ffmpeg -> crtmpserver -> ffplay" that is
configured as follows:

1) Launch crtmpserver using original crtmpserver.lua configuration
file (which was in tarball crtmpserver-717.tar.gz).

2) Launch ffmpeg:
ffmpeg -re -an -i <input file> -f flv -an -metadata
streamName="test" tcp://localhost:6666
As a result, ffmpeg starts to encode and to send video.
crtmpserver' output by the moment is in Listing 1 (in the end of
this letter).
Everything seems to be ok by the moment.

3) ffplay's command: ffplay -an rtmp://127.0.0.1/flvplayback/test

ffplay exits with the following error right away:
HandShake: client signature does not match!
rtmp server sent error
WriteN, RTMP send error 32 (42 bytes)
RTMP_ReadPacket, failed to read RTMP packet header
rtmp://127.0.0.1/flvplayback/test: Operation not permitted

crtmpserver outputs the following errors:
.../crtmpserver-717/sources/thelib/src/protocols/rtmp/streaming/
infilertmpstream.cpp:262 File not found. fullPath:
``
.../crtmpserver-717/sources/thelib/src/protocols/rtmp/
basertmpprotocol.cpp:505 Unable to get file stream.
Metadata:
<MAP name=""
isArray="false">
<INT32 name="clientSideBuffer">12</
INT32>
<BOOL name="externSeekGenerator">false</
BOOL>
<STR name="fileName">test.flv</
STR>
<STR name="fullPath"></
STR>
<BOOL name="keyframeSeek">true</
BOOL>
<STR name="mediaDir">/home/windj/projects/gtss/motion/</
STR>
<BOOL name="renameBadFiles">false</
BOOL>
<STR name="requestedStreamName">test</
STR>
<MAP name="rtmpMeta"
isArray="false">
<STR name="Server">C++ RTMP Server (http://www.rtmpd.com)</
STR>
</
MAP>
<UINT32 name="seekGranularity">1000</
UINT32>
<STR name="streamType">flv</
STR>
</
MAP>
.../crtmpserver-717/sources/thelib/src/protocols/rtmp/
basertmpappprotocolhandler.cpp:1966 No file streams found:
test
.../crtmpserver-717/sources/thelib/src/protocols/rtmp/
basertmpprotocol.cpp:799 Unable to send rtmp message to
application
.../crtmpserver-717/sources/thelib/src/netio/epoll/tcpcarrier.cpp:
88 Unable to signal data available


What's the matter?
CRTMPServer seems to receive video from ffmpeg correctly (the stream
named 'test' was registered to application 'flvplayback')...

Thank you!

***********
Listing 1 - crtmpserver's log just after ffmpeg launch:

.../crtmpserver-717/sources/thelib/src/netio/epoll/tcpacceptor.cpp:154
Client connected: 127.0.0.1:49654 ->
0.0.0.0:6666
.../crtmpserver-717/sources/thelib/src/protocols/liveflv/
inboundliveflvprotocol.cpp:46
parameters:
<MAP name=""
isArray="false">
<STR name="ip">0.0.0.0</
STR>
<UINT16 name="port">6666</
UINT16>
<STR name="protocol">inboundLiveFlv</
STR>
<STR name="sslCert"></
STR>
<STR name="sslKey"></
STR>
<BOOL name="waitForMetadata">true</
BOOL>
</
MAP>
.../crtmpserver-717/sources/thelib/src/protocols/liveflv/
inboundliveflvprotocol.cpp:51 _waitForMetadata:
1
.../crtmpserver-717/sources/thelib/src/netio/epoll/
iohandlermanager.cpp:100 Handlers count changed: 12->13
IOHT_TCP_CARRIER
.../crtmpserver-717/sources/thelib/src/protocols/liveflv/
baseliveflvappprotocolhandler.cpp:45 protocol CTCP(17) <-> TCP(4) <->
[ILFL(5)] registered to app
flvplayback
.../crtmpserver-717/sources/thelib/src/application/
baseclientapplication.cpp:227 Stream INLFLV(1) with name `test`
registered to application `flvplayback` from protocol
ILFL(5)
.../crtmpserver-717/sources/thelib/src/protocols/liveflv/
inboundliveflvprotocol.cpp:184 Stream
metadata:
<MAP name=""
isArray="true">
<MAP name="__index__value__0"
isArray="true">
<DOUBLE name="duration">0.000</
DOUBLE>
<STR name="encoder">Lavf54.1.100</
STR>
<DOUBLE name="filesize">0.000</
DOUBLE>
<DOUBLE name="framerate">25.000</
DOUBLE>
<DOUBLE name="height">240.000</
DOUBLE>
<STR name="streamName">test</
STR>
<DOUBLE name="videocodecid">2.000</
DOUBLE>
<DOUBLE name="videodatarate">195.312</
DOUBLE>
<DOUBLE name="width">320.000</
DOUBLE>
</
MAP>
</MAP>

C++ RTMP Server

unread,
Mar 1, 2012, 5:11:22 PM3/1/12
to c-rtmp...@googlegroups.com
Hi,

After you start the playback with ffplay, look on the server console. Copy paste the line similar to this one:

"Play request for stream name `rtsp_test`. Start: -2; length: -1"

Cheers,
Andrei

> You received this message because you are subscribed to "C++ RTMP Server" mailing list.
> To post to this group, send email to c-rtmp...@googlegroups.com
> To unsubscribe from this group, send email to
> c-rtmp-serve...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/c-rtmp-server?hl=en

windj007

unread,
Mar 3, 2012, 8:46:12 AM3/3/12
to C++ RTMP Server
Hi,

Here it is: "Play request for stream name `test`. Start: 0; length:
-1"

Best regards,
windj007

qMax

unread,
Mar 3, 2012, 11:13:56 AM3/3/12
to C++ RTMP Server
Can you please provide proper config related to ability of pushing
stream from ffmpeg to crtmpd?

windj007

unread,
Mar 3, 2012, 11:31:37 AM3/3/12
to C++ RTMP Server
Hi,

I use default crtmpserver.lua without any modifications (sources
tarball: http://www.rtmpd.com/assets/sources/crtmpserver-717.tar.gz).

Best regards,
windj007

windj007

unread,
Mar 3, 2012, 11:58:10 AM3/3/12
to C++ RTMP Server
Obviously the problem is that crtmpserver does TryLinkToFileStream
instead of TryLinkToLiveStream.
It happens so because of M_INVOKE_PARAM(request, 2) returning 0.
I haven't found how to set startTime by the moment.

Eugen-Andrei Gavriloaie

unread,
Mar 3, 2012, 12:17:22 PM3/3/12
to c-rtmp...@googlegroups.com
That is absolutely correct. Please *carefully* read about
NetStream.play method on Adobe docs. Crtmpserver is doing the correct
thing

windj007

unread,
Mar 3, 2012, 2:40:39 PM3/3/12
to C++ RTMP Server
The problem is solved!

In order to watch live RTMP stream through ffplay one should use a
command like following:
ffplay "rtmp://your-server.com/application/stream live=1"

It's worth noticing that ffmpeg uses librtmp having a number of
compatibility issues.

In the end I configured JWPlayer as described in tutorials and all
started working.

Correct me if I'm wrong.

Thank you for your responses!
Reply all
Reply to author
Forward
0 new messages