FFMPEG 0.6 + Erlyvideo
Previously I posted about compiling FFMPEG with RTMP support. Now I’m going to describe what you have to do to view that content with Erlyvideo running on OSX of course.
Assuming you have MacPorts installed. Run the following command:
sudo port install erlang
Once that is done you are ready to install Erlyvideo. Go here for up to date install instructions (you will also need git installed).
Finally on to the fun stuff. go to http://localhost:8082/
Assuming everything worked alright you should see the flash content loaded. Go ahead open up terminal and run the following command replacing INPUT_FILE with the file of your choice.
ffmpeg -i INPUT_FILE -re -ac 2 -acodec libfaac -vcodec libx264 -vpre default -s 480x320 -f flv rtmp://localhost:1935/rtmp/test
Now switch back to your browser where you have the erlyvideo page loaded. replace the url at the top of the page with.
rtmp://localhost:1935/rtmp/test
Click on the Connect button.
Then towards the bottom of the page click the Play button.
Congratulations you are now streaming video to erlyvideo!!!
How do I go about securing erlyvideo? I find it more efficient than red5 but I’m having trouble with it because the documentation is poor and I don’t know erlang.
also, when i try to connect to rtmp:///rtmp/test I get nothing… is there something in the erlyvideo config that isn’t shown in this post? Is this just allowing the flash video sample player from erlyvideo to connect directly to ffmpeg? It seem’s I just haven’t figured this all out yet.
I’m not sure what you want as far as security. But for the most part you will probably have to code your own solution.
in the example above ffmpeg is publishing its video stream to rtmp://localhost:1935/rtmp/test. all you have to do is have flash connect to that same stream and you should be good. assuming you have the server up and running. I was using the default configuration.