Capture a RTMP Stream

515 views
Skip to first unread message

Luis Rosario

unread,
Mar 30, 2017, 8:13:55 PM3/30/17
to Opencast Users
Hello everyone, I'm new to the community and currently testing Opencast.  How do I go about setting up Opencast to capture an incoming RTMP stream? I'm under the impression that this is possible.  We are planning on using Opencast to archive live content being relayed from Wowza.  Any info pointing me in the right direction would be amazing.  Thank you!

-Luis

Greg Logan

unread,
Mar 30, 2017, 11:51:30 PM3/30/17
to Opencast Users
Hi Luis, 

Opencast doesn't directly support capturing from anything, but there are a number of closely related projects that can. Take a look at PyCA, or Galicaster. There are a number of hardware vendors whose hardware would also likely work, but Galicaster and PyCA are software based. 

G

On Mar 30, 2017 18:13, "Luis Rosario" <lu...@groovetemple.tv> wrote:
Hello everyone, I'm new to the community and currently testing Opencast.  How do I go about setting up Opencast to capture an incoming RTMP stream? I'm under the impression that this is possible.  We are planning on using Opencast to archive live content being relayed from Wowza.  Any info pointing me in the right direction would be amazing.  Thank you!

-Luis

--
You received this message because you are subscribed to the Google Groups "Opencast Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to users+un...@opencast.org.

Luis Rosario

unread,
Mar 30, 2017, 11:57:36 PM3/30/17
to us...@opencast.org
Hi Greg, yes, thank you. I was slowly discovering this.  I've been trying to install PyCa which seems easy enough but getting stumped on the python-itsdangerous dependency running on Redhat.  Been trying to find a way to install it and having trouble.  But it looks like PyCa would be able to do what I'm looking for... Thanks for clarifying.

Jan Koppe

unread,
Mar 31, 2017, 3:07:35 AM3/31/17
to us...@opencast.org
Hello Luis,

yes, pyCA is perfectly suitable for this. We are capturing our camera
vido signals per RTMP as well. I'm not very familiar with RHEL, but
probably you can install the required packages via pip, so you don't
have to go through your package manager.

Also, you will probably need ffmpeg to actually do the capturing, as
pyCA only executes a user-defined command upon request from opencast.
But this can be as simple as `ffmpeg -i <your rtmp stream url> -t
{{time}} -c:v libx264 {{dir}}/{{name}}.mp4`, which will reencode the
stream with h.264 regardless of the input. If you do not want to
reencode (because wowza already encodes to h.264) you can use `-c:v
copy`, which would require almost no cpu power.

If you have any troubles, feel free to ask. :)

Regards,
Jan

On 31.03.2017 05:57, Luis Rosario wrote:
> Hi Greg, yes, thank you. I was slowly discovering this. I've been
> trying to install PyCa which seems easy enough but getting stumped on
> the python-itsdangerous dependency running on Redhat. Been trying to
> find a way to install it and having trouble. But it looks like PyCa
> would be able to do what I'm looking for... Thanks for clarifying.
>
> On Thu, Mar 30, 2017 at 8:51 PM, Greg Logan <gregor...@gmail.com
> <mailto:gregor...@gmail.com>> wrote:
>
> Hi Luis,
>
> Opencast doesn't directly support capturing from anything, but
> there are a number of closely related projects that can. Take a
> look at PyCA, or Galicaster. There are a number of hardware
> vendors whose hardware would also likely work, but Galicaster and
> PyCA are software based.
>
> G
>
>
> On Mar 30, 2017 18:13, "Luis Rosario" <lu...@groovetemple.tv
> <mailto:lu...@groovetemple.tv>> wrote:
>
> Hello everyone, I'm new to the community and currently testing
> Opencast. How do I go about setting up Opencast to capture an
> incoming RTMP stream? I'm under the impression that this is
> possible. We are planning on using Opencast to archive live
> content being relayed from Wowza. Any info pointing me in the
> right direction would be amazing. Thank you!
>
> -Luis
> --
> You received this message because you are subscribed to the
> Google Groups "Opencast Users" group.
> To unsubscribe from this group and stop receiving emails from
> it, send an email to users+un...@opencast.org
> <mailto:users+un...@opencast.org>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Opencast Users" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to users+un...@opencast.org
> <mailto:users+un...@opencast.org>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Opencast Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to users+un...@opencast.org
> <mailto:users+un...@opencast.org>.

--
Jan Koppe
eLectures / LearnWeb
Westfälische Wilhelms-Universität
Georgskommende 25 - Room 310
48143 Münster/Westf. - Germany
Tel. + 49 (0) 251 - 83 29295
E-mail: jan....@wwu.de


Luis Rosario

unread,
Mar 31, 2017, 11:04:19 AM3/31/17
to us...@opencast.org
Jan, thanks for the reply. I do have a couple of questions.  First, is it ok to install on the same sever that opencast is running?  If so, are there any special server config I need to be aware about? Second, and do I understand this correctly, pyCA runs on top of Opencast and triggers recordings according to scheduled events in Opencast?  So does pyCA show up as a capture agent with in Opencast when scheduling events?

