This post assumes you have Kaltura CE4 and Red5  installed and configured for webcam recording, if you don’t read this post.

In this final video post about Kaltura CE4 and Red5 integration, we will show how to enable RTMP delivery and live streaming.


RTMP delivery and live streaming using Red5


Enable RTMP delivery

  1. Set the RTMP URL on kConfLocal.php
    vim /opt/kaltura/app/alpha/config/kConfLocal.php
    Change “rtmp_url” => “YourSite/oflaDemo” (line 17)
  2. Edit the playManifest to use red5 server for RTMP
  3. Mark line #524
    // $baseUrl = myPartnerUtils::getRtmpUrl($partnerId);
  4. Add the following instead:
    $baseUrl = “rtmp://YourSite/oflaDemo”;
    Mark lines (531 – 534)
  5. Add these code lines below the marked code:
  6. Enable Red5 to follow soft links – fixes the “media not found issues”
    vim /usr/share/red5/conf/context.xml
  7. Add this inside the content object:
    <Context path=”/oflaDemo” allowLinking=”true”/>
  8. Restart red5 server
    service red5 restart
  9. Test RTMP
    Go into partner account -> preview and embed -> select RTMP and play the video


Enable Live Streaming

  1. Adjust Provisioning Code
    vim /opt/kaltura/app/batch/batches/Provision/Engines/KProvisionEngineAkamai.php
  2. Comment everything from
    $flashLiveStreamInfo = $this->streamClient->provisionFlash… (lines 56 – 88)
    Until the return line (not including the return line)
  3. Paste the following before the return line:
  4. Change stream clipper

    Change $streamer = “rtmp://YourSite/oflaDemo”; (line 24)
  5. Test live stream
    Create a new live stream (KMC->content->new live stream)
    Add the stream name into your streaming appliocation for example: Flash Media Live Encoder
  6. Create a page with embedded live stream player
  7. Use any encoder for example Adobe FME (Windows and Mac) – and broadcast your live stream.
  8. Connect to the live stream using the page you created at step 6


Let us know in the comments or  about your Red5+Kaltura Live Streaming deployment.

Share this
Share on FacebookTweet about this on TwitterShare on LinkedInShare on Google+Email this to someone

