Bepartofyou / janus-gateway-live

RTMP edge speed with janus-gateway
MIT License
47 stars 26 forks source link

[live.c:janus_live_fdkaac_encoder_create:1429] #4

Open oiganeu opened 3 years ago

oiganeu commented 3 years ago

Hi, I try to install and configure a solution like your application but after I finaly compile and install everything (janus-gateway with your patch and nginx with rtmp module) on localhost. janus echo test works fine but when i try to record ... janus dies and : Can you help please?

[Mon Dec 7 08:02:46 2020] Forwarding request to the core (0x7f7ff00012f0) [Mon Dec 7 08:02:46 2020] Got a Janus API request from janus.transport.http (0x7f7ff00012f0) [Mon Dec 7 08:02:46 2020] Transport task pool, serving request [Mon Dec 7 08:02:46 2020] [5335964983708495] There's a message for JANUS Record&Play plugin [Mon Dec 7 08:02:46 2020] [5335964983708495] Remote SDP: v=0 o=- 564339947682900313 2 IN IP4 127.0.0.1 s=- t=0 0 a=group:BUNDLE 0 1 a=msid-semantic: WMS P7nIwFGccVVDxoeiwYdMT1fVLvN0DFq0jMvd m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126 c=IN IP4 0.0.0.0 a=rtcp:9 IN IP4 0.0.0.0 a=ice-ufrag:1OX3 a=ice-pwd:H8A9gdKAvWJresccn9Gmzwhc a=ice-options:trickle a=fingerprint:sha-256 21:18:60:C8:98:56:D2:16:64:2C:4F:5A:E2:E1:78:FD:8D:D8:97:DF:EF:F9:C6:30:80:9D:2E:07:73:1F:16:C0 a=setup:actpass a=mid:0 a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01 a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id a=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id a=sendrecv a=msid:P7nIwFGccVVDxoeiwYdMT1fVLvN0DFq0jMvd e68bdf80-89cc-4658-9497-801a974470d7 a=rtcp-mux a=rtpmap:111 opus/48000/2 a=rtcp-fb:111 transport-cc a=fmtp:111 minptime=10;useinbandfec=1 a=rtpmap:103 ISAC/16000 a=rtpmap:104 ISAC/32000 a=rtpmap:9 G722/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:106 CN/32000 a=rtpmap:105 CN/16000 a=rtpmap:13 CN/8000 a=rtpmap:110 telephone-event/48000 a=rtpmap:112 telephone-event/32000 a=rtpmap:113 telephone-event/16000 a=rtpmap:126 telephone-event/8000 a=ssrc:2719604765 cname:a01bvnjFCNKk4ve8 a=ssrc:2719604765 msid:P7nIwFGccVVDxoeiwYdMT1fVLvN0DFq0jMvd e68bdf80-89cc-4658-9497-801a974470d7 a=ssrc:2719604765 mslabel:P7nIwFGccVVDxoeiwYdMT1fVLvN0DFq0jMvd a=ssrc:2719604765 label:e68bdf80-89cc-4658-9497-801a974470d7 m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 102 121 127 120 125 107 108 109 124 119 123 c=IN IP4 0.0.0.0 a=rtcp:9 IN IP4 0.0.0.0 a=ice-ufrag:1OX3 a=ice-pwd:H8A9gdKAvWJresccn9Gmzwhc a=ice-options:trickle a=fingerprint:sha-256 21:18:60:C8:98:56:D2:16:64:2C:4F:5A:E2:E1:78:FD:8D:D8:97:DF:EF:F9:C6:30:80:9D:2E:07:73:1F:16:C0 a=setup:actpass a=mid:1 a=extmap:14 urn:ietf:params:rtp-hdrext:toffset a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time a=extmap:13 urn:3gpp:video-orientation a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01 a=extmap:12 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay a=extmap:11 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id a=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id a=sendrecv a=msid:P7nIwFGccVVDxoeiwYdMT1fVLvN0DFq0jMvd b3b9d771-3d2d-4fa3-8a5b-c1e4afd0e2e0 a=rtcp-mux a=rtcp-rsize a=rtpmap:96 VP8/90000 a=rtcp-fb:96 goog-remb a=rtcp-fb:96 transport-cc a=rtcp-fb:96 ccm fir a=rtcp-fb:96 nack a=rtcp-fb:96 nack pli a=rtpmap:97 rtx/90000 a=fmtp:97 apt=96 a=rtpmap:98 VP9/90000 a=rtcp-fb:98 goog-remb a=rtcp-fb:98 transport-cc a=rtcp-fb:98 ccm fir a=rtcp-fb:98 nack a=rtcp-fb:98 nack pli a=fmtp:98 profile-id=0 a=rtpmap:99 rtx/90000 a=fmtp:99 apt=98 a=rtpmap:100 VP9/90000 a=rtcp-fb:100 goog-remb a=rtcp-fb:100 transport-cc a=rtcp-fb:100 ccm fir a=rtcp-fb:100 nack a=rtcp-fb:100 nack pli a=fmtp:100 profile-id=2 a=rtpmap:101 rtx/90000 a=fmtp:101 apt=100 a=rtpmap:102 H264/90000 a=rtcp-fb:102 goog-remb a=rtcp-fb:102 transport-cc a=rtcp-fb:102 ccm fir a=rtcp-fb:102 nack a=rtcp-fb:102 nack pli a=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f a=rtpmap:121 rtx/90000 a=fmtp:121 apt=102 a=rtpmap:127 H264/90000 a=rtcp-fb:127 goog-remb a=rtcp-fb:127 transport-cc a=rtcp-fb:127 ccm fir a=rtcp-fb:127 nack a=rtcp-fb:127 nack pli a=fmtp:127 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f a=rtpmap:120 rtx/90000 a=fmtp:120 apt=127 a=rtpmap:125 H264/90000 a=rtcp-fb:125 goog-remb a=rtcp-fb:125 transport-cc a=rtcp-fb:125 ccm fir a=rtcp-fb:125 nack a=rtcp-fb:125 nack pli a=fmtp:125 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f a=rtpmap:107 rtx/90000 a=fmtp:107 apt=125 a=rtpmap:108 H264/90000 a=rtcp-fb:108 goog-remb a=rtcp-fb:108 transport-cc a=rtcp-fb:108 ccm fir a=rtcp-fb:108 nack a=rtcp-fb:108 nack pli a=fmtp:108 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f a=rtpmap:109 rtx/90000 a=fmtp:109 apt=108 a=rtpmap:124 red/90000 a=rtpmap:119 rtx/90000 a=fmtp:119 apt=124 a=rtpmap:123 ulpfec/90000 a=ssrc-group:FID 3469227685 4253301169 a=ssrc:3469227685 cname:a01bvnjFCNKk4ve8 a=ssrc:3469227685 msid:P7nIwFGccVVDxoeiwYdMT1fVLvN0DFq0jMvd b3b9d771-3d2d-4fa3-8a5b-c1e4afd0e2e0 a=ssrc:3469227685 mslabel:P7nIwFGccVVDxoeiwYdMT1fVLvN0DFq0jMvd a=ssrc:3469227685 label:b3b9d771-3d2d-4fa3-8a5b-c1e4afd0e2e0 a=ssrc:4253301169 cname:a01bvnjFCNKk4ve8 a=ssrc:4253301169 msid:P7nIwFGccVVDxoeiwYdMT1fVLvN0DFq0jMvd b3b9d771-3d2d-4fa3-8a5b-c1e4afd0e2e0 a=ssrc:4253301169 mslabel:P7nIwFGccVVDxoeiwYdMT1fVLvN0DFq0jMvd a=ssrc:4253301169 label:b3b9d771-3d2d-4fa3-8a5b-c1e4afd0e2e0 [Mon Dec 7 08:02:46 2020] [5335964983708495] Audio mid: 0 [Mon Dec 7 08:02:46 2020] [5335964983708495] Video mid: 1 [Mon Dec 7 08:02:46 2020] [5335964983708495] Audio has been negotiated, Video has been negotiated, SCTP/DataChannels have NOT been negotiated [Mon Dec 7 08:02:46 2020] [5335964983708495] Setting ICE locally: got OFFER (1 audios, 1 videos) [Mon Dec 7 08:02:46 2020] [5335964983708495] Creating ICE agent (ICE Full mode, controlled) [Mon Dec 7 08:02:46 2020] [5335964983708495] Adding 192.168.50.168 to the addresses to gather candidates for [Mon Dec 7 08:02:46 2020] [5335964983708495] Gathering done for stream 1 [Mon Dec 7 08:02:46 2020] [5335964983708495] Parsing audio candidates (stream=1)... [Mon Dec 7 08:02:46 2020] [5335964983708495] ICE ufrag (local): 1OX3 [Mon Dec 7 08:02:46 2020] [5335964983708495] ICE pwd (local): H8A9gdKAvWJresccn9Gmzwhc [Mon Dec 7 08:02:46 2020] [5335964983708495] Fingerprint (local) : sha-256 21:18:60:C8:98:56:D2:16:64:2C:4F:5A:E2:E1:78:FD:8D:D8:97:DF:EF:F9:C6:30:80:9D:2E:07:73:1F:16:C0 [Mon Dec 7 08:02:46 2020] [5335964983708495] DTLS setup (local): actpass [Mon Dec 7 08:02:46 2020] [5335964983708495] Setting connect state (DTLS client) [Mon Dec 7 08:02:46 2020] [5335964983708495] Audio mid: 0 [Mon Dec 7 08:02:46 2020] [5335964983708495] Peer audio SSRC: 2719604765 [Mon Dec 7 08:02:46 2020] [5335964983708495] Parsing video candidates (stream=1)... [Mon Dec 7 08:02:46 2020] [5335964983708495] ICE ufrag (local): 1OX3 [Mon Dec 7 08:02:46 2020] [5335964983708495] ICE pwd (local): H8A9gdKAvWJresccn9Gmzwhc [Mon Dec 7 08:02:46 2020] [5335964983708495] Fingerprint (local) : sha-256 21:18:60:C8:98:56:D2:16:64:2C:4F:5A:E2:E1:78:FD:8D:D8:97:DF:EF:F9:C6:30:80:9D:2E:07:73:1F:16:C0 [Mon Dec 7 08:02:46 2020] [5335964983708495] DTLS setup (local): actpass [Mon Dec 7 08:02:46 2020] [5335964983708495] Setting connect state (DTLS client) [Mon Dec 7 08:02:46 2020] [5335964983708495] Video mid: 1 [Mon Dec 7 08:02:46 2020] [5335964983708495] Peer video SSRC: 3469227685 [Mon Dec 7 08:02:46 2020] [5335964983708495] Peer video SSRC (rtx): 4253301169 [Mon Dec 7 08:02:46 2020] Will remove payload type 97 (97 rtx/90000) [Mon Dec 7 08:02:46 2020] Will remove payload type 99 (99 rtx/90000) [Mon Dec 7 08:02:46 2020] Will remove payload type 101 (101 rtx/90000) [Mon Dec 7 08:02:46 2020] Will remove payload type 121 (121 rtx/90000) [Mon Dec 7 08:02:46 2020] Will remove payload type 120 (120 rtx/90000) [Mon Dec 7 08:02:46 2020] Will remove payload type 107 (107 rtx/90000) [Mon Dec 7 08:02:46 2020] Will remove payload type 109 (109 rtx/90000) [Mon Dec 7 08:02:46 2020] Will remove payload type 124 (124 red/90000) [Mon Dec 7 08:02:46 2020] Will remove payload type 119 (119 rtx/90000) [Mon Dec 7 08:02:46 2020] Will remove payload type 123 (123 ulpfec/90000) [Mon Dec 7 08:02:46 2020] ------------------------------------------- [Mon Dec 7 08:02:46 2020] >> Anonymized [Mon Dec 7 08:02:46 2020] ------------------------------------------- [Mon Dec 7 08:02:46 2020] Creating plugin result... [Mon Dec 7 08:02:46 2020] Sending Janus API response to janus.transport.http (0x7f7ff00012f0) [Mon Dec 7 08:02:46 2020] Got a Janus API response to send (0x7f7ff00012f0) [Mon Dec 7 08:02:46 2020] Destroying plugin result... [Mon Dec 7 08:02:46 2020] Starting new recording with ID 4617670241733116 [Mon Dec 7 08:02:46 2020] Audio codec: opus [Mon Dec 7 08:02:46 2020] Video codec: h264 [Mon Dec 7 08:02:46 2020] Directory exists: /usr/local/share/janus/recordings [Mon Dec 7 08:02:46 2020] Directory exists: /usr/local/share/janus/recordings [Mon Dec 7 08:02:46 2020] rtmp url:rtmp://localhost:1935/qixi/4617670241733116 [Mon Dec 7 08:02:46 2020] [ERR] [live.c:janus_live_fdkaac_encoder_create:1429] init audio encoder avcodec_find_encoder_by_name aac error

oiganeu commented 3 years ago

partial solved, custom compile ffmpeg with --enable-libfdk_aac --enable-nonfree please give me your ffmpeg configuration but now I have: [ERR] [live.c:janus_live_ffmpeg_init:849] Encoder error [Opus] decoding Opus frame len: 1920 [Mon Dec 7 10:08:18 2020] fdkaac encode len:4096, pts:1020 [Mon Dec 7 10:08:18 2020] audio pts dts:960, pts:960 src pts:1020 [Mon Dec 7 10:08:18 2020] janus_live_packet_insert, ts:960, len:337, size:55 [Mon Dec 7 10:08:18 2020] fdkaac cache buflen:3584, len:3840, pts:1020, left:3584 [Mon Dec 7 10:08:18 2020] janus_rtp_jb_handle, audio sequence:53, gap:1001, timeout:1008 [Mon Dec 7 10:08:18 2020] audio frame len: 68 [Mon Dec 7 10:08:18 2020] [Opus] decoding Opus frame len: 1920 [Mon Dec 7 10:08:18 2020] fdkaac encode len:4096, pts:1040 [Mon Dec 7 10:08:18 2020] audio pts dts:980, pts:980 src pts:1040 [Mon Dec 7 10:08:18 2020] janus_live_packet_insert, ts:980, len:334, size:56 [Mon Dec 7 10:08:18 2020] fdkaac cache buflen:3328, len:3840, pts:1040, left:3328 [Mon Dec 7 10:08:18 2020] janus_rtp_jb_handle, video sequence:61, gap:998, timeout:1002 [Mon Dec 7 10:08:18 2020] video frame len: 4331, nalu type:1, rtpts:72000, ts:800 [Mon Dec 7 10:08:18 2020] janus_live_packet_insert, ts:800, len:4395, size:57 [Mon Dec 7 10:08:18 2020] [ERR] [live.c:janus_live_ffmpeg_init:849] Encoder error [Mon Dec 7 10:08:18 2020] video Fragment=28, NAL=1, Start=128 End=0 (len=1032, frameLen=0) [Mon Dec 7 10:08:18 2020] janus_rtp_jb_handle, ajb:50, vjb:66 [Mon Dec 7 10:08:18 2020] Video RTP packet, ssrc:461803247, type:102, sequence:128, timestamp:1870, ext:1 [Mon Dec 7 10:08:18 2020] -- -- RTP extension (type=0xBEDE, length=1) [Mon Dec 7 10:08:18 2020] janus_live_pub_save_frame video ts: 168300 [Mon Dec 7 10:08:18 2020] Audio RTP packet, ssrc:3426899119, type:111, sequence:104, timestamp:2060, ext:1 [Mon Dec 7 10:08:18 2020] -- -- RTP extension (type=0xBEDE, length=1) [Mon Dec 7 10:08:18 2020] Video RTP packet, ssrc:461803247, type:102, sequence:129, timestamp:1870, ext:1 [Mon Dec 7 10:08:18 2020] -- -- RTP extension (type=0xBEDE, length=1)