1
votes

I use crtmpserver to make my RTMP server. I use Adobe Flash Media Live Encoder 3.2 to publish the livestream to the server. It is OK. I use a webflash player to receive the live stream. It is OK.

Now, I want to find the live file in the server, but I can't find the file. Which folder is the livestream?

1

1 Answers

1
votes

If you want to stream a .flv file:

In every crtmpserver application there is a property called mediaFolder that by default refers to folder media.

mediaFolder="./media",

Then the streaming URL of the file is as:

rtmp://<server IP address>/<application name>/<file name>

If you want to stream a live stream:

When you define an stream acceptor in the acceptors section, you can specify the name of the stream by localStreamName as:

{
    ip="0.0.0.0",
    port=9005,
    protocol="inboundTcpTs",
    localStreamName="tcpchan5"
},

Then the URL of this stream is as:

rtmp://<server IP address>/<application name>/tcpchan5

To receive the input stream and feed the RTMP server, you may use FFmpeg:

ffmpeg -i <input_stream> -vcodec libx264 -s 320x240 -vb 512k -async 1 -acodec libvo_aacenc -ab 32k -ac 1 -f mpegts tcp://<server IP address>:<server feed port>

For example:

ffmpeg -i udp://224.11.11.11:2000 -vcodec libx264 -s 320x240 -vb 512k -async 1 -acodec libvo_aacenc -ab 32k -ac 1 -f mpegts tcp://127.0.0.1:9000