>         <mailto:users+unsubscribe@opencast.org>.

>
>
>     --
>     You received this message because you are subscribed to the Google
>     Groups "Opencast Users" group.
>     To unsubscribe from this group and stop receiving emails from it,
>     send an email to users+un...@opencast.org

>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Opencast Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to users+un...@opencast.org


--
Jan Koppe
eLectures / LearnWeb
Westfälische Wilhelms-Universität
Georgskommende 25 - Room 310
48143 Münster/Westf. - Germany
Tel. + 49 (0) 251 - 83 29295
E-mail: jan....@wwu.de
--
You received this message because you are subscribed to the Google Groups "Opencast Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to users+un...@opencast.org.

Pascal Zurek

unread,
Mar 31, 2017, 11:14:22 AM3/31/17
to us...@opencast.org
Hej Luis,

yes, pyCA shows up as a capture agent.
As pyCA and Opencast only communicate with each other through Opencast's
HTTP interface, it would be okay to have both on the same machine for
testing purposes. I would not see it as "running on top of Opencast" but
"recording and delivering videos to Opencast" (which is called
"ingesting" in the Opencast world).
This being said, of course I assume that, in the end, you would want to
have Opencast on a server, serving the videos to whomever it may
concern, and pyCA on a machine in a lecture hall or the like...?

Pascal

Am 31.03.2017 um 17:04 schrieb Luis Rosario:
> Jan, thanks for the reply. I do have a couple of questions. First, is
> it ok to install on the same sever that opencast is running? If so, are
> there any special server config I need to be aware about? Second, and do
> I understand this correctly, pyCA runs on top of Opencast and triggers
> recordings according to scheduled events in Opencast? So does pyCA show
> up as a capture agent with in Opencast when scheduling events?
>
> On Mar 31, 2017 12:07 AM, "Jan Koppe" <jan....@wwu.de
> <mailto:jan....@wwu.de>> wrote:
>
> Hello Luis,
>
> yes, pyCA is perfectly suitable for this. We are capturing our camera
> vido signals per RTMP as well. I'm not very familiar with RHEL, but
> probably you can install the required packages via pip, so you don't
> have to go through your package manager.
>
> Also, you will probably need ffmpeg to actually do the capturing, as
> pyCA only executes a user-defined command upon request from opencast.
> But this can be as simple as `ffmpeg -i <your rtmp stream url> -t
> {{time}} -c:v libx264 {{dir}}/{{name}}.mp4`, which will reencode the
> stream with h.264 regardless of the input. If you do not want to
> reencode (because wowza already encodes to h.264) you can use `-c:v
> copy`, which would require almost no cpu power.
>
> If you have any troubles, feel free to ask. :)
>
> Regards,
> Jan
>
> On 31.03.2017 05 <tel:31.03.2017%2005>:57, Luis Rosario wrote:
> > Hi Greg, yes, thank you. I was slowly discovering this. I've been
> > trying to install PyCa which seems easy enough but getting stumped on
> > the python-itsdangerous dependency running on Redhat. Been trying to
> > find a way to install it and having trouble. But it looks like PyCa
> > would be able to do what I'm looking for... Thanks for clarifying.
> >
> > On Thu, Mar 30, 2017 at 8:51 PM, Greg Logan
> <gregor...@gmail.com <mailto:gregor...@gmail.com>
> > <mailto:gregor...@gmail.com <mailto:gregor...@gmail.com>>>
> wrote:
> >
> > Hi Luis,
> >
> > Opencast doesn't directly support capturing from anything, but
> > there are a number of closely related projects that can. Take a
> > look at PyCA, or Galicaster. There are a number of hardware
> > vendors whose hardware would also likely work, but Galicaster and
> > PyCA are software based.
> >
> > G
> >
> >
> > On Mar 30, 2017 18:13, "Luis Rosario" <lu...@groovetemple.tv
> <mailto:lu...@groovetemple.tv>
> > <mailto:lu...@groovetemple.tv <mailto:lu...@groovetemple.tv>>>
> wrote:
> >
> > Hello everyone, I'm new to the community and currently testing
> > Opencast. How do I go about setting up Opencast to capture an
> > incoming RTMP stream? I'm under the impression that this is
> > possible. We are planning on using Opencast to archive live
> > content being relayed from Wowza. Any info pointing me in the
> > right direction would be amazing. Thank you!
> >
> > -Luis
> > --
> > You received this message because you are subscribed to the
> > Google Groups "Opencast Users" group.
> > To unsubscribe from this group and stop receiving emails from
> > it, send an email to users+un...@opencast.org
> <mailto:users%2Bunsu...@opencast.org>
> > <mailto:users+un...@opencast.org
> <mailto:users%2Bunsu...@opencast.org>>.
> >
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Opencast Users" group.
> > To unsubscribe from this group and stop receiving emails from it,
> > send an email to users+un...@opencast.org
> <mailto:users%2Bunsu...@opencast.org>
> > <mailto:users+un...@opencast.org
> <mailto:users%2Bunsu...@opencast.org>>.
> >
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Opencast Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> > an email to users+un...@opencast.org
> <mailto:users%2Bunsu...@opencast.org>
> > <mailto:users+un...@opencast.org
> <mailto:users%2Bunsu...@opencast.org>>.
>
> --
> Jan Koppe
> eLectures / LearnWeb
> Westfälische Wilhelms-Universität
> Georgskommende 25 - Room 310
> 48143 Münster/Westf. - Germany
> Tel. + 49 (0) 251 - 83 29295
> <tel:%2B%2049%20%280%29%20251%20-%2083%2029295>
> E-mail: jan....@wwu.de <mailto:jan....@wwu.de>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Opencast Users" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to users+un...@opencast.org
> <mailto:users%2Bunsu...@opencast.org>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Opencast Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to users+un...@opencast.org
> <mailto:users+un...@opencast.org>.

