Re: [Freeswitch-users] Broadcasting conference with mod_rtmp
Thanks! I tried this, but didn't get success yet. Maybe I've misunderstood something. Here's what I tried: 1. I added `<load module="mod_av"/>` to modules.conf.xml, and restarted freeswitch. 2. I connected participants to a conference with destination number "plenary-test". This is what `conference list` in fs_cli shows after this: Conference plenary-test (1 member rate: 44100 flags: running|answered|enforce_min|dynamic|exit_sound|enter_sound|livearray_sync|transcode_video|video_muxing|minimize_video_encoding|json_status) 1;verto.rtc/plenary-test;4ae28d9e-cf98-363f-ed40-2b6544fb8685;Anonymous;plenary_user@nothangout.media.mit.edu;hear|speak|video|floor|vid-floor;0;0;0;200 3. In fs_cli, I issued the following command: conference plenary-test record rtmp://nothangout.media.mit.edu/plenary-test The domain here is the same domain as the freeswitch server. There is no red5/wowza/nginx-mod-rtmp/etc running on this server yet. This produced the logs below. [0] 4. I attempted to connect to rtmp://nothangout.media.mit.edu/plenary-test using mplayer, vlc, and rtmpdump. None of them receive any data. Shortly after issuing `conference plenary-test record ...`, whether or not I attempt to connect an rtmp client, freeswitch appears to crash -- the logs show freeswitch starting up, the verto browser session reloads, and the fs_cli socket is lost. I don't see anything in the logs about a crash (it just up-and-reboots). Have I missed a step here? Does freeswitch need a running red5/etc. server that it is connecting to when I issue the `record` command, or is it producing a stream that an rtmp client should be able to consume? Forgive my ignorance here; I'm new to rtmp streaming. I'm running freeswitch 1.6.10~17~726, via freeswitch's debian packages, on debian 8.5. best, Charlie [0] Debug log after issuing `conference plenary-test record ...`, and before freeswitch crashes: 2016-09-14 17:41:57.378173 [DEBUG] avformat.c:1701 sample rate: 44100, channels: 2 Parsing... Parsed protocol: 0 Parsed host : nothangout.media.mit.edu Parsed app : plenary-test RTMP_Connect1, ... connected, handshaking 2016-09-14 17:41:57.408166 [NOTICE] mod_rtmp.c:903 New RTMP session [81e27b34-92ae-4fd8-9d8b-6ba58ed32e80] 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [INFO] rtmp_tcp.c:234 Rtmp connection from 18.85.44.183:54786 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:882 Sent handshake response HandShake: Type Answer : 03 HandShake: Server Uptime : 414322 HandShake: FMS Version : 0.0.0.0 HandShake: Handshaking finished.... RTMP_Connect1, handshaked 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:907 Done with handshake 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=116 Invoking connect 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for connect 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x1 stream_id=0x0] len=4 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x5 stream_id=0x0] len=4 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x6 stream_id=0x0] len=5 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x4 stream_id=0x0] len=6 HandleChangeChunkSize, received: chunk size change to 512 HandleServerBW: server BW = 2097152 HandleClientBW: client BW = 2097152 1 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=201 HandleCtrl, received ctrl. type: 0, len: 6 HandleCtrl, Stream Begin 0 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=61 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [NOTICE] rtmp_sig.c:122 Sent connect reply RTMP_ClientPacket, received: invoke 201 bytes (object begin) Property: <Name: no-name., STRING: _result> Property: <Name: no-name., NUMBER: 1.00> Property: <Name: no-name., OBJECT> (object begin) Property: <Name: fmsVer, NUMBER: 1.00> Property: <Name: capabilities, NUMBER: 31.00> (object end) Property: <Name: no-name., OBJECT> (object begin) Property: <Name: level, STRING: status> Property: <Name: code, STRING: NetConnection.Connect.Success> Property: <Name: description, STRING: Connection succeeded> Property: <Name: clientId, NUMBER: 217834719.00> Property: <Name: objectEncoding, NUMBER: 0.00> (object end) (object end) HandleInvoke, server invoking <_result> HandleInvoke, received result for method call <connect> Invoking releaseStream Invoking FCPublish Invoking createStream RTMP_ClientPacket, received: invoke 61 bytes (object begin) Property: <Name: no-name., STRING: connected> Property: <Name: no-name., NUMBER: 0.00> Property: NULL Property: <Name: no-name., STRING: 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80> (object end) HandleInvoke, server invoking <connected> 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=29 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for releaseStream 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [WARNING] rtmp.c:198 Unhandled invoke for "releaseStream" 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=25 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for FCPublish 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [WARNING] rtmp.c:198 Unhandled invoke for "FCPublish" 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=25 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for createStream 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=29 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [INFO] rtmp_sig.c:137 Replied to createStream (0) RTMP_ClientPacket, received: invoke 29 bytes (object begin) Property: <Name: no-name., STRING: _result> Property: <Name: no-name., NUMBER: 4.00> Property: NULL Property: <Name: no-name., NUMBER: 1.00> (object end) HandleInvoke, server invoking <_result> HandleInvoke, received result for method call <createStream> Invoking publish 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:1081 [chunk_stream=4 type=0x14 ts=0 stream_id=0x1] len=30 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:192 [amfnumber=4] Got INVOKE for publish 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x4 stream_id=0x0] len=6 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=5 type=0x14 stream_id=0x1] len=138 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [INFO] rtmp_sig.c:290 Got publish on stream 1. HandleCtrl, received ctrl. type: 0, len: 6 HandleCtrl, Stream Begin 1 RTMP_ClientPacket, received: invoke 138 bytes (object begin) Property: <Name: no-name., STRING: onStatus> Property: <Name: no-name., NUMBER: 0.00> Property: NULL Property: <Name: no-name., OBJECT> (object begin) Property: <Name: level, STRING: status> Property: <Name: code, STRING: NetStream.Publish.Start> Property: <Name: description, STRING: description> Property: <Name: details, STRING: details> Property: <Name: clientid, NUMBER: 217834719.00> (object end) (object end) HandleInvoke, server invoking <onStatus> HandleInvoke, onStatus: NetStream.Publish.Start 2016-09-14 17:41:57.408166 [DEBUG] avformat.c:1804 use video codec: [28] h264 (H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10) 2016-09-14 17:41:57.408166 [WARNING] avformat.c:506 Codec [aac] is experimental feature in libavcodec, never mind 2016-09-14 17:41:57.408166 [NOTICE] avformat.c:531 sample_rate: 44100 nb_samples: 1024 2016-09-14 17:41:57.408166 [NOTICE] avformat.c:535 sample_fmt 8 != AV_SAMPLE_FMT_S16, start resampler Output #0, flv, to 'rtmp://nothangout.media.mit.edu/plenary-test': Stream #0.0: Audio: aac, 44100 Hz, stereo, fltp, 131 kb/s 2016-09-14 17:41:57.408166 [INFO] avformat.c:1829 Opening File [rtmp://nothangout.media.mit.edu/plenary-test] 44100hz with VIDEO 2016-09-14 17:41:57.408166 [DEBUG] conference_record.c:279 Setup timer success interval: 20 samples: 882 using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX profile Constrained Baseline, level 4.1 264 - core 142 r2431 a5831aa - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=4 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=30 keyint_min=16 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=crf mbtree=1 crf=18.0 qcomp=0.60 qpmin=10 qpmax=31 qpstep=4 ip_ratio=1.41 aq=1:1.00 2016-09-14 17:41:57.478159 [INFO] avformat.c:2366 use video codec implementation Video: libx264, yuv420p, 800x600, q=10-31, 516 kb/s 2016-09-14 17:41:57.478159 [NOTICE] avformat.c:613 video thread start 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:58.458161 [DEBUG] rtmp.c:1081 [chunk_stream=4 type=0x12 ts=0 stream_id=0x1] len=382 On Wed, Sep 14, 2016, at 05:58 AM, Stephen Dame wrote:
You want to load mod_av
Then use
conference xxxxxx record rtmp://yourserver.cpm/stream_id
you can pass avconv args in this command as well to control encoding options like frames per second and presets.
This will send output of MCU to your red5, wowza, or properly configure nginx rtmp module.
Can also send it directly to youtube.
Regards, Stephen
HostBBB - Online Learning Solutions 207 Technology Group Inc. 1-888-229-9756 skype: Stephen_Dame
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Charlie DeTar Sent: Tuesday, September 13, 2016 10:55 PM To: freeswitch-users@lists.freeswitch.org Subject: [Freeswitch-users] Broadcasting conference with mod_rtmp
Hi,
I'm trying to broadcast a WebRTC video conference (via mod_conference and mod_verto) over an rtmp stream, with the ultimate goal of transcoding the rtmp stream for broadcast as an HTML5 video stream (likely using something like https://github.com/arut/nginx-rtmp-module for HSL and MPEG-DASH broadcasts). I expect I have the same sort of requirements of freeswitch that one would need for broadcasting rtmp to youtube, which the docs mention glancingly without detail [0]. :)
The video conferencing is working great -- but I'm struggling to figure out how to access the RTMP stream for it. My rtmp.conf.xml is basically the default (but with `auth-calls` set to `false`). My dialplan is as follows:
<include> <extension name="plenary"> <condition field="destination_number" expression="^plenary-.*$" break="never"> <action application="answer"/> <action application="info"/> <action application="conference" data="${destination_number}@plenary-conference-profile"/> </condition> </extension> </include>
I'm able to connect to freeswitch using RTMP clients (I've tried rtmpdump, mplayer, and vlc). In fs_cli, I see debug info (example copied below [1]) that seems to indicate successful connections. However, the RTMP client never receives any data from the server and disconnects after around 30 seconds.
I'm trying to connect via URLs like: rtmp://<domain>:<port>/plenary-conferencename rtmp://<domain>:<port>/plenary-conferencename@plenary-conference-profile rtmp://<domain>:<port>/default/plenary-conferencename and so on, and all exhibit the same behavior. It doesn't seem to matter what path I put -- freeswitch accepts the connection, sends no data, then disconnects after a while. This leads me to suspect I might just be getting the path name wrong.
My questions, if anyone has experience with this:
What is the correct path for the rtmp URL to connect to a video conference -- is it just the $destination_number, or something else? Are there any obvious steps I'm missing to set up rtmp feeds, or any suggestions for how to do smarter debugging of this? Does anyone have an example project that successfully broadcasts RTMP from a video conference to e.g. youtube? Is there a better or more convenient approach to broadcasting a video stream from a conference that you prefer to rtmp?
The full freeswitch config I'm using is here: https://gitlab.com/cdetar/plenary-server/tree/master/ansible/roles/plenary/t emplates/freeswitch , if that's helpful. (Those are templates for an ansible config, so they contain variables that get interpolated in using {{var}} syntax).
best, Charlie
[0] Glancing reference to youtube+rtmp: https://freeswitch.org/confluence/display/FREESWITCH/FreeSWITCH+1.6+Video#Fr eeSWITCH1.6Video-What%27snew
[1] fs_cli debug info while attempting to connect via RTMP:
2016-09-13 23:37:40.551744 [NOTICE] mod_rtmp.c:903 New RTMP session [1513874f-9084-470c-a2de-7e5f92bb2296] 2016-09-13 23:37:40.551744 [INFO] rtmp_tcp.c:234 Rtmp connection from 98.127.250.255:44131 2016-09-13 23:37:40.551744 [DEBUG] rtmp.c:882 Sent handshake response 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:907 Done with handshake 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=204 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for connect 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x1 stream_id=0x0] len=4 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x5 stream_id=0x0] len=4 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x6 stream_id=0x0] len=5 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x4 stream_id=0x0] len=6 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=201 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=61 2016-09-13 23:37:40.711748 [NOTICE] rtmp_sig.c:122 Sent connect reply 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:1081 [chunk_stream=2 type=0x5 ts=0 stream_id=0x0] len=4 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:1184 Set window size: from 2097152 to 2097152 bytes 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:1081 [chunk_stream=2 type=0x4 ts=0 stream_id=0x0] len=10 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:91 Control (3): 00 00 00 00 00 00 01 2c 2016-09-13 23:37:40.851748 [INFO] rtmp.c:118 stream=0 Client buffer set to 300ms 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=25 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for createStream 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=29 2016-09-13 23:37:40.851748 [INFO] rtmp_sig.c:137 Replied to createStream (0) 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:1081 [chunk_stream=8 type=0x14 ts=0 stream_id=0x1] len=82 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:192 [amfnumber=8] Got INVOKE for play 2016-09-13 23:37:40.991748 [DEBUG] rtmp_sig.c:198 Got play for plenary-test-pattern-alpha@plenary-conference-profile on stream 1 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x1 stream_id=0x0] len=4 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x4 stream_id=0x0] len=6 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x4 stream_id=0x0] len=10 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=5 type=0x14 stream_id=0x1] len=135 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=5 type=0x14 stream_id=0x1] len=135 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=5 type=0x12 stream_id=0x1] len=44 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=5 type=0x12 stream_id=0x1] len=24 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:1081 [chunk_stream=2 type=0x4 ts=0 stream_id=0x0] len=10 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:91 Control (3): 00 00 00 01 02 25 51 00 2016-09-13 23:37:40.991748 [INFO] rtmp.c:118 stream=1 Client buffer set to 36000000ms 2016-09-13 23:37:43.951733 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=34 2016-09-13 23:37:43.951733 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for deleteStream 2016-09-13 23:37:43.951733 [NOTICE] rtmp.c:918 Disconnected from flash client 2016-09-13 23:37:43.951733 [DEBUG] rtmp_tcp.c:243 Closing socket 2016-09-13 23:37:44.691705 [NOTICE] mod_rtmp.c:1025 RTMP session ended [1513874f-9084-470c-a2de-7e5f92bb2296]
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
rtmp://nothangout.media.mit.edu/plenary-test <--- this needs to be a server publish point on some red5/fms server. or nginx configured correctly to publish the stream to it at that mount point. Regards, Stephen HostBBB - Online Learning Solutions 207 Technology Group Inc. 1-888-229-9756 skype: Stephen_Dame -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Charlie DeTar Sent: Wednesday, September 14, 2016 1:56 PM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Broadcasting conference with mod_rtmp Thanks! I tried this, but didn't get success yet. Maybe I've misunderstood something. Here's what I tried: 1. I added `<load module="mod_av"/>` to modules.conf.xml, and restarted freeswitch. 2. I connected participants to a conference with destination number "plenary-test". This is what `conference list` in fs_cli shows after this: Conference plenary-test (1 member rate: 44100 flags: running|answered|enforce_min|dynamic|exit_sound|enter_sound|livearray_sy running|answered|nc|transcode_video|video_muxing|minimize_video_encoding running|answered||json_status) 1;verto.rtc/plenary-test;4ae28d9e-cf98-363f-ed40-2b6544fb8685;Anonymous;plen ary_user@nothangout.media.mit.edu;hear|speak|video|floor|vid-floor;0;0;0;200 3. In fs_cli, I issued the following command: conference plenary-test record rtmp://nothangout.media.mit.edu/plenary-test The domain here is the same domain as the freeswitch server. There is no red5/wowza/nginx-mod-rtmp/etc running on this server yet. This produced the logs below. [0] 4. I attempted to connect to rtmp://nothangout.media.mit.edu/plenary-test using mplayer, vlc, and rtmpdump. None of them receive any data. Shortly after issuing `conference plenary-test record ...`, whether or not I attempt to connect an rtmp client, freeswitch appears to crash -- the logs show freeswitch starting up, the verto browser session reloads, and the fs_cli socket is lost. I don't see anything in the logs about a crash (it just up-and-reboots). Have I missed a step here? Does freeswitch need a running red5/etc. server that it is connecting to when I issue the `record` command, or is it producing a stream that an rtmp client should be able to consume? Forgive my ignorance here; I'm new to rtmp streaming. I'm running freeswitch 1.6.10~17~726, via freeswitch's debian packages, on debian 8.5. best, Charlie [0] Debug log after issuing `conference plenary-test record ...`, and before freeswitch crashes: 2016-09-14 17:41:57.378173 [DEBUG] avformat.c:1701 sample rate: 44100, channels: 2 Parsing... Parsed protocol: 0 Parsed host : nothangout.media.mit.edu Parsed app : plenary-test RTMP_Connect1, ... connected, handshaking 2016-09-14 17:41:57.408166 [NOTICE] mod_rtmp.c:903 New RTMP session [81e27b34-92ae-4fd8-9d8b-6ba58ed32e80] 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [INFO] rtmp_tcp.c:234 Rtmp connection from 18.85.44.183:54786 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:882 Sent handshake response HandShake: Type Answer : 03 HandShake: Server Uptime : 414322 HandShake: FMS Version : 0.0.0.0 HandShake: Handshaking finished.... RTMP_Connect1, handshaked 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:907 Done with handshake 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=116 Invoking connect 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for connect 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x1 stream_id=0x0] len=4 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x5 stream_id=0x0] len=4 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x6 stream_id=0x0] len=5 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x4 stream_id=0x0] len=6 HandleChangeChunkSize, received: chunk size change to 512 HandleServerBW: server BW = 2097152 HandleClientBW: client BW = 2097152 1 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=201 HandleCtrl, received ctrl. type: 0, len: 6 HandleCtrl, Stream Begin 0 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=61 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [NOTICE] rtmp_sig.c:122 Sent connect reply RTMP_ClientPacket, received: invoke 201 bytes (object begin) Property: <Name: no-name., STRING: _result> Property: <Name: no-name., NUMBER: 1.00> Property: <Name: no-name., OBJECT> (object begin) Property: <Name: fmsVer, NUMBER: 1.00> Property: <Name: capabilities, NUMBER: 31.00> (object end) Property: <Name: no-name., OBJECT> (object begin) Property: <Name: level, STRING: status> Property: <Name: code, STRING: NetConnection.Connect.Success> Property: <Name: description, STRING: Connection succeeded> Property: <Name: clientId, NUMBER: 217834719.00> Property: <Name: objectEncoding, NUMBER: 0.00> (object end) (object end) HandleInvoke, server invoking <_result> HandleInvoke, received result for method call <connect> Invoking releaseStream Invoking FCPublish Invoking createStream RTMP_ClientPacket, received: invoke 61 bytes (object begin) Property: <Name: no-name., STRING: connected> Property: <Name: no-name., NUMBER: 0.00> Property: NULL Property: <Name: no-name., STRING: 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80> (object end) HandleInvoke, server invoking <connected> 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=29 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for releaseStream 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [WARNING] rtmp.c:198 Unhandled invoke for "releaseStream" 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=25 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for FCPublish 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [WARNING] rtmp.c:198 Unhandled invoke for "FCPublish" 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=25 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for createStream 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=29 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [INFO] rtmp_sig.c:137 Replied to createStream (0) RTMP_ClientPacket, received: invoke 29 bytes (object begin) Property: <Name: no-name., STRING: _result> Property: <Name: no-name., NUMBER: 4.00> Property: NULL Property: <Name: no-name., NUMBER: 1.00> (object end) HandleInvoke, server invoking <_result> HandleInvoke, received result for method call <createStream> Invoking publish 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:1081 [chunk_stream=4 type=0x14 ts=0 stream_id=0x1] len=30 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:192 [amfnumber=4] Got INVOKE for publish 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x4 stream_id=0x0] len=6 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=5 type=0x14 stream_id=0x1] len=138 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [INFO] rtmp_sig.c:290 Got publish on stream 1. HandleCtrl, received ctrl. type: 0, len: 6 HandleCtrl, Stream Begin 1 RTMP_ClientPacket, received: invoke 138 bytes (object begin) Property: <Name: no-name., STRING: onStatus> Property: <Name: no-name., NUMBER: 0.00> Property: NULL Property: <Name: no-name., OBJECT> (object begin) Property: <Name: level, STRING: status> Property: <Name: code, STRING: NetStream.Publish.Start> Property: <Name: description, STRING: description> Property: <Name: details, STRING: details> Property: <Name: clientid, NUMBER: 217834719.00> (object end) (object end) HandleInvoke, server invoking <onStatus> HandleInvoke, onStatus: NetStream.Publish.Start 2016-09-14 17:41:57.408166 [DEBUG] avformat.c:1804 use video codec: [28] h264 (H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10) 2016-09-14 17:41:57.408166 [WARNING] avformat.c:506 Codec [aac] is experimental feature in libavcodec, never mind 2016-09-14 17:41:57.408166 [NOTICE] avformat.c:531 sample_rate: 44100 nb_samples: 1024 2016-09-14 17:41:57.408166 [NOTICE] avformat.c:535 sample_fmt 8 != AV_SAMPLE_FMT_S16, start resampler Output #0, flv, to 'rtmp://nothangout.media.mit.edu/plenary-test': Stream #0.0: Audio: aac, 44100 Hz, stereo, fltp, 131 kb/s 2016-09-14 17:41:57.408166 [INFO] avformat.c:1829 Opening File [rtmp://nothangout.media.mit.edu/plenary-test] 44100hz with VIDEO 2016-09-14 17:41:57.408166 [DEBUG] conference_record.c:279 Setup timer success interval: 20 samples: 882 using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX profile Constrained Baseline, level 4.1 264 - core 142 r2431 a5831aa - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=4 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=30 keyint_min=16 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=crf mbtree=1 crf=18.0 qcomp=0.60 qpmin=10 qpmax=31 qpstep=4 ip_ratio=1.41 aq=1:1.00 2016-09-14 17:41:57.478159 [INFO] avformat.c:2366 use video codec implementation Video: libx264, yuv420p, 800x600, q=10-31, 516 kb/s 2016-09-14 17:41:57.478159 [NOTICE] avformat.c:613 video thread start 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:58.458161 [DEBUG] rtmp.c:1081 [chunk_stream=4 type=0x12 ts=0 stream_id=0x1] len=382 On Wed, Sep 14, 2016, at 05:58 AM, Stephen Dame wrote:
You want to load mod_av
Then use
conference xxxxxx record rtmp://yourserver.cpm/stream_id
you can pass avconv args in this command as well to control encoding options like frames per second and presets.
This will send output of MCU to your red5, wowza, or properly configure nginx rtmp module.
Can also send it directly to youtube.
Regards, Stephen
HostBBB - Online Learning Solutions 207 Technology Group Inc. 1-888-229-9756 skype: Stephen_Dame
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Charlie DeTar Sent: Tuesday, September 13, 2016 10:55 PM To: freeswitch-users@lists.freeswitch.org Subject: [Freeswitch-users] Broadcasting conference with mod_rtmp
Hi,
I'm trying to broadcast a WebRTC video conference (via mod_conference and mod_verto) over an rtmp stream, with the ultimate goal of transcoding the rtmp stream for broadcast as an HTML5 video stream (likely using something like https://github.com/arut/nginx-rtmp-module for HSL and MPEG-DASH broadcasts). I expect I have the same sort of requirements of freeswitch that one would need for broadcasting rtmp to youtube, which the docs mention glancingly without detail [0]. :)
The video conferencing is working great -- but I'm struggling to figure out how to access the RTMP stream for it. My rtmp.conf.xml is basically the default (but with `auth-calls` set to `false`). My dialplan is as follows:
<include> <extension name="plenary"> <condition field="destination_number" expression="^plenary-.*$" break="never"> <action application="answer"/> <action application="info"/> <action application="conference" data="${destination_number}@plenary-conference-profile"/> </condition> </extension> </include>
I'm able to connect to freeswitch using RTMP clients (I've tried rtmpdump, mplayer, and vlc). In fs_cli, I see debug info (example copied below [1]) that seems to indicate successful connections. However, the RTMP client never receives any data from the server and disconnects after around 30 seconds.
I'm trying to connect via URLs like: rtmp://<domain>:<port>/plenary-conferencename rtmp://<domain>:<port>/plenary-conferencename@plenary-conference-profi le rtmp://<domain>:<port>/default/plenary-conferencename and so on, and all exhibit the same behavior. It doesn't seem to matter what path I put -- freeswitch accepts the connection, sends no data, then disconnects after a while. This leads me to suspect I might just be getting the path name wrong.
My questions, if anyone has experience with this:
What is the correct path for the rtmp URL to connect to a video conference -- is it just the $destination_number, or something else? Are there any obvious steps I'm missing to set up rtmp feeds, or any suggestions for how to do smarter debugging of this? Does anyone have an example project that successfully broadcasts RTMP from a video conference to e.g. youtube? Is there a better or more convenient approach to broadcasting a video stream from a conference that you prefer to rtmp?
The full freeswitch config I'm using is here: https://gitlab.com/cdetar/plenary-server/tree/master/ansible/roles/ple nary/t emplates/freeswitch , if that's helpful. (Those are templates for an ansible config, so they contain variables that get interpolated in using {{var}} syntax).
best, Charlie
[0] Glancing reference to youtube+rtmp: https://freeswitch.org/confluence/display/FREESWITCH/FreeSWITCH+1.6+Vi deo#Fr eeSWITCH1.6Video-What%27snew
[1] fs_cli debug info while attempting to connect via RTMP:
2016-09-13 23:37:40.551744 [NOTICE] mod_rtmp.c:903 New RTMP session [1513874f-9084-470c-a2de-7e5f92bb2296] 2016-09-13 23:37:40.551744 [INFO] rtmp_tcp.c:234 Rtmp connection from 98.127.250.255:44131 2016-09-13 23:37:40.551744 [DEBUG] rtmp.c:882 Sent handshake response 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:907 Done with handshake 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=204 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for connect 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x1 stream_id=0x0] len=4 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x5 stream_id=0x0] len=4 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x6 stream_id=0x0] len=5 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x4 stream_id=0x0] len=6 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=201 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=61 2016-09-13 23:37:40.711748 [NOTICE] rtmp_sig.c:122 Sent connect reply 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:1081 [chunk_stream=2 type=0x5 ts=0 stream_id=0x0] len=4 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:1184 Set window size: from 2097152 to 2097152 bytes 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:1081 [chunk_stream=2 type=0x4 ts=0 stream_id=0x0] len=10 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:91 Control (3): 00 00 00 00 00 00 01 2c 2016-09-13 23:37:40.851748 [INFO] rtmp.c:118 stream=0 Client buffer set to 300ms 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=25 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for createStream 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=29 2016-09-13 23:37:40.851748 [INFO] rtmp_sig.c:137 Replied to createStream (0) 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:1081 [chunk_stream=8 type=0x14 ts=0 stream_id=0x1] len=82 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:192 [amfnumber=8] Got INVOKE for play 2016-09-13 23:37:40.991748 [DEBUG] rtmp_sig.c:198 Got play for plenary-test-pattern-alpha@plenary-conference-profile on stream 1 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x1 stream_id=0x0] len=4 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x4 stream_id=0x0] len=6 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x4 stream_id=0x0] len=10 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=5 type=0x14 stream_id=0x1] len=135 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=5 type=0x14 stream_id=0x1] len=135 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=5 type=0x12 stream_id=0x1] len=44 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=5 type=0x12 stream_id=0x1] len=24 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:1081 [chunk_stream=2 type=0x4 ts=0 stream_id=0x0] len=10 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:91 Control (3): 00 00 00 01 02 25 51 00 2016-09-13 23:37:40.991748 [INFO] rtmp.c:118 stream=1 Client buffer set to 36000000ms 2016-09-13 23:37:43.951733 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=34 2016-09-13 23:37:43.951733 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for deleteStream 2016-09-13 23:37:43.951733 [NOTICE] rtmp.c:918 Disconnected from flash client 2016-09-13 23:37:43.951733 [DEBUG] rtmp_tcp.c:243 Closing socket 2016-09-13 23:37:44.691705 [NOTICE] mod_rtmp.c:1025 RTMP session ended [1513874f-9084-470c-a2de-7e5f92bb2296]
______________________________________________________________________ ___ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-use rs http://www.freeswitch.org
______________________________________________________________________ ___ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-use rs http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
It only broadcasts to a server, it does not act as a relay you need either crtmpd or redfive etc. We could maybe make that possible some day with enough code but its not possible at all today. I see mit.edu in your logs. Doing some academic research? Contact us directly, consulting@freeswitch.org and/or press the "live chat" button on https://freeswitch.org we like working with universities. On Wed, Sep 14, 2016 at 1:52 PM, Stephen Dame <sdame@207me.com> wrote:
rtmp://nothangout.media.mit.edu/plenary-test <--- this needs to be a server publish point on some red5/fms server. or nginx configured correctly to publish the stream to it at that mount point.
Regards, Stephen
HostBBB - Online Learning Solutions 207 Technology Group Inc. 1-888-229-9756 skype: Stephen_Dame
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Charlie DeTar Sent: Wednesday, September 14, 2016 1:56 PM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Broadcasting conference with mod_rtmp
Thanks! I tried this, but didn't get success yet. Maybe I've misunderstood something. Here's what I tried:
1. I added `<load module="mod_av"/>` to modules.conf.xml, and restarted freeswitch.
2. I connected participants to a conference with destination number "plenary-test". This is what `conference list` in fs_cli shows after this:
Conference plenary-test (1 member rate: 44100 flags: running|answered|enforce_min|dynamic|exit_sound|enter_sound|livearray_sy running|answered|nc|transcode_video|video_muxing|minimize_video_encoding running|answered||json_status) 1;verto.rtc/plenary-test;4ae28d9e-cf98-363f-ed40- 2b6544fb8685;Anonymous;plen ary_user@nothangout.media.mit.edu;hear|speak|video|floor| vid-floor;0;0;0;200
3. In fs_cli, I issued the following command:
conference plenary-test record rtmp://nothangout.media.mit.edu/plenary-test
The domain here is the same domain as the freeswitch server. There is no red5/wowza/nginx-mod-rtmp/etc running on this server yet. This produced the logs below. [0]
4. I attempted to connect to rtmp://nothangout.media.mit.edu/plenary-test using mplayer, vlc, and rtmpdump. None of them receive any data.
Shortly after issuing `conference plenary-test record ...`, whether or not I attempt to connect an rtmp client, freeswitch appears to crash -- the logs show freeswitch starting up, the verto browser session reloads, and the fs_cli socket is lost. I don't see anything in the logs about a crash (it just up-and-reboots).
Have I missed a step here? Does freeswitch need a running red5/etc. server that it is connecting to when I issue the `record` command, or is it producing a stream that an rtmp client should be able to consume? Forgive my ignorance here; I'm new to rtmp streaming.
I'm running freeswitch 1.6.10~17~726, via freeswitch's debian packages, on debian 8.5.
best, Charlie
[0] Debug log after issuing `conference plenary-test record ...`, and before freeswitch crashes:
2016-09-14 17:41:57.378173 [DEBUG] avformat.c:1701 sample rate: 44100, channels: 2 Parsing... Parsed protocol: 0 Parsed host : nothangout.media.mit.edu Parsed app : plenary-test RTMP_Connect1, ... connected, handshaking 2016-09-14 17:41:57.408166 [NOTICE] mod_rtmp.c:903 New RTMP session [81e27b34-92ae-4fd8-9d8b-6ba58ed32e80] 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [INFO] rtmp_tcp.c:234 Rtmp connection from 18.85.44.183:54786 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:882 Sent handshake response HandShake: Type Answer : 03 HandShake: Server Uptime : 414322 HandShake: FMS Version : 0.0.0.0 HandShake: Handshaking finished.... RTMP_Connect1, handshaked 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:907 Done with handshake 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=116 Invoking connect 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for connect 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x1 stream_id=0x0] len=4 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x5 stream_id=0x0] len=4 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x6 stream_id=0x0] len=5 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x4 stream_id=0x0] len=6 HandleChangeChunkSize, received: chunk size change to 512 HandleServerBW: server BW = 2097152 HandleClientBW: client BW = 2097152 1 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=201 HandleCtrl, received ctrl. type: 0, len: 6 HandleCtrl, Stream Begin 0 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=61 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [NOTICE] rtmp_sig.c:122 Sent connect reply RTMP_ClientPacket, received: invoke 201 bytes (object begin) Property: <Name: no-name., STRING: _result> Property: <Name: no-name., NUMBER: 1.00> Property: <Name: no-name., OBJECT> (object begin) Property: <Name: fmsVer, NUMBER: 1.00> Property: <Name: capabilities, NUMBER: 31.00> (object end) Property: <Name: no-name., OBJECT> (object begin) Property: <Name: level, STRING: status> Property: <Name: code, STRING: NetConnection.Connect.Success> Property: <Name: description, STRING: Connection succeeded> Property: <Name: clientId, NUMBER: 217834719.00> Property: <Name: objectEncoding, NUMBER: 0.00> (object end) (object end) HandleInvoke, server invoking <_result> HandleInvoke, received result for method call <connect> Invoking releaseStream Invoking FCPublish Invoking createStream RTMP_ClientPacket, received: invoke 61 bytes (object begin) Property: <Name: no-name., STRING: connected> Property: <Name: no-name., NUMBER: 0.00> Property: NULL Property: <Name: no-name., STRING: 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80> (object end) HandleInvoke, server invoking <connected> 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=29 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for releaseStream 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [WARNING] rtmp.c:198 Unhandled invoke for "releaseStream" 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=25 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for FCPublish 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [WARNING] rtmp.c:198 Unhandled invoke for "FCPublish" 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=25 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for createStream 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=29 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [INFO] rtmp_sig.c:137 Replied to createStream (0) RTMP_ClientPacket, received: invoke 29 bytes (object begin) Property: <Name: no-name., STRING: _result> Property: <Name: no-name., NUMBER: 4.00> Property: NULL Property: <Name: no-name., NUMBER: 1.00> (object end) HandleInvoke, server invoking <_result> HandleInvoke, received result for method call <createStream> Invoking publish 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:1081 [chunk_stream=4 type=0x14 ts=0 stream_id=0x1] len=30 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:192 [amfnumber=4] Got INVOKE for publish 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x4 stream_id=0x0] len=6 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=5 type=0x14 stream_id=0x1] len=138 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [INFO] rtmp_sig.c:290 Got publish on stream 1. HandleCtrl, received ctrl. type: 0, len: 6 HandleCtrl, Stream Begin 1 RTMP_ClientPacket, received: invoke 138 bytes (object begin) Property: <Name: no-name., STRING: onStatus> Property: <Name: no-name., NUMBER: 0.00> Property: NULL Property: <Name: no-name., OBJECT> (object begin) Property: <Name: level, STRING: status> Property: <Name: code, STRING: NetStream.Publish.Start> Property: <Name: description, STRING: description> Property: <Name: details, STRING: details> Property: <Name: clientid, NUMBER: 217834719.00> (object end) (object end) HandleInvoke, server invoking <onStatus> HandleInvoke, onStatus: NetStream.Publish.Start 2016-09-14 17:41:57.408166 [DEBUG] avformat.c:1804 use video codec: [28] h264 (H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10) 2016-09-14 17:41:57.408166 [WARNING] avformat.c:506 Codec [aac] is experimental feature in libavcodec, never mind 2016-09-14 17:41:57.408166 [NOTICE] avformat.c:531 sample_rate: 44100 nb_samples: 1024 2016-09-14 17:41:57.408166 [NOTICE] avformat.c:535 sample_fmt 8 != AV_SAMPLE_FMT_S16, start resampler Output #0, flv, to 'rtmp://nothangout.media.mit.edu/plenary-test': Stream #0.0: Audio: aac, 44100 Hz, stereo, fltp, 131 kb/s 2016-09-14 17:41:57.408166 [INFO] avformat.c:1829 Opening File [rtmp://nothangout.media.mit.edu/plenary-test] 44100hz with VIDEO 2016-09-14 17:41:57.408166 [DEBUG] conference_record.c:279 Setup timer success interval: 20 samples: 882 using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX profile Constrained Baseline, level 4.1 264 - core 142 r2431 a5831aa - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=4 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=30 keyint_min=16 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=crf mbtree=1 crf=18.0 qcomp=0.60 qpmin=10 qpmax=31 qpstep=4 ip_ratio=1.41 aq=1:1.00 2016-09-14 17:41:57.478159 [INFO] avformat.c:2366 use video codec implementation Video: libx264, yuv420p, 800x600, q=10-31, 516 kb/s 2016-09-14 17:41:57.478159 [NOTICE] avformat.c:613 video thread start 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:58.458161 [DEBUG] rtmp.c:1081 [chunk_stream=4 type=0x12 ts=0 stream_id=0x1] len=382
On Wed, Sep 14, 2016, at 05:58 AM, Stephen Dame wrote:
You want to load mod_av
Then use
conference xxxxxx record rtmp://yourserver.cpm/stream_id
you can pass avconv args in this command as well to control encoding options like frames per second and presets.
This will send output of MCU to your red5, wowza, or properly configure nginx rtmp module.
Can also send it directly to youtube.
Regards, Stephen
HostBBB - Online Learning Solutions 207 Technology Group Inc. 1-888-229-9756 skype: Stephen_Dame
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Charlie DeTar Sent: Tuesday, September 13, 2016 10:55 PM To: freeswitch-users@lists.freeswitch.org Subject: [Freeswitch-users] Broadcasting conference with mod_rtmp
Hi,
I'm trying to broadcast a WebRTC video conference (via mod_conference and mod_verto) over an rtmp stream, with the ultimate goal of transcoding the rtmp stream for broadcast as an HTML5 video stream (likely using something like https://github.com/arut/nginx-rtmp-module for HSL and MPEG-DASH broadcasts). I expect I have the same sort of requirements of freeswitch that one would need for broadcasting rtmp to youtube, which the docs mention glancingly without detail [0]. :)
The video conferencing is working great -- but I'm struggling to figure out how to access the RTMP stream for it. My rtmp.conf.xml is basically the default (but with `auth-calls` set to `false`). My dialplan is as follows:
<include> <extension name="plenary"> <condition field="destination_number" expression="^plenary-.*$" break="never"> <action application="answer"/> <action application="info"/> <action application="conference" data="${destination_number}@plenary-conference-profile"/> </condition> </extension> </include>
I'm able to connect to freeswitch using RTMP clients (I've tried rtmpdump, mplayer, and vlc). In fs_cli, I see debug info (example copied below [1]) that seems to indicate successful connections. However, the RTMP client never receives any data from the server and disconnects after around 30 seconds.
I'm trying to connect via URLs like: rtmp://<domain>:<port>/plenary-conferencename rtmp://<domain>:<port>/plenary-conferencename@plenary-conference-profi le rtmp://<domain>:<port>/default/plenary-conferencename and so on, and all exhibit the same behavior. It doesn't seem to matter what path I put -- freeswitch accepts the connection, sends no data, then disconnects after a while. This leads me to suspect I might just be getting the path name wrong.
My questions, if anyone has experience with this:
What is the correct path for the rtmp URL to connect to a video conference -- is it just the $destination_number, or something else? Are there any obvious steps I'm missing to set up rtmp feeds, or any suggestions for how to do smarter debugging of this? Does anyone have an example project that successfully broadcasts RTMP from a video conference to e.g. youtube? Is there a better or more convenient approach to broadcasting a video stream from a conference that you prefer to rtmp?
The full freeswitch config I'm using is here: https://gitlab.com/cdetar/plenary-server/tree/master/ansible/roles/ple nary/t emplates/freeswitch , if that's helpful. (Those are templates for an ansible config, so they contain variables that get interpolated in using {{var}} syntax).
best, Charlie
[0] Glancing reference to youtube+rtmp: https://freeswitch.org/confluence/display/FREESWITCH/FreeSWITCH+1.6+Vi deo#Fr eeSWITCH1.6Video-What%27snew
[1] fs_cli debug info while attempting to connect via RTMP:
2016-09-13 23:37:40.551744 [NOTICE] mod_rtmp.c:903 New RTMP session [1513874f-9084-470c-a2de-7e5f92bb2296] 2016-09-13 23:37:40.551744 [INFO] rtmp_tcp.c:234 Rtmp connection from 98.127.250.255:44131 2016-09-13 23:37:40.551744 [DEBUG] rtmp.c:882 Sent handshake response 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:907 Done with handshake 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=204 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for connect 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x1 stream_id=0x0] len=4 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x5 stream_id=0x0] len=4 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x6 stream_id=0x0] len=5 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x4 stream_id=0x0] len=6 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=201 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=61 2016-09-13 23:37:40.711748 [NOTICE] rtmp_sig.c:122 Sent connect reply 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:1081 [chunk_stream=2 type=0x5 ts=0 stream_id=0x0] len=4 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:1184 Set window size: from 2097152 to 2097152 bytes 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:1081 [chunk_stream=2 type=0x4 ts=0 stream_id=0x0] len=10 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:91 Control (3): 00 00 00 00 00 00 01 2c 2016-09-13 23:37:40.851748 [INFO] rtmp.c:118 stream=0 Client buffer set to 300ms 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=25 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for createStream 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=29 2016-09-13 23:37:40.851748 [INFO] rtmp_sig.c:137 Replied to createStream (0) 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:1081 [chunk_stream=8 type=0x14 ts=0 stream_id=0x1] len=82 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:192 [amfnumber=8] Got INVOKE for play 2016-09-13 23:37:40.991748 [DEBUG] rtmp_sig.c:198 Got play for plenary-test-pattern-alpha@plenary-conference-profile on stream 1 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x1 stream_id=0x0] len=4 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x4 stream_id=0x0] len=6 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x4 stream_id=0x0] len=10 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=5 type=0x14 stream_id=0x1] len=135 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=5 type=0x14 stream_id=0x1] len=135 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=5 type=0x12 stream_id=0x1] len=44 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=5 type=0x12 stream_id=0x1] len=24 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:1081 [chunk_stream=2 type=0x4 ts=0 stream_id=0x0] len=10 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:91 Control (3): 00 00 00 01 02 25 51 00 2016-09-13 23:37:40.991748 [INFO] rtmp.c:118 stream=1 Client buffer set to 36000000ms 2016-09-13 23:37:43.951733 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=34 2016-09-13 23:37:43.951733 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for deleteStream 2016-09-13 23:37:43.951733 [NOTICE] rtmp.c:918 Disconnected from flash client 2016-09-13 23:37:43.951733 [DEBUG] rtmp_tcp.c:243 Closing socket 2016-09-13 23:37:44.691705 [NOTICE] mod_rtmp.c:1025 RTMP session ended [1513874f-9084-470c-a2de-7e5f92bb2296]
______________________________________________________________________ ___ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-use rs http://www.freeswitch.org
______________________________________________________________________ ___ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-use rs http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬ ☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞ http://twitter.com/FreeSWITCH ☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+ <http://freeswitch.org/g+>* ClueCon Weekly Development Call ☎ sip:888@conference.freeswitch.org ☎ +19193869900 https://www.youtube.com/watch?v=9XXgW34t40s https://www.youtube.com/watch?v=NLaDpGQuZDA
Thanks for clarifying that. I configured nginx-rtmp-module, and was able to successfully got an rtmp stream sent from the conference to sent to it and transcoded to HLS / MPEG-DASH. However, freeswitch still crashes a short time after invoking `conference <name> record ...` (I've seen between 10 seconds and 2 minutes after). My next attempt will be to compile freeswitch from source rather than using freeswitch's debian packages, to see if a more recent commit can survive recording to rtmp without crashing. Thanks for the offer Anthony, I am working with an MIT lab on a research project. I'll follow up separately. -charlie On Wed, Sep 14, 2016, at 02:26 PM, Anthony Minessale wrote:
It only broadcasts to a server, it does not act as a relay you need either crtmpd or redfive etc. We could maybe make that possible some day with enough code but its not possible at all today.
I see mit.edu in your logs. Doing some academic research? Contact us directly, consulting@freeswitch.org and/or press the "live chat" button on https://freeswitch.org we like working with universities.
On Wed, Sep 14, 2016 at 1:52 PM, Stephen Dame <sdame@207me.com> wrote:
rtmp://nothangout.media.mit.edu/plenary-test <--- this needs to be a server publish point on some red5/fms server. or nginx configured correctly to publish the stream to it at that mount point.
Regards, Stephen
HostBBB - Online Learning Solutions 207 Technology Group Inc. 1-888-229- 9756 skype: Stephen_Dame
-----Original Message----- From: freeswitch-users- bounces@lists.freeswitch.org [mailto:freeswitch-users- bounces@lists.freeswitch.org] On Behalf Of Charlie DeTar Sent: Wednesday, September 14, 2016 1:56 PM To: freeswitch- users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Broadcasting conference with mod_rtmp
Thanks! I tried this, but didn't get success yet. Maybe I've misunderstood something. Here's what I tried:
1. I added `<load module="mod_av"/>` to modules.conf.xml, and restarted freeswitch.
2. I connected participants to a conference with destination number "plenary-test". This is what `conference list` in fs_cli shows after this:
Conference plenary-test (1 member rate: 44100 flags: running|answer- ed|enforce_min|dynamic|exit_sound|enter_sound|livearray_sy running|- answered|nc|transcode_video|video_muxing|minimize_video_encoding running|answered||json_status)
1;verto.rtc/plenary-test;4ae28d9e-cf98-363f-ed40- 2b6544fb8685;Anonymous;plen ary_user@nothangout.media.mit.edu;hear|speak|video|floor|vid- floor;0;0;0;200
3. In fs_cli, I issued the following command:
conference plenary-test record rtmp://nothangout.media.mit.edu/plenary-test
The domain here is the same domain as the freeswitch server. There is no red5/wowza/nginx-mod-rtmp/etc running on this server yet. This produced the logs below. [0]
4. I attempted to connect to rtmp://nothangout.media.mit.edu/plenary-test using mplayer, vlc, and rtmpdump. None of them receive any data.
Shortly after issuing `conference plenary-test record ...`, whether or not I attempt to connect an rtmp client, freeswitch appears to crash -- the logs show freeswitch starting up, the verto browser session reloads, and the fs_cli socket is lost. I don't see anything in the logs about a crash (it just up-and-reboots).
Have I missed a step here? Does freeswitch need a running red5/etc. server that it is connecting to when I issue the `record` command, or is it producing a stream that an rtmp client should be able to consume? Forgive my ignorance here; I'm new to rtmp streaming.
I'm running freeswitch 1.6.10~17~726, via freeswitch's debian packages, on debian 8.5.
best, Charlie
[] Debug log after issuing `conference plenary-test record ...`, and before freeswitch crashes:
2016-09-14 17:41:57.378173 [DEBUG] avformat.c:1701 sample rate: 44100, channels: 2 Parsing... Parsed protocol: 0 Parsed host : nothangout.media.mit.edu Parsed app : plenary-test RTMP_Connect1, ... connected, handshaking 2016-09-14 17:41:57.408166 [NOTICE] mod_rtmp.c:903 New RTMP session [81e27b34-92ae-4fd8-9d8b-6ba58ed32e80] 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [INFO] rtmp_tcp.c:234 Rtmp connection from 18.85.44.183:54786 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:882 Sent handshake response HandShake: Type Answer : 03 HandShake: Server Uptime : 414322 HandShake: FMS Version : 0.0.0.0 HandShake: Handshaking finished.... RTMP_Connect1, handshaked 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:907 Done with handshake 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=116 Invoking connect 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for connect 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x1 stream_id=0x0] len=4 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x5 stream_id=0x0] len=4 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x6 stream_id=0x0] len=5 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x4 stream_id=0x0] len=6 HandleChangeChunkSize, received: chunk size change to 512 HandleServerBW: server BW = 2097152 HandleClientBW: client BW = 2097152 1 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=201 HandleCtrl, received ctrl. type: 0, len: 6 HandleCtrl, Stream Begin 0 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=61 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [NOTICE] rtmp_sig.c:122 Sent connect reply RTMP_ClientPacket, received: invoke 201 bytes (object begin) Property: <Name: no-name., STRING: _result> Property: <Name: no-name., NUMBER: 1.00> Property: <Name: no-name., OBJECT> (object begin) Property: <Name: fmsVer, NUMBER: 1.00> Property: <Name: capabilities, NUMBER: 31.00> (object end) Property: <Name: no-name., OBJECT> (object begin) Property: <Name: level, STRING: status> Property: <Name: code, STRING: NetConnection.Connect.Success> Property: <Name: description, STRING: Connection succeeded> Property: <Name: clientId, NUMBER: 217834719.00> Property: <Name: objectEncoding, NUMBER: 0.00> (object end) (object end) HandleInvoke, server invoking <_result> HandleInvoke, received result for method call <connect> Invoking releaseStream Invoking FCPublish Invoking createStream RTMP_ClientPacket, received: invoke 61 bytes (object begin) Property: <Name: no-name., STRING: connected> Property: <Name: no-name., NUMBER: 0.00> Property: NULL Property: <Name: no-name., STRING: 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80> (object end) HandleInvoke, server invoking <connected> 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=29 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for releaseStream 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [WARNING] rtmp.c:198 Unhandled invoke for "releaseStream" 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=25 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for FCPublish 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [WARNING] rtmp.c:198 Unhandled invoke for "FCPublish" 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=25 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for createStream 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=29 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [INFO] rtmp_sig.c:137 Replied to createStream (0) RTMP_ClientPacket, received: invoke 29 bytes (object begin) Property: <Name: no-name., STRING: _result> Property: <Name: no-name., NUMBER: 4.00> Property: NULL Property: <Name: no-name., NUMBER: 1.00> (object end) HandleInvoke, server invoking <_result> HandleInvoke, received result for method call <createStream> Invoking publish 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:1081 [chunk_stream=4 type=0x14 ts=0 stream_id=0x1] len=30 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:192 [amfnumber=4] Got INVOKE for publish 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x4 stream_id=0x0] len=6 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=5 type=0x14 stream_id=0x1] len=138 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [INFO] rtmp_sig.c:290 Got publish on stream 1. HandleCtrl, received ctrl. type: 0, len: 6 HandleCtrl, Stream Begin 1 RTMP_ClientPacket, received: invoke 138 bytes (object begin) Property: <Name: no-name., STRING: onStatus> Property: <Name: no-name., NUMBER: 0.00> Property: NULL Property: <Name: no-name., OBJECT> (object begin) Property: <Name: level, STRING: status> Property: <Name: code, STRING: NetStream.Publish.Start> Property: <Name: description, STRING: description> Property: <Name: details, STRING: details> Property: <Name: clientid, NUMBER: 217834719.00> (object end) (object end) HandleInvoke, server invoking <onStatus> HandleInvoke, onStatus: NetStream.Publish.Start 2016-09-14 17:41:57.408166 [DEBUG] avformat.c:1804 use video codec: [28] h264 (H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10) 2016-09-14 17:41:57.408166 [WARNING] avformat.c:506 Codec [aac] is experimental feature in libavcodec, never mind 2016-09-14 17:41:57.408166 [NOTICE] avformat.c:531 sample_rate: 44100 nb_samples: 1024 2016-09-14 17:41:57.408166 [NOTICE] avformat.c:535 sample_fmt 8 != AV_SAMPLE_FMT_S16, start resampler Output #0, flv, to 'rtmp://nothangout.media.mit.edu/plenary-test': Stream #0.0: Audio: aac, 44100 Hz, stereo, fltp, 131 kb/s 2016-09-14 17:41:57.408166 [INFO] avformat.c:1829 Opening File [rtmp://nothangout.media.mit.edu/plenary-test] 44100hz with VIDEO 2016-09-14 17:41:57.408166 [DEBUG] conference_record.c:279 Setup timer success interval: 20 samples: 882 using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX profile Constrained Baseline, level 4.1 264 - core 142 r2431 a5831aa - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=4 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=30 keyint_min=16 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=crf mbtree=1 crf=18.0 qcomp=0.60 qpmin=10 qpmax=31 qpstep=4 ip_ratio=1.41 aq=1:1.00 2016-09-14 17:41:57.478159 [INFO] avformat.c:2366 use video codec implementation Video: libx264, yuv420p, 800x600, q=10-31, 516 kb/s 2016-09-14 17:41:57.478159 [NOTICE] avformat.c:613 video thread start 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:58.458161 [DEBUG] rtmp.c:1081 [chunk_stream=4 type=0x12 ts=0 stream_id=0x1] len=382
On Wed, Sep 14, 2016, at 05:58 AM, Stephen Dame wrote:
You want to load mod_av
Then use
conference xxxxxx record rtmp://yourserver.cpm/stream_id
you can pass avconv args in this command as well to control encoding options like frames per second and presets.
This will send output of MCU to your red5, wowza, or properly configure nginx rtmp module.
Can also send it directly to youtube.
Regards, Stephen
HostBBB - Online Learning Solutions 207 Technology Group Inc. 1-888-229-9756 skype: Stephen_Dame
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Charlie DeTar Sent: Tuesday, September 13, 2016 10:55 PM To: freeswitch-users@lists.freeswitch.org Subject: [Freeswitch-users] Broadcasting conference with mod_rtmp
Hi,
I'm trying to broadcast a WebRTC video conference (via mod_conference and mod_verto) over an rtmp stream, with the ultimate goal of transcoding the rtmp stream for broadcast as an HTML5 video stream (likely using something like https://github.com/arut/nginx-rtmp-module for HSL and MPEG-DASH broadcasts). I expect I have the same sort of requirements of freeswitch that one would need for broadcasting rtmp to youtube, which the docs mention glancingly without detail [0]. :)
The video conferencing is working great -- but I'm struggling to figure out how to access the RTMP stream for it. My rtmp.conf.xml is basically the default (but with `auth-calls` set to `false`). My dialplan is as follows:
<include> <extension name="plenary"> <condition field="destination_number" expression="^plenary- .*$" break="never"> <action application="answer"/> <action application="info"/> <action application="conference" data="${destination_number}@plenary-conference- profile"/> </condition> </extension> </include>
I'm able to connect to freeswitch using RTMP clients (I've tried rtmpdump, mplayer, and vlc). In fs_cli, I see debug info (example copied below [1]) that seems to indicate successful connections. However, the RTMP client never receives any data from the server and disconnects after around 30 seconds.
I'm trying to connect via URLs like: rtmp://<domain>:<port>/plenary-conferencename rtmp://<domain>:<port>/plenary-conferencename@plenary-conference- profi le rtmp://<domain>:<port>/default/plenary-conferencename
and so on, and all exhibit the same behavior. It doesn't seem to matter what path I put -- freeswitch accepts the connection, sends no data, then disconnects after a while. This leads me to suspect I might just be getting the path name wrong.
My questions, if anyone has experience with this:
What is the correct path for the rtmp URL to connect to a video conference -- is it just the $destination_number, or something else? Are there any obvious steps I'm missing to set up rtmp feeds, or any suggestions for how to do smarter debugging of this? Does anyone have an example project that successfully broadcasts RTMP from a video conference to e.g. youtube? Is there a better or more convenient approach to broadcasting a video stream from a conference that you prefer to rtmp?
The full freeswitch config I'm using is here: https://gitlab.com/cdetar/plenary-server/tree/master/ansible/roles/ple nary/t emplates/freeswitch , if that's helpful. (Those are templates for an ansible config, so they contain variables that get interpolated in using {{var}} syntax).
best, Charlie
[] Glancing reference to youtube+rtmp: https://freeswitch.org/confluence/display/FREESWITCH/FreeSWITCH+1.6+Vi deo#Fr eeSWITCH1.6Video-What%27snew
[1] fs_cli debug info while attempting to connect via RTMP:
2016-09-13 23:37:40.551744 [NOTICE] mod_rtmp.c:903 New RTMP session [1513874f-9084-470c-a2de-7e5f92bb2296] 2016-09-13 23:37:40.551744 [INFO] rtmp_tcp.c:234 Rtmp connection from 98.127.250.255:44131 2016-09-13 23:37:40.551744 [DEBUG] rtmp.c:882 Sent handshake response 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:907 Done with handshake 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=204 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for connect 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x1 stream_id=0x0] len=4 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x5 stream_id=0x0] len=4 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x6 stream_id=0x0] len=5 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x4 stream_id=0x0] len=6 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=201 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=61 2016-09-13 23:37:40.711748 [NOTICE] rtmp_sig.c:122 Sent connect reply 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:1081 [chunk_stream=2 type=0x5 ts=0 stream_id=0x0] len=4 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:1184 Set window size: from 2097152 to 2097152 bytes 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:1081 [chunk_stream=2 type=0x4 ts=0 stream_id=0x0] len=10 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:91 Control (3): 00 00 00 00 00 00 01 2c 2016-09-13 23:37:40.851748 [INFO] rtmp.c:118 stream=0 Client buffer set to 300ms 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=25 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for createStream 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=29 2016-09-13 23:37:40.851748 [INFO] rtmp_sig.c:137 Replied to createStream () 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:1081 [chunk_stream=8 type=0x14 ts=0 stream_id=0x1] len=82 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:192 [amfnumber=8] Got INVOKE for play 2016-09-13 23:37:40.991748 [DEBUG] rtmp_sig.c:198 Got play for plenary-test-pattern-alpha@plenary-conference-profile on stream 1 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x1 stream_id=0x0] len=4 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x4 stream_id=0x0] len=6 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x4 stream_id=0x0] len=10 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=5 type=0x14 stream_id=0x1] len=135 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=5 type=0x14 stream_id=0x1] len=135 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=5 type=0x12 stream_id=0x1] len=44 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=5 type=0x12 stream_id=0x1] len=24 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:1081 [chunk_stream=2 type=0x4 ts=0 stream_id=0x0] len=10 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:91 Control (3): 00 00 00 01 02 25 51 00 2016-09-13 23:37:40.991748 [INFO] rtmp.c:118 stream=1 Client buffer set to 36000000ms 2016-09-13 23:37:43.951733 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=34 2016-09-13 23:37:43.951733 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for deleteStream 2016-09-13 23:37:43.951733 [NOTICE] rtmp.c:918 Disconnected from flash client 2016-09-13 23:37:43.951733 [DEBUG] rtmp_tcp.c:243 Closing socket 2016-09-13 23:37:44.691705 [NOTICE] mod_rtmp.c:1025 RTMP session ended [1513874f-9084-470c-a2de-7e5f92bb2296]
_________________________________________________________________- _____ ___ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH- users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-use rs http://www.freeswitch.org
_________________________________________________________________- _____ ___ Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-use rs http://www.freeswitch.org
___________________________________________________________________- ______ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
___________________________________________________________________- ______ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬
☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞ http://twitter.com/FreeSWITCH ☞ irc.freenode.net #freeswitch ☞ _http://freeswitch.org/g+_ ClueCon Weekly Development Call ☎ sip:888@conference.freeswitch.org[1] ☎ +19193869900
https://www.youtube.com/watch?v=9XXgW34t40s https://www.youtube.com/watch?v=NLaDpGQuZDA ___________________________________________________________________- ________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Links: 1. mailto:sip%3A888@conference.freeswitch.org
we run rtmp streams all the time without crashing so something weird is going on, i doubt it's the packaging. Can you get a backtrace of the crash and report a bug to jira so we can investigate? On Wednesday, September 14, 2016, Charlie DeTar <cfd-fs@fohn.org> wrote:
Thanks for clarifying that. I configured nginx-rtmp-module, and was able to successfully got an rtmp stream sent from the conference to sent to it and transcoded to HLS / MPEG-DASH. However, freeswitch still crashes a short time after invoking `conference <name> record ...` (I've seen between 10 seconds and 2 minutes after).
My next attempt will be to compile freeswitch from source rather than using freeswitch's debian packages, to see if a more recent commit can survive recording to rtmp without crashing.
Thanks for the offer Anthony, I am working with an MIT lab on a research project. I'll follow up separately.
-charlie
On Wed, Sep 14, 2016, at 02:26 PM, Anthony Minessale wrote:
It only broadcasts to a server, it does not act as a relay you need either crtmpd or redfive etc. We could maybe make that possible some day with enough code but its not possible at all today.
I see mit.edu in your logs. Doing some academic research? Contact us directly, consulting@freeswitch.org <javascript:_e(%7B%7D,'cvml','consulting@freeswitch.org');> and/or press the "live chat" button on https://freeswitch.org we like working with universities.
On Wed, Sep 14, 2016 at 1:52 PM, Stephen Dame <sdame@207me.com <javascript:_e(%7B%7D,'cvml','sdame@207me.com');>> wrote:
rtmp://nothangout.media.mit.edu/plenary-test <--- this needs to be a server publish point on some red5/fms server. or nginx configured correctly to publish the stream to it at that mount point.
Regards, Stephen
HostBBB - Online Learning Solutions 207 Technology Group Inc. 1-888-229-9756 skype: Stephen_Dame
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org <javascript:_e(%7B%7D,'cvml','freeswitch-users-bounces@lists.freeswitch.org');> [mailto:freeswitch-users-bounces@lists.freeswitch.org <javascript:_e(%7B%7D,'cvml','freeswitch-users-bounces@lists.freeswitch.org');>] On Behalf Of Charlie DeTar Sent: Wednesday, September 14, 2016 1:56 PM To: freeswitch-users@lists.freeswitch.org <javascript:_e(%7B%7D,'cvml','freeswitch-users@lists.freeswitch.org');> Subject: Re: [Freeswitch-users] Broadcasting conference with mod_rtmp
Thanks! I tried this, but didn't get success yet. Maybe I've misunderstood something. Here's what I tried:
1. I added `<load module="mod_av"/>` to modules.conf.xml, and restarted freeswitch.
2. I connected participants to a conference with destination number "plenary-test". This is what `conference list` in fs_cli shows after this:
Conference plenary-test (1 member rate: 44100 flags: running|answered|enforce_min|dynamic|exit_sound|enter_sound|livearray_sy running|answered|nc|transcode_video|video_muxing|minimize_video_encoding running|answered||json_status)
1;verto.rtc/plenary-test;4ae28d9e-cf98-363f-ed40-2b6544fb868 5;Anonymous;plen ary_user@nothangout.media.mit.edu <javascript:_e(%7B%7D,'cvml','ary_user@nothangout.media.mit.edu');> ;hear|speak|video|floor|vid-floor;0;0;0;200
3. In fs_cli, I issued the following command:
conference plenary-test record rtmp://nothangout.media.mit.edu/plenary-test
The domain here is the same domain as the freeswitch server. There is no red5/wowza/nginx-mod-rtmp/etc running on this server yet. This produced the logs below. [0]
4. I attempted to connect to rtmp://nothangout.media.mit.edu/plenary-test using mplayer, vlc, and rtmpdump. None of them receive any data.
Shortly after issuing `conference plenary-test record ...`, whether or not I attempt to connect an rtmp client, freeswitch appears to crash -- the logs show freeswitch starting up, the verto browser session reloads, and the fs_cli socket is lost. I don't see anything in the logs about a crash (it just up-and-reboots).
Have I missed a step here? Does freeswitch need a running red5/etc. server that it is connecting to when I issue the `record` command, or is it producing a stream that an rtmp client should be able to consume? Forgive my ignorance here; I'm new to rtmp streaming.
I'm running freeswitch 1.6.10~17~726, via freeswitch's debian packages, on debian 8.5.
best, Charlie
[0] Debug log after issuing `conference plenary-test record ...`, and before freeswitch crashes:
2016-09-14 17:41:57.378173 [DEBUG] avformat.c:1701 sample rate: 44100, channels: 2 Parsing... Parsed protocol: 0 Parsed host : nothangout.media.mit.edu Parsed app : plenary-test RTMP_Connect1, ... connected, handshaking 2016-09-14 17:41:57.408166 [NOTICE] mod_rtmp.c:903 New RTMP session [81e27b34-92ae-4fd8-9d8b-6ba58ed32e80] 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [INFO] rtmp_tcp.c:234 Rtmp connection from 18.85.44.183:54786 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:882 Sent handshake response HandShake: Type Answer : 03 HandShake: Server Uptime : 414322 HandShake: FMS Version : 0.0.0.0 HandShake: Handshaking finished.... RTMP_Connect1, handshaked 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:907 Done with handshake 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=116 Invoking connect 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for connect 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x1 stream_id=0x0] len=4 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x5 stream_id=0x0] len=4 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x6 stream_id=0x0] len=5 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x4 stream_id=0x0] len=6 HandleChangeChunkSize, received: chunk size change to 512 HandleServerBW: server BW = 2097152 HandleClientBW: client BW = 2097152 1 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=201 HandleCtrl, received ctrl. type: 0, len: 6 HandleCtrl, Stream Begin 0 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=61 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [NOTICE] rtmp_sig.c:122 Sent connect reply RTMP_ClientPacket, received: invoke 201 bytes (object begin) Property: <Name: no-name., STRING: _result> Property: <Name: no-name., NUMBER: 1.00> Property: <Name: no-name., OBJECT> (object begin) Property: <Name: fmsVer, NUMBER: 1.00> Property: <Name: capabilities, NUMBER: 31.00> (object end) Property: <Name: no-name., OBJECT> (object begin) Property: <Name: level, STRING: status> Property: <Name: code, STRING: NetConnection.Connect.Success> Property: <Name: description, STRING: Connection succeeded> Property: <Name: clientId, NUMBER: 217834719.00> Property: <Name: objectEncoding, NUMBER: 0.00> (object end) (object end) HandleInvoke, server invoking <_result> HandleInvoke, received result for method call <connect> Invoking releaseStream Invoking FCPublish Invoking createStream RTMP_ClientPacket, received: invoke 61 bytes (object begin) Property: <Name: no-name., STRING: connected> Property: <Name: no-name., NUMBER: 0.00> Property: NULL Property: <Name: no-name., STRING: 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80> (object end) HandleInvoke, server invoking <connected> 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=29 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for releaseStream 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [WARNING] rtmp.c:198 Unhandled invoke for "releaseStream" 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=25 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for FCPublish 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [WARNING] rtmp.c:198 Unhandled invoke for "FCPublish" 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=25 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for createStream 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=29 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [INFO] rtmp_sig.c:137 Replied to createStream (0) RTMP_ClientPacket, received: invoke 29 bytes (object begin) Property: <Name: no-name., STRING: _result> Property: <Name: no-name., NUMBER: 4.00> Property: NULL Property: <Name: no-name., NUMBER: 1.00> (object end) HandleInvoke, server invoking <_result> HandleInvoke, received result for method call <createStream> Invoking publish 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:1081 [chunk_stream=4 type=0x14 ts=0 stream_id=0x1] len=30 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:192 [amfnumber=4] Got INVOKE for publish 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x4 stream_id=0x0] len=6 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [DEBUG] rtmp.c:656 [amfnumber=5 type=0x14 stream_id=0x1] len=138 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:57.408166 [INFO] rtmp_sig.c:290 Got publish on stream 1. HandleCtrl, received ctrl. type: 0, len: 6 HandleCtrl, Stream Begin 1 RTMP_ClientPacket, received: invoke 138 bytes (object begin) Property: <Name: no-name., STRING: onStatus> Property: <Name: no-name., NUMBER: 0.00> Property: NULL Property: <Name: no-name., OBJECT> (object begin) Property: <Name: level, STRING: status> Property: <Name: code, STRING: NetStream.Publish.Start> Property: <Name: description, STRING: description> Property: <Name: details, STRING: details> Property: <Name: clientid, NUMBER: 217834719.00> (object end) (object end) HandleInvoke, server invoking <onStatus> HandleInvoke, onStatus: NetStream.Publish.Start 2016-09-14 17:41:57.408166 [DEBUG] avformat.c:1804 use video codec: [28] h264 (H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10) 2016-09-14 17:41:57.408166 [WARNING] avformat.c:506 Codec [aac] is experimental feature in libavcodec, never mind 2016-09-14 17:41:57.408166 [NOTICE] avformat.c:531 sample_rate: 44100 nb_samples: 1024 2016-09-14 17:41:57.408166 [NOTICE] avformat.c:535 sample_fmt 8 != AV_SAMPLE_FMT_S16, start resampler Output #0, flv, to 'rtmp://nothangout.media.mit.edu/plenary-test': Stream #0.0: Audio: aac, 44100 Hz, stereo, fltp, 131 kb/s 2016-09-14 17:41:57.408166 [INFO] avformat.c:1829 Opening File [rtmp://nothangout.media.mit.edu/plenary-test] 44100hz with VIDEO 2016-09-14 17:41:57.408166 [DEBUG] conference_record.c:279 Setup timer success interval: 20 samples: 882 using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX profile Constrained Baseline, level 4.1 264 - core 142 r2431 a5831aa - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=4 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=30 keyint_min=16 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=crf mbtree=1 crf=18.0 qcomp=0.60 qpmin=10 qpmax=31 qpstep=4 ip_ratio=1.41 aq=1:1.00 2016-09-14 17:41:57.478159 [INFO] avformat.c:2366 use video codec implementation Video: libx264, yuv420p, 800x600, q=10-31, 516 kb/s 2016-09-14 17:41:57.478159 [NOTICE] avformat.c:613 video thread start 81e27b34-92ae-4fd8-9d8b-6ba58ed32e80 2016-09-14 17:41:58.458161 [DEBUG] rtmp.c:1081 [chunk_stream=4 type=0x12 ts=0 stream_id=0x1] len=382
On Wed, Sep 14, 2016, at 05:58 AM, Stephen Dame wrote:
You want to load mod_av
Then use
conference xxxxxx record rtmp://yourserver.cpm/stream_id
you can pass avconv args in this command as well to control encoding options like frames per second and presets.
This will send output of MCU to your red5, wowza, or properly configure nginx rtmp module.
Can also send it directly to youtube.
Regards, Stephen
HostBBB - Online Learning Solutions 207 Technology Group Inc. 1-888-229-9756 skype: Stephen_Dame
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org <javascript:_e(%7B%7D,'cvml','freeswitch-users-bounces@lists.freeswitch.org');> [mailto:freeswitch-users-bounces@lists.freeswitch.org <javascript:_e(%7B%7D,'cvml','freeswitch-users-bounces@lists.freeswitch.org');>] On Behalf Of Charlie DeTar Sent: Tuesday, September 13, 2016 10:55 PM To: freeswitch-users@lists.freeswitch.org <javascript:_e(%7B%7D,'cvml','freeswitch-users@lists.freeswitch.org');> Subject: [Freeswitch-users] Broadcasting conference with mod_rtmp
Hi,
I'm trying to broadcast a WebRTC video conference (via mod_conference and mod_verto) over an rtmp stream, with the ultimate goal of transcoding the rtmp stream for broadcast as an HTML5 video stream (likely using something like https://github.com/arut/nginx-rtmp-module for HSL and MPEG-DASH broadcasts). I expect I have the same sort of requirements of freeswitch that one would need for broadcasting rtmp to youtube, which the docs mention glancingly without detail [0]. :)
The video conferencing is working great -- but I'm struggling to figure out how to access the RTMP stream for it. My rtmp.conf.xml is basically the default (but with `auth-calls` set to `false`). My dialplan is as follows:
<include> <extension name="plenary"> <condition field="destination_number" expression="^plenary-.*$" break="never"> <action application="answer"/> <action application="info"/> <action application="conference" data="${destination_number}@plenary-conference-profile"/> </condition> </extension> </include>
I'm able to connect to freeswitch using RTMP clients (I've tried rtmpdump, mplayer, and vlc). In fs_cli, I see debug info (example copied below [1]) that seems to indicate successful connections. However, the RTMP client never receives any data from the server and disconnects after around 30 seconds.
I'm trying to connect via URLs like: rtmp://<domain>:<port>/plenary-conferencename rtmp://<domain>:<port>/plenary-conferencename@plenary-conference-profi le rtmp://<domain>:<port>/default/plenary-conferencename
and so on, and all exhibit the same behavior. It doesn't seem to matter what path I put -- freeswitch accepts the connection, sends no data, then disconnects after a while. This leads me to suspect I might just be getting the path name wrong.
My questions, if anyone has experience with this:
What is the correct path for the rtmp URL to connect to a video conference -- is it just the $destination_number, or something else? Are there any obvious steps I'm missing to set up rtmp feeds, or any suggestions for how to do smarter debugging of this? Does anyone have an example project that successfully broadcasts RTMP from a video conference to e.g. youtube? Is there a better or more convenient approach to broadcasting a video stream from a conference that you prefer to rtmp?
The full freeswitch config I'm using is here: https://gitlab.com/cdetar/plenary-server/tree/master/ansible/roles/ple nary/t emplates/freeswitch , if that's helpful. (Those are templates for an ansible config, so they contain variables that get interpolated in using {{var}} syntax).
best, Charlie
[0] Glancing reference to youtube+rtmp: https://freeswitch.org/confluence/display/FREESWITCH/FreeSWITCH+1.6+Vi deo#Fr eeSWITCH1.6Video-What%27snew
[1] fs_cli debug info while attempting to connect via RTMP:
2016-09-13 23:37:40.551744 [NOTICE] mod_rtmp.c:903 New RTMP session [1513874f-9084-470c-a2de-7e5f92bb2296] 2016-09-13 23:37:40.551744 [INFO] rtmp_tcp.c:234 Rtmp connection from 98.127.250.255:44131 2016-09-13 23:37:40.551744 [DEBUG] rtmp.c:882 Sent handshake response 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:907 Done with handshake 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=204 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for connect 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x1 stream_id=0x0] len=4 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x5 stream_id=0x0] len=4 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x6 stream_id=0x0] len=5 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x4 stream_id=0x0] len=6 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=201 2016-09-13 23:37:40.711748 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=61 2016-09-13 23:37:40.711748 [NOTICE] rtmp_sig.c:122 Sent connect reply 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:1081 [chunk_stream=2 type=0x5 ts=0 stream_id=0x0] len=4 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:1184 Set window size: from 2097152 to 2097152 bytes 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:1081 [chunk_stream=2 type=0x4 ts=0 stream_id=0x0] len=10 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:91 Control (3): 00 00 00 00 00 00 01 2c 2016-09-13 23:37:40.851748 [INFO] rtmp.c:118 stream=0 Client buffer set to 300ms 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=25 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for createStream 2016-09-13 23:37:40.851748 [DEBUG] rtmp.c:656 [amfnumber=3 type=0x14 stream_id=0x0] len=29 2016-09-13 23:37:40.851748 [INFO] rtmp_sig.c:137 Replied to createStream (0) 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:1081 [chunk_stream=8 type=0x14 ts=0 stream_id=0x1] len=82 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:192 [amfnumber=8] Got INVOKE for play 2016-09-13 23:37:40.991748 [DEBUG] rtmp_sig.c:198 Got play for plenary-test-pattern-alpha@plenary-conference-profile on stream 1 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x1 stream_id=0x0] len=4 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x4 stream_id=0x0] len=6 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=2 type=0x4 stream_id=0x0] len=10 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=5 type=0x14 stream_id=0x1] len=135 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=5 type=0x14 stream_id=0x1] len=135 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=5 type=0x12 stream_id=0x1] len=44 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:656 [amfnumber=5 type=0x12 stream_id=0x1] len=24 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:1081 [chunk_stream=2 type=0x4 ts=0 stream_id=0x0] len=10 2016-09-13 23:37:40.991748 [DEBUG] rtmp.c:91 Control (3): 00 00 00 01 02 25 51 00 2016-09-13 23:37:40.991748 [INFO] rtmp.c:118 stream=1 Client buffer set to 36000000ms 2016-09-13 23:37:43.951733 [DEBUG] rtmp.c:1081 [chunk_stream=3 type=0x14 ts=0 stream_id=0x0] len=34 2016-09-13 23:37:43.951733 [DEBUG] rtmp.c:192 [amfnumber=3] Got INVOKE for deleteStream 2016-09-13 23:37:43.951733 [NOTICE] rtmp.c:918 Disconnected from flash client 2016-09-13 23:37:43.951733 [DEBUG] rtmp_tcp.c:243 Closing socket 2016-09-13 23:37:44.691705 [NOTICE] mod_rtmp.c:1025 RTMP session ended [1513874f-9084-470c-a2de-7e5f92bb2296]
______________________________________________________________________ ___ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <javascript:_e(%7B%7D,'cvml','consulting@freeswitch.org');> http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <javascript:_e(%7B%7D,'cvml','FreeSWITCH-users@lists.freeswitch.org');> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-use rs http://www.freeswitch.org
______________________________________________________________________ ___ Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org <javascript:_e(%7B%7D,'cvml','consulting@freeswitch.org');> http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <javascript:_e(%7B%7D,'cvml','FreeSWITCH-users@lists.freeswitch.org');> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-use rs http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <javascript:_e(%7B%7D,'cvml','consulting@freeswitch.org');> http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <javascript:_e(%7B%7D,'cvml','FreeSWITCH-users@lists.freeswitch.org');> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <javascript:_e(%7B%7D,'cvml','consulting@freeswitch.org');> http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <javascript:_e(%7B%7D,'cvml','FreeSWITCH-users@lists.freeswitch.org');> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬
☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞ http://twitter.com/FreeSWITCH ☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+ <http://freeswitch.org/g+>* ClueCon Weekly Development Call ☎ sip:888@conference.freeswitch.org <javascript:_e(%7B%7D,'cvml','sip:888@conference.freeswitch.org');> ☎ +19193869900
https://www.youtube.com/watch?v=9XXgW34t40s https://www.youtube.com/watch?v=NLaDpGQuZDA *_________________________________________________________________________* Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <javascript:_e(%7B%7D,'cvml','consulting@freeswitch.org');> http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <javascript:_e(%7B%7D,'cvml','FreeSWITCH-users@lists.freeswitch.org');> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
On Wed, Sep 14, 2016 at 7:20 PM, Charlie DeTar <cfd-fs@fohn.org> wrote:
Thanks for clarifying that. I configured nginx-rtmp-module, and was able to successfully got an rtmp stream sent from the conference to sent to it and transcoded to HLS / MPEG-DASH. However, freeswitch still crashes a short time after invoking `conference <name> record ...` (I've seen between 10 seconds and 2 minutes after).
My next attempt will be to compile freeswitch from source rather than using freeswitch's debian packages, to see if a more recent commit can survive recording to rtmp without crashing.
Thanks for the offer Anthony, I am working with an MIT lab on a research project. I'll follow up separately.
-charlie
Cool, I look forward to it. I am interested in mpeg-dash I'd like to see how you configured it.
-- Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬
☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞ http://twitter.com/FreeSWITCH ☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+ <http://freeswitch.org/g+>* ClueCon Weekly Development Call ☎ sip:888@conference.freeswitch.org ☎ +19193869900
https://www.youtube.com/watch?v=9XXgW34t40s https://www.youtube.com/watch?v=NLaDpGQuZDA *_________________________________________________________________________* Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬ ☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞ http://twitter.com/FreeSWITCH ☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+ <http://freeswitch.org/g+>* ClueCon Weekly Development Call ☎ sip:888@conference.freeswitch.org ☎ +19193869900 https://www.youtube.com/watch?v=9XXgW34t40s https://www.youtube.com/watch?v=NLaDpGQuZDA
participants (4)
-
Anthony Minessale
-
Charlie DeTar
-
Michael Jerris
-
Stephen Dame