Website Comments

  1. arman

    5 . thank you, congratulations sukses.ace maxs an herbal product made from the mangosteen peel and soursop leaves. A wealth of natural herbal products from
    harga obat ace maxsIndonesia for overall health of the human bodypengobatan kanker payudara. Processed with the latest technology and controlled by the skilled hands of disciplines, such as nutrition, health and food-beverage technology, very precisely into herbal product choices for your health and family.
    obat gondok herbal
    obat keputihan
    obat stroke herbal

  2. Athira

    i am using Web media Live encoder to test live streaming.
    Red 5 version 1.0.0 RC2
    I am getting red5 log:
    2013-04-25 06:24:32,067 [NioProcessor-6] ERROR – Problem getting file: 0_7vm8jhps_1@livestream ServletContext resource [/streams/0_7vm8jhps_1@livestream.flv] cannot be resolved to URL because it does not exist
    at ~[spring-web-3.1.1.RELEASE.jar:3.1.1.RELEASE]
    at ~[spring-web-3.1.1.RELEASE.jar:3.1.1.RELEASE]
    at [red5.jar:na]
    at [red5.jar:na]
    at [red5.jar:na]
    at [red5.jar:na]
    at [red5.jar:na]
    at [red5.jar:na]
    at [red5.jar:na]
    at [red5.jar:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_24]
    at sun.reflect.NativeMethodAccessorImpl.invoke( ~[na:1.6.0_24]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke( ~[na:1.6.0_24]
    at java.lang.reflect.Method.invoke( ~[na:1.6.0_24]
    at org.red5.server.service.ServiceInvoker.invoke( [red5.jar:na]
    at [red5.jar:na]
    at [red5.jar:na]
    at [red5.jar:na]
    at [red5.jar:na]
    at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived( [mina-core-2.0.5.jar:na]
    at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived( [mina-core-2.0.5.jar:na]
    at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200( [mina-core-2.0.5.jar:na]
    at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived( [mina-core-2.0.5.jar:na]
    at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush( [mina-core-2.0.5.jar:na]
    at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived( [mina-core-2.0.5.jar:na]
    at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived( [mina-core-2.0.5.jar:na]
    at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200( [mina-core-2.0.5.jar:na]
    at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived( [mina-core-2.0.5.jar:na]
    at [red5.jar:na]
    at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived( [mina-core-2.0.5.jar:na]
    at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200( [mina-core-2.0.5.jar:na]
    at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived( [mina-core-2.0.5.jar:na]
    at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived( [mina-core-2.0.5.jar:na]
    at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived( [mina-core-2.0.5.jar:na]
    at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived( [mina-core-2.0.5.jar:na]
    at [mina-core-2.0.5.jar:na]
    at org.apache.mina.core.polling.AbstractPollingIoProcessor.process( [mina-core-2.0.5.jar:na]
    at org.apache.mina.core.polling.AbstractPollingIoProcessor.process( [mina-core-2.0.5.jar:na]
    at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600( [mina-core-2.0.5.jar:na]
    at org.apache.mina.core.polling.AbstractPollingIoProcessor$ [mina-core-2.0.5.jar:na]
    at [mina-core-2.0.5.jar:na]
    at java.util.concurrent.ThreadPoolExecutor.runWorker( [na:1.6.0_24]
    at java.util.concurrent.ThreadPoolExecutor$ [na:1.6.0_24]
    at [na:1.6.0_24]

    could this be the problem of Web media Live Encoder?

  3. Athira

    I think the oflaDemo app is capable of picking up videos from streams/ folder. But it has to be changed a bit to pick up videos from subfolders of streams/

  4. Athira

    I am using CE 4 and have setup red5. The oflaDemo is also working fine.
    But when i try RTMP live Streaming, i get ” media not found” error.

    I have checked the symlinks. Streams have :
    content -> /opt/kaltura/web/content
    webcam -> /opt/kaltura/web/content/webcam

    I have added in /usr/share/red5/conf/context.xml

    The red5.log is:

    2013-04-18 12:59:05,903 [NioProcessor-2] INFO o.r.s.n.r.codec.RTMPProtocolDecoder – Action connect
    2013-04-18 12:59:05,927 [NioProcessor-2] INFO – Setting object encoding to AMF3
    2013-04-18 12:59:05,941 [NioProcessor-2] INFO – Connecting to: [WebScope@3b46ad8b Depth = 1, Path = ‘/default’, Name = ‘oflaDemo’]
    2013-04-18 12:59:05,946 [NioProcessor-2] INFO org.red5.demos.oflaDemo.Application – W3C x-category:session x-event:connect c-ip: c-client-id:0
    2013-04-18 12:59:05,953 [NioProcessor-2] INFO org.red5.demos.oflaDemo.Application – oflaDemo appConnect
    2013-04-18 12:59:06,306 [NioProcessor-3] WARN – Exception caught Connection reset by peer
    2013-04-18 12:59:06,616 [NioProcessor-4] WARN – Exception caught Connection reset by peer
    2013-04-18 12:59:06,627 [NioProcessor-2] INFO – Remembering client buffer on stream: 2000
    2013-04-18 12:59:07,213 [pool-4-thread-1] INFO org.red5.demos.oflaDemo.Application – W3C x-category:stream x-event:play c-ip: x-sname:310c6e0b-89d6-4a0d-a328-6df238c29b57
    2013-04-18 12:59:07,236 [NioProcessor-2] WARN – Exception attempting to lookup file: content/templates/entry/data/SampleBigBuckBunnyTrailer

  5. andreas

    i was struggling with this too, media not found error even after double checking if i was true to this guide.

    i have to add i use kaltura ce5 and red5 1.0.1 on a debian squeeze system.

    the poblem was that

    doesn’t work anymore since red5 1.0

    instead you’ll have to add allowLinking=”true” to the top context tag in the same file

    hope this helps someone…

    good luck and thanks for this guide, would have made it without it…

  6. Alberto

    Thank you very much!. Now RTMP live streaming is working in my instalation of CE 6.2.0 in a medium amazon instance. I had to omit the step 5 of “Enable RTMP delivery”, make the change of step 1 directly in the configuration of the publisher in the admin console and find my red5 directory what is in another location, (inside opt/kaltura/bin/, but the rest is working fine with my version.
    [kaltura-widget entryid="1_73h2lgq0" size="comments" /]

  7. shawn

    Is there a UI Conf file that will override the KProvisionEngineAkamai.php on a ‘per publisher’ basis?
    *I am familiar with cloning UI Conf files per publisher, just can’t find a ‘master’ conf file that ‘replaces’ KProvisionEngineAkamai.php

    I don’t want to hardcode the value of my red5/wowza application, but need the ability to change that value for each broadcaster.

  8. Philipp

    I’m also interested in such an application or a code snippet.
    Or maybe someone can direct me in the right direction.

  9. Chris Jukes

    PS. I’m assuming I can adjust this in:


  10. Chris Jukes

    How do I enable FCsubscribe for my rtmp live streaming.

    I need this line in my embed code:

    ‘rtmp.subscribe’: ‘true’,


  11. Ananthavel

    I have updated my own question: by changing the sample application name.
    I have another doubt. I explored Red5, sample applications, “Publisher”, there are some encoding part given that sample. Can we use that without using Adobe FMLE? which is mainly used for encoding?
    pls correct me if I misunderstood.

  12. Ananthavel

    I have another doubt. I explored Red5, sample applications, “Simple Broadcaster”, there are some encoding part given that sample. Can we use that without using Adobe FMLE? which is mainly used for encoding?
    pls correct me if I misunderstood.

  13. Ananthavel

    Im new to Video platform and live streaming, and learning. I followed the above steps and im getting the following error.
    Before that I wanted to get on the following things.

    1. Is it possible to live stream using Kaltura CE4+Red5 without paying anything to Kaltura?
    2. Is FMLE mandatory for Live streaming?
    3. If yes Im using Ubuntu and saw as FMLE wont be working on Linux. let me know for any other alternative.
    4. Im getting the following exception in console.

    [INFO] [Launcher:/installer] org.red5.server.service.Installer – Installer service created
    oflaDemo appStart
    [INFO] [NioProcessor-1] – Connecting to: [WebScope@f546f8 Depth = 1, Path = ‘/default’, Name = ‘oflaDemo’]
    [INFO] [NioProcessor-1] – Connecting to: [WebScope@f546f8 Depth = 1, Path = ‘/default’, Name = ‘oflaDemo’]
    [INFO] [NioProcessor-1] – Remembering client buffer on stream: 40000
    [INFO] [NioProcessor-1] – Remembering client buffer on stream: 40000
    [INFO] [NioProcessor-1] – Provider connect
    [INFO] [NioProcessor-1] – Stream start
    [INFO] [NioProcessor-1] – Provider connect
    [INFO] [NioProcessor-1] – Provider connect
    [INFO] [NioProcessor-1] – Consumer connect
    Exception in thread “Thread-2” java.lang.IllegalArgumentException
    at java.nio.Buffer.position(

    let me know where I missed

  14. david

    Using Wowza, not red5
    What would be this step for wowza?

    Add this inside the content object:
    -Context path=”/oflaDemo” allowLinking=”true”/-

    What is the content object?

  15. david

    How about a snippet code example?
    I also would like to know how to do this with a KMC pass. The odds of me figuring it out on my own are pretty much nill.

  16. david

    +1 to helping Neuron005 out
    I also am trying to setup a secondary wowza server with kaltura. Please make another video tutorial for wowza

  17. neuron005

    Thanks for the above post.
    Everything is fine. Now , I made another change. I set up wowza on different machine and connect kaltura with it. Issue is, I can stream live with this new wowza instance in kaltura but can not do rtmp streaming in kaltura!! With amazon cloud front support I am able to do rtmp with jwplayer but not in kaltura. Please help me out. Please tell me what changes should I make or what mounts should I do in order to achieve this.

  18. shawn

    I don't have red5, but I do have a wowza server. Is it possible to do this with wowza instead of red5?
    I have hundreds of recorded videos on my wowza server and have been struggling for months trying to find a way to manage my videos on the wowza server and to add them to my wordpress site.
    Right now, It is absolutely horrible what I have to go through just to even find an old video on my wowza server to embed on my wordpress site which is on a different dedicated server. Having the kaltura interface would be a dream come true…
    If this is possible, do you have a plan where I can pay you to setup kaltura and link it to my wowza server for me? I have 2 dedicated servers, 1 wowza, the other for wordpress. While I know WordPress in and out, I know virtually nothing about kaltura or wowza.t
    thnx for your time

  19. Zohar Babin

    Hi ezequiel,

    To make Red5 require user name and password you would have to extend oflaDemo (or use a different Red5 application). If the password would be static, the Kaltura integration would stay the same, otherwise, if you’d want the KMC to pass the password during the Live Stream setup, it will require some coding on the Kaltura side too.

  20. ezequiel


    Do you know if Is possible add a user and password for the streaming server Oflademo application?
    I would not like someone streaming in my server.

  21. Do more

    Hiii Zohar
    Thanks For your reply. I followed the same with no luck. Whenever I tried to connect with webcam I dont know why it was getting oflaDemo instead of vod. I had to reinstall kaltura for integrating with wowza. Again went through same steps and finally was able to do rtmp streaming. But again, when I try to make a web cam recording, it says “application folder ([install-location]/applications/oflaDemo) is missing”. Though I did not install oflaDemo this time and at all places oflaDemo was replaced with vod. I found one thing that in file “vi /opt/kaltura/web/content/uiconf/kaltura/samplekit/kcw_2.6.4/kcw_samplekit.xml” , oflaDemo is present in !
    Why is it so? Please help me out.
    Thanks in advance

  22. Alan

    Is it possible to show the video is buffering? With a player like youtube, you see the buffering part as well as the play part for streaming. How can we do that with kplayer? Meaning showing that it’s buffering? Thanks.

  23. Zohar Babin

    Hi there,
    Wowza integration or fms (or any other streaming server capable of the same fms like functionality) would be the same to integrate.
    Try following the same steps (ofcourse to install Wowza/xx you should follow their installation guide).

  24. Jon Stormont

    The streamName gets built correctly on the Live Stream Tab
    I was looking at the streamID on the metatdata tab

  25. Jon Stormont

    I was wrong
    I was looking at streamID not stream Name
    The stream name gets built correctly

  26. Do more

    Hiii thanks for publishing this. I successfully did live streaming with this blog help. But red5 is a bit slow and handshakes are long. Response is not good. I want to give wowza a try. Can you provide me a tutorial for KCE4-wowza integration.
    Thanks in advance

  27. Jon Stormont

    Hey thanks this worked for me after a bit of fiddling around
    I kept getting Provisioning -> Error when i created the stream in kaltura But i found that was due to an errant } in the KProvisionEngineAkamai.php
    Also my streamid doesn’t get built correctly in kaltura as per this line

    $data->streamName = $job->entryId . ‘_%i@’ . $data->streamID;

    it just gets the entryid I had to tack on the _i@livstream when i added it in Adobe FME
    Not sure why that is i’ll have a good cleanup today to work it out

    Anyway thanks it works

  28. Arvind Das (@89n3ur0n)

    Thank you kalturians…………………….You published of what I was in need for the last two months. A new year gift to me.

  29. Alan

    Thank you Roni, That was the issue even though testing using the old streams directory was working fine. I’ve deleted the old links and re-linked. Checking the contents like you pointed out and it’s wokring! Thank you all for your help.

  30. Roni Cohen

    This: streams -> /opt/kaltura/web/content
    should be changed to this:
    streams -> /opt/kaltura/web/content/webcam

    and inside /opt/kaltura/web/content/webcam
    you should have those links:
    content -> /opt/kaltura/web/content
    webcam -> /opt/kaltura/web/content/webcam

  31. Roni Cohen

    There was an issue with the links from the oflaDemo app.
    Those should be your links in the oflaDemo:
    streams -> /opt/kaltura/web/content/webcam/

    and inside streams folder (/opt/kaltura/web/content/webcam folder) check that you have these two links:
    content -> /opt/kaltura/web/content
    webcam -> /opt/kaltura/web/content/webcam

    hopes this will solve your issues

  32. Zohar Babin

    Accessing the streams_x folder is no indication… the important folder is streams. streams_x is the old oflaDemo streams folder that we renamed.
    Even so, accessing this folder (or any other) via HTTP is no indication either, since you’re trying to achieve RTMP playback.

    Did you follow the steps in the first guide about testing oflaDemo? did the video streaming work in the oflaDemo app?
    If it did work well, the problem is probably with the code changes you made. Try to reinstall.

  33. Alan

    Streaming is still not working for me. I have a little more information: if I try goto: http://XX.XX.XX.XX:5080/oflaDemo/streams, I get:
    HTTP Status 403 – Access to the requested resource has been denied

    type Status report

    message Access to the requested resource has been denied

    description Access to the specified resource (Access to the requested resource has been denied) has been forbidden.

    If I tried going to: http://XX.XX.XX.XXL5080/oflaDemo/streams_x, I can see a list of videos (toy story 3, avatar, etc…). This leads me to believe it’s a permission/access issue and even though I’ve updated the /usr/share/red5/conf/context.xml per instruction and video (step 6) and had restarted red5 as well as httpd many times, it’s still not working. Can you please shed some lights as to where else to look?. I’m going to try to reproduce the context.xml here again:


    <Context path=”/oflaDemo” allowLinking=”true”/>


  34. Alan

    somehow the full content did how show: let me try again:


    I’ve removed all comment out code.

  35. Alan

    sorry content of /usr/share/red5/conf/context.xml did not show in previous reply, here it is:








  36. Alan

    Thanks for replying Zohar. I’ve checked that the symlinks in /usr/share/red5/webapps/oflaDemo:
    ln -s /opt/kaltura/web/content/webcam ./streams
    ln -s /opt/kaltura/web/content /usr/share/red5/webapps/oflaDemo/streams
    are both there. Here are the results:

    # ls -l /usr/share/red5/webapps/oflaDemo/
    total 16
    -rw-r–r– 1 root root 771 Dec 26 00:59 loggertest.jsp
    drwxr-xr-x 2 root root 4096 Dec 26 00:59 META-INF
    lrwxrwxrwx 1 root root 24 Dec 28 09:02 streams -> /opt/kaltura/web/content
    drwxr-xr-x 2 root root 4096 Dec 26 01:18 streams_x
    drwxr-xr-x 4 root root 4096 Dec 26 00:59 WEB-INF

    I’ve also checked step 6 -9 are done correctly, Here’s the content of /usr/share/red5/conf/context.xml:








    Content of /opt/kaltura/app/alpha/apps/kaltura/modules/extwidget/actions/playManifestAction.class.php:

    $baseUrl = “rtmp://XX.XX.XX.XX/oflaDemo”; // I replaced the XX with the actual IP of the server

    $urlManager = kUrlManager::getUrlManagerByCdn($this->cdnHost);

    // get all flavors with kaltura urls
    foreach($flavorAssets as $flavorAsset)
    //$url = $urlManager->getFlavorAssetUrl($flavorAsset);

    // — BEGIN ADDED code for RED5
    $key = $flavorAsset->getSyncKey(flavorAsset::FILE_SYNC_FLAVOR_ASSET_SUB_TYPE_ASSET);
    $fileSync = kFileSyncUtils::getLocalFileSyncForKey($key);

    $url = $urlManager->getFileSyncUrl($fileSync);
    // — END ADDED code for RED5
    $url = preg_replace(‘/^\//’, ”, $url);

    $flavors[] = array(
    ‘url’ => $url,
    ‘bitrate’ => $flavorAsset->getBitrate(),
    ‘width’ => $flavorAsset->getWidth(),
    ‘height’ => $flavorAsset->getHeight(),

    I’ve also checked my firewall setting:
    Chain RH-Firewall-1-INPUT (2 references)
    target prot opt source destination
    ACCEPT all — anywhere anywhere
    ACCEPT icmp — anywhere anywhere icmp any
    ACCEPT esp — anywhere anywhere
    ACCEPT ah — anywhere anywhere
    ACCEPT udp — anywhere udp dpt:mdns
    ACCEPT udp — anywhere anywhere udp dpt:ipp
    ACCEPT tcp — anywhere anywhere tcp dpt:ipp
    ACCEPT all — anywhere anywhere state RELATED,ESTABLISHED
    ACCEPT tcp — anywhere anywhere state NEW tcp dpt:macromedia-fcs
    ACCEPT tcp — anywhere anywhere state NEW tcp dpt:radan-http
    ACCEPT tcp — anywhere anywhere state NEW tcp dpt:5080
    ACCEPT tcp — anywhere anywhere state NEW tcp dpt:jetcmeserver
    ACCEPT tcp — anywhere anywhere state NEW tcp dpt:ssh
    ACCEPT tcp — anywhere anywhere state NEW tcp dpt:http
    REJECT all — anywhere anywhere reject-with icmp-host-prohibited

    Do you think I have a permission issue? I’ve done all these as root. And I’ve double-triple checked the steps in the video as well as this document. Is there a way to trace to see what’s going on?

  37. Zohar Babin

    Hi Alan,
    U don’t need to reencode for rtmp to work.
    Make sure you followed all the steps in the video above and it should work…
    Verify that the code changes above are correctly implemented and that your symlinks are in place. Also make sure that red5 config is set to follow symlinks.

  38. Alan

    I’ve tried many things but can’t get streaming to work. I’ve installed the webcam part and that is working but streaming doesn’t work for me. I get the “Media not found” dialog box and have checked that the entry in /usr/share/red5/conf/context.xml and it does have between the outer . Can you let me know what to look for? any error log or ways to trace what’s going on? I am using Kaltura CE 4.0 VMWare version and currently have videos that I’ve uploaded before and was trying to use RTMP streaming using those. Am I supposed to re-encode those existing video again for RTMP to work or it should work as is? They are a mixture of MP4 and FLV files and all of the returned “file not found” error when I played them using the Embedded Player (Progressive works fine). Thanks for your help.

  39. Chirs Jukes

    Hey thanks. I’ve been struggling with this for months! I’ll try it out!

Post a comment