Red5 with ffmpeg

326 views
Skip to first unread message

Ricardo

unread,
May 5, 2013, 7:12:46 PM5/5/13
to red5in...@googlegroups.com
Hi,

I was wondering if someone can help me out.

I am streaming from FMLE to Red5, and wanted to use that as input to ffmpeg.

However, if I attempt to read using with ffmpeg I just get an error about "Operation not permitted".

ffmpeg doesn't really show much:
ffmpeg -loglevel debug -i "rtmp://server2/live/livestream"
ffmpeg version git-Sat Apr 20 21:31:19 2013 +0200-4824aea Copyright (c) 2000-2013 the FFmpeg developers
  built on Apr 20 2013 17:10:14 with gcc 4.2.4 (GCC) (Ubuntu 4.2.4-1ubuntu4)
  configuration: --enable-gpl --enable-nonfree --enable-pthreads --enable-libx264 --enable-libfaac --enable-libmp3lame
  libavutil      52. 27.100 / 52. 27.100
  libavcodec     55.  5.100 / 55.  5.100
  libavformat    55.  3.100 / 55.  3.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 58.100 /  3. 58.100
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option '-i' ... matched as input file with argument 'rtmp://server2/live/livestream'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file rtmp://server2/live/livestream.
Successfully parsed a group of options.
Opening an input file: rtmp://server2/live/livestream.
[rtmp @ 0x1535500] Handshaking...
[rtmp @ 0x1535500] Type answer 3
[rtmp @ 0x1535500] Server version 1.2.3.4
[rtmp @ 0x1535500] Proto = rtmp, path = /live/livestream, app = live, fname = livestream
[rtmp @ 0x1535500] Server bandwidth = 10000000
[rtmp @ 0x1535500] Client bandwidth = 10000000
[rtmp @ 0x1535500] Creating stream...
[rtmp @ 0x1535500] Sending play command for 'livestream'
[rtmp @ 0x1535500] Server error:
rtmp://server2/live/livestream: Operation not permitted


The Red5 log shows a connection and a request to play the stream, and then nothing else
2013-05-05 16:08:57,475 [NioProcessor-3] INFO  o.r.s.n.r.codec.RTMPProtocolDecoder - Action connect
2013-05-05 16:08:57,521 [NioProcessor-3] INFO  o.r.s.n.r.codec.RTMPProtocolDecoder - Action createStream
2013-05-05 16:08:57,561 [NioProcessor-3] INFO  o.r.s.n.r.codec.RTMPProtocolDecoder - Action play

There's not too much to show what exactly the error could be.

thanks
Ricardo

Tiago Jacobs - iMDT

unread,
May 5, 2013, 7:34:25 PM5/5/13
to red5in...@googlegroups.com
What ffmpeg is suposed to do? I see a missing argument (the output).

What version of red5 are you using?

Tiago

Ricardo Kleemann

unread,
May 5, 2013, 8:28:54 PM5/5/13
to red5in...@googlegroups.com
I have it transoding to hls (m3u8) but i get the same error whether I have the full cmd line or just the input line

I'm using the latest Red5 (installed last week) - I dont recollect the exact version right now
--

--- You received this message because you are subscribed to the Google Groups "red5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to red5interest...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




--
Sent from Gmail Mobile

Tiago Jacobs - iMDT

unread,
May 5, 2013, 8:30:51 PM5/5/13
to red5in...@googlegroups.com
Please post your question on ffmpeg mailing list (as ffmpeg throws the
error). If you figure that red5 server is causing the exception, post
again here with full details.

Regards,
Tiago


Phillip Beckford

unread,
May 6, 2013, 7:39:37 AM5/6/13
to red5in...@googlegroups.com
From what I see, you are missing rtmp, from ffmpeg output,  --enable-librtmp

Sent from my iPhone

Frans Gouverne

unread,
May 14, 2013, 7:42:38 AM5/14/13
to red5in...@googlegroups.com
This is the ffmpeg invocation I use to generate the m3u8 files from the red5 RTMP output:

ffmpeg -i "rtmp://$SERVER/live/$STREAM live=1" -hls_time 10 -hls_list_size 3 -r 24 -ar 48000 -acodec libvo_aacenc  -vcodec libx264  -async 2 $STREAM.m3u8

You have to be sure the following libs are included when building/installing ffmpeg:

./configure --enable-librtmp  --enable-libx264 --enable-gpl





2013/5/6 Phillip Beckford <budgi...@googlemail.com>
Reply all
Reply to author
Forward
0 new messages