--
Pascal Zurek
Technische Informations- und Kommunikationsdienste
Universität Stuttgart
Allmandring 3a
70550 Stuttgart

+49-(0)711-685-87323
+49-(0)163-8715886
pascal...@tik.uni-stuttgart.de

Luis Rosario

unread,
Mar 31, 2017, 2:15:43 PM3/31/17
to Opencast Users
Is this configuration possible:

RTMP STREAM OR HLS STREAM INBOUND FROM WOWZA ====>TO pyCA INGEST/RECORD ====>RECORDED FILE TO OPENCAST FOR TRANSCODING OR TRANSMUXING TO HLS FILE WITH .ts segments ?

At the end of the day I'd like to end up with .m3u8 file with possible adaptive bit rate segments that will publish to Amazon s3 where my front end applications will access content via s3/cloudfront.  Where does the trasncoding occur? Gracias!

-Luis

Lars Kiesow

unread,
Mar 31, 2017, 6:20:14 PM3/31/17
to us...@opencast.org
Hi Luis,
here are some information about what you are planning you might find
helpful:

First of all, your exact plan is something no one I know is doing but
it should theoretically be possible. I think FFmpeg (used by Opencast
for transcoding) can create m3u8 files, though you would need to figure
out how to distribute them. Opencast usually expects a defined set of
output files, but it might be possible and if not, then it should be
very easy to add that functionality.

Most people just generate mp4 container since most streaming servers
can use them for streaming as well and you have the advantage that you
can also use them for download, direct display, …

The way: pyCA (or any other capture agent) -> Opencast -> distribution
is the common way of using Opencast. If you like, then you can also mix
pyCA with other capture agents. For distributions, there are several
possibilities already built in Opencast.

Opencast 2.4, which just had its feature freeze and will finally be
released on June 15 iirc, has a native AWS S3 integration. That seems
to be something you are interested in. You can already try out that
version by compiling the r/2.4.x branch from source. Please remember
that it is not final yet, so please let us know about possible bugs you
find.

I hope that helps.

Best regards,
Lars

Jan Koppe

unread,
Mar 31, 2017, 7:49:39 PM3/31/17
to us...@opencast.org
Hey Luis,

yes, that configuration would be possible (though slightly unusual). But
I'm wondering why you do not use the built-in Recorder function from
Wowza? This seems like an awful lot of extra work for this simple
functionality.

Regards,
Jan
> --
> You received this message because you are subscribed to the Google
> Groups "Opencast Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to users+un...@opencast.org
> <mailto:users+un...@opencast.org>.

--
Jan Koppe
eLectures / LearnWeb
Westfälische Wilhelms-Universität
Georgskommende 25 - Room 310
48143 Münster/Westf. - Germany
Tel. + 49 (0) 251 - 83 29295
E-mail: jan....@wwu.de


Luis Rosario

unread,
Apr 1, 2017, 7:20:30 PM4/1/17
to Opencast Users
Hey guys thanks for the inisght.. It may seem unusual I suppose, however, we have been searching for a platform that is similar to the scheduling component in opencast that can scale and makes sense and have not found one.  We like the idea of creating these scheduled events with metadata as we are ingesting the media.  Wowza doesn't have this functionality in the way that seems easy to implement.  We are launching an interative web conferencing site using big blue button where we are streaming out live classes from a studio in fitness, yoga, dance, meditation.  We would be creating scheduled events in Opencast that would follow our class schedule.  We want to create a somewhat automated process in which we can capture these classes in realtime on a regular schedule, process/transcode then make availble for distribution.  Sounds to me that is how Opencast is used, correct me if I'm wrong. Using Wowza is just a pass through for us to generate a secondary video rtmp stream so we can record these classes in the cloud.  Generating m3u8 files actually seems to be most comptabile with video players such as jwplayer in flash or hls mode and in all web browsers with embedded players that can force flash mode when using hls streams. On our site we will provide access to classes that a member has missed as part of this opencast distribution process using an embedded player such as jwplayer.  We are not concerned as much with downloadable content, although perhaps we would keep a copy of the media in an flexible contatiner as mp4 for archive.  Plus, we love open source, lol...


On Thursday, March 30, 2017 at 5:13:55 PM UTC-7, Luis Rosario wrote:
Reply all
Reply to author
Forward
0 new messages