Results 1 to 3 of 3

Thread: Using FFmpeg with an RTMP Wowza stream on an app instance as the source

  1. #1
    Join Date
    Jul 2011

    Default Using FFmpeg with an RTMP Wowza stream on an app instance as the source

    Hey guys!!

    Hope all is well, just wanted to see if I can get any details on how to use an RTMP source from Wowza with FFmpeg is the stream is running on an instance of a particular application?

    Lemme try to clarify...

    On this forum post: it says that the format of the RTMP URL portion is:

    Now if I use an input source like the following (not a stream running on an app instance) everything works just dandy:
    ffmpeg -re -i rtmp://localhost/live/stream
    If however, I try to use a stream running on an application instance I get an error, see below:

    ffmpeg -re -i rtmp://localhost/live/instance/stream -i rtmp://localhost/liveeventorigin/instance/stream -map 0:0 -map 1:1 -codec copy -f flv rtmp://localhost/liveorigin/video
    ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
      built on Jul 18 2012 12:05:01 with llvm_gcc 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
      configuration: --enable-shared --enable-libmp3lame --enable-encoder=libmp3lame
      libavutil      51. 54.100 / 51. 54.100
      libavcodec     54. 23.100 / 54. 23.100
      libavformat    54.  6.100 / 54.  6.100
      libavdevice    54.  0.100 / 54.  0.100
      libavfilter     2. 77.100 /  2. 77.100
      libswscale      2.  1.100 /  2.  1.100
      libswresample   0. 15.100 /  0. 15.100
    [rtmp @ 0x7fbad3414c60] Server error: Failed to play instance/stream; stream not found.
    rtmp://localhost/live/instance/stream: Operation not permitted
    Any ideas where I might be going wrong? Thanks!

  2. #2



    I tried with the following command line and it works for me.

    ffmpeg -re -i rtmp:// -i rtmp:// -map 0:0 -map 1:1 -acodec copy -vcodec copy -f flv rtmp://
    ffmpeg version 0.7.4

    Stream3 is published with video from Stream1 and audio from Stream2

    The error you are getting is stream not found, suggesting that ffmpeg cannot handle appInstances. It is treating instance/stream as the stream name.

    You could remap the appInstance that ffmpeg is connecting to by using IVHostNotify.onVHostClientConnect in a custom VHostListener. This method is called before the rtmp client is connected to the application so it can be remapped to a different application or appInstance. The problem is that rtmp streaming is a 2 part process and at this point, you will not have the stream name part of the url so wont know which appInstance is actually being requested. Once the connection is made, you would also have to remap the stream name to the correct name using IMediaStreamNameAliasProvider2.resolvePlayAlias(IApplicationInstance appInstance, String name, IClient client) in a custom module.

    How to do server-side redirect of RTMP connections from one application to another
    How to use the IMediaStreamNameAliasProvider2 interface


  3. #3
    Join Date
    Jul 2011


    Thank you so much for your clear and detailed response, dude. I totally forgot about IMediaStreamNameAliasProvider... I'll take a look at the options you've provided, thanks a bunch!

Similar Threads

  1. Replies: 1
    Last Post: 09-22-2014, 02:49 AM
  2. Protect rtmp streaming, when receive stream from FFmpeg
    By puga1chev in forum Live Streaming and Encoder Discussion
    Replies: 0
    Last Post: 04-10-2013, 06:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts