sajad
sajad

Reputation: 2174

ffmpeg: simple RTMP streaming

I am trying to launch up a rtmp transcoder server using ffmpeg; that receives udp MPEG-TS streams as input, transcodes it; and generates an rtmp output to a URL, that can be accessed by users to receive and play the rtmp stream. All these are expected to be performed in a LAN and the output be accessed by all users.

1) First I don't know where the URL should point to. Is it enought to specify the IP of the system and some optional port? Is it neccessary that a program should be listening on that port?

2) How I can play the stream on the URL?

I use a linux ubuntu machine whith IP=10.1.1.229 and I want to transcode multicast stream on this URL: udp://@224.10.1.1:2001.

here is the command used to transcode input stream and generate rtmp url "rtmp://10.1.1.229:2020".

ffmpeg -y -f mpegts -i "udp://@224.10.1.1:2001" -re -vcodec libx264 -maxrate 700k -r 25 -s 640x360 -deinterlace -acodec libfaac -ab 64k -ac 1 -ar 44100 -f flv "rtmp://10.1.1.229:2020"

and here is the command by which I am trying to play rtmp stream:

ffplay rtmp://10.1.1.229:2020

Any guidance would be helpfull. Thank you.

Upvotes: 1

Views: 23955

Answers (1)

JustLogin
JustLogin

Reputation: 1886

I see a mistake in your command: the rtmp URL (in your case it's "rtmp://10.1.1.229:2020") should be a full path to stream, including it's name. I'm also using FFmpeg for similar task (transcoding RSTP to RTMP and streaming it to Wowza). My URL looks like this:

rtmp://[server IP]/livecam/desc

Upvotes: 1

Related Questions