Commit Graph

160 Commits

Author SHA1 Message Date
Alexandre Iooss 7d8c16fbb7
Pass webrtc sdp chan in newPeerHandler 2020-10-14 18:34:14 +02:00
Yohann D'ANELLO f21ad568cc Don't always reallocate memory to store ascii chars 2020-10-14 17:10:31 +02:00
Alexandre Iooss 36a890a914
Grow buffer each time 2020-10-14 16:46:39 +02:00
Alexandre Iooss 67ef07cac5
Preallocate text buffer for telnet 2020-10-14 16:44:13 +02:00
Alexandre Iooss 868ee12726
Telnet: Preallocate pixel variable 2020-10-14 16:10:04 +02:00
Alexandre Iooss 1e4a596131
Add test file for telnet package 2020-10-13 18:55:12 +02:00
Alexandre Iooss 4182668fcb
Reorder some imports in webrtc package 2020-10-13 18:55:02 +02:00
Yohann D'ANELLO 029633d215 Don't fail tests if the telnet module is not loaded 2020-10-13 18:40:12 +02:00
Yohann D'ANELLO 51d38f6fec Store the clients that are connected to a telnet shell in the connected viewers stats 2020-10-13 11:37:59 +02:00
Yohann D'ANELLO 88c4a037cb Add 3 seconds delay before accepting telnet inputs to avoid bruteforce attacks 2020-10-13 11:28:29 +02:00
Yohann D'ANELLO 6d9fe4a028 Use string pointers for the telnet output to avoid concurrency map read/write 2020-10-13 11:17:35 +02:00
Yohann D'ANELLO 770862cb7d Don't use -re ffmpeg option: the video speed is already cadenced by the streamer. Fix #16 2020-10-13 10:46:04 +02:00
Yohann D'ANELLO 3ce82c5d61 Allocate memory for UDP buffers only once 2020-10-13 10:10:25 +02:00
Yohann D'ANELLO 32f877508d Separate the WebRTC stream subroutine in a dedicated subroutine 2020-10-13 09:50:46 +02:00
Yohann D'ANELLO defba52569 If there is no forwarding, drop forwarding channels 2020-10-13 09:38:44 +02:00
Yohann D'ANELLO 7325301574 Comment in the right order 2020-10-13 01:41:17 +02:00
Yohann D'ANELLO 4db102c384 Ascii is a known keyword, must be in capital letters 2020-10-13 00:56:49 +02:00
Yohann D'ANELLO 727865f444 Interact with telnet to select the stream id 2020-10-13 00:52:08 +02:00
Yohann D'ANELLO 95fcedf2fa Comment telnet package 2020-10-13 00:31:47 +02:00
Yohann D'ANELLO ee76951854 Don't export to ASCII art if the telnet packet is disabled 2020-10-13 00:30:05 +02:00
Yohann D'ANELLO 61ae490a5d Make telnet output configurable 2020-10-13 00:15:23 +02:00
Yohann D'ANELLO e640450d98 Start telnet connection to send ASCII Art stream 2020-10-12 23:39:26 +02:00
Yohann D'ANELLO b675023804 Prepare ascii art quality 2020-10-12 23:11:02 +02:00
Alexandre Iooss df88fd9e99
Create config package and properly use Viper 2020-10-11 21:35:43 +02:00
Yohann D'ANELLO 4d1dff60c7 -crf is better that -quality good 2020-10-10 17:05:36 +02:00
Yohann D'ANELLO 3dd544c1e4 The FFMPEG parameters make WebRTC working 2020-10-10 17:00:25 +02:00
Yohann D'ANELLO 503649a6da Use FFMPEG settings that are recommended by pion, better performances, see #3 2020-10-10 14:19:42 +02:00
Yohann D'ANELLO a8146e7cbb Setting blocking option to 0, fix #11 2020-10-10 13:50:37 +02:00
Alexandre Iooss d1d6eb17b6
Test splitHostPort error cases 2020-10-09 23:37:08 +02:00
Alexandre Iooss 87d2992bdf
Add package comments 2020-10-09 22:36:02 +02:00
Yohann D'ANELLO 473e80c5eb Kill FFMPEG at the end of the forwarding test 2020-10-09 22:31:19 +02:00
Alexandre Iooss 811cec5626
Enable SRT server for forwarding tests 2020-10-09 22:24:01 +02:00
Alexandre Iooss 7ae82656a4
Enable SRT server during testing 2020-10-09 22:17:25 +02:00
Alexandre Iooss 45c6b5dba5
Fix #7: make each module optional 2020-10-09 22:06:30 +02:00
Yohann D'ANELLO 07983a1c71 Try to add a quality selector (WIP), see #4 2020-10-06 00:06:52 +02:00
Yohann D'ANELLO 192c86f140 Count also the viewers that are streaming directly from their video player in the connected users stats 2020-10-05 22:41:19 +02:00
Yohann D'ANELLO 635081f269 Client receives the stream corresponding to the requested stream id 2020-10-05 22:34:55 +02:00
Yohann D'ANELLO 0a1329b929 Separate statistics per stream 2020-10-05 22:09:10 +02:00
Yohann D'ANELLO 022f6fb098 💩 Split webrtc tracks by stream id (need to clean this, stream ID must pass between the session descriptor and the webrtc flux transmit) 2020-10-05 22:00:08 +02:00
Alexandre Iooss 76f009efe3
Use logger rather than panic in ingest 2020-10-05 11:38:17 +02:00
Alexandre Iooss cbe6a00d1a
Reduce verbosity of streaming 2020-10-05 11:08:22 +02:00
Alexandre Iooss 2a3b79734a
Copy track SSRC and payload, working webrtc! 2020-10-05 10:26:08 +02:00
Alexandre Iooss e8f4cd7683
Move webrtc ingest in seperate file 2020-10-05 10:11:30 +02:00
Yohann D'ANELLO 3a9568e764 Copy Pion RTP -> WebRTC example, it does not work but does not crash 2020-10-05 00:45:22 +02:00
Alexandre Iooss 4e066d6c33
If ffmpeg returns an error, then test failed 2020-10-04 21:05:42 +02:00
Alexandre Iooss 708501c5c8
use time.Second to wait for 5s 2020-10-04 20:52:26 +02:00
Alexandre Iooss f3d38dc10d
ffmpeg outputs logs only to stderr 2020-10-04 20:47:05 +02:00
Alexandre Iooss 1576e391eb
Remove globals in forwarding package and make ffmpeg quieter 2020-10-04 20:42:16 +02:00
Alexandre Iooss 606542f622
Remove cfg and forwardingChannel globals in forwarding package 2020-10-04 20:16:29 +02:00
Alexandre Iooss ad934516a9
Send SRT stream to WebRTC package 2020-10-04 18:22:10 +02:00
Alexandre Iooss 86d436d33d
Limit SRT buffer to MTU 2020-10-04 14:27:16 +02:00
Alexandre Iooss dd6318256f
Move srt handlers in seperate file 2020-10-04 14:24:00 +02:00
Yohann D'ANELLO 610ddfab28 Handle client connection closure 2020-10-04 13:08:46 +02:00
Alexandre Iooss 2a24598aea
Use password to diff viewer from streamer 2020-10-04 12:40:56 +02:00
Alexandre Iooss db0937dd1a
Remove useless comments in SRT 2020-10-04 11:45:53 +02:00
Alexandre Iooss 3f5d317250
Do not use file mode for SRT 2020-10-04 11:25:55 +02:00
Alexandre Iooss 6172cf89be
Remove globals in SRT server 2020-10-03 17:50:34 +02:00
Alexandre Iooss 93ac5a7de1
Comment Server SRT 2020-10-03 17:42:38 +02:00
Yohann D'ANELLO 98a798429c Linting 2020-10-03 16:15:42 +02:00
Yohann D'ANELLO 8498829e08 Support stream listening 2020-10-02 23:35:01 +02:00
Yohann D'ANELLO 087d6eee3b Use : as more conventional separator for user:password 2020-10-02 22:39:38 +02:00
Yohann D'ANELLO 596beeeb89 Manage SRT sockets in a dedicated go routine 2020-10-02 22:12:13 +02:00
Yohann D'ANELLO 8eab4dfe22 ID is better than Id according to Golang 2020-10-02 10:33:16 +02:00
Yohann D'ANELLO 12bd0b71e3 Reorder imports 2020-10-02 09:46:15 +02:00
Yohann D'ANELLO 8c2a7f73d7 Don't hardcode SRT API value 2020-10-02 09:44:31 +02:00
Yohann D'ANELLO 0371d3dc7c Authenticate streams 2020-10-01 23:31:14 +02:00
Yohann D'ANELLO b5338e06bc Fix forwarding test, overwrite /dev/null 2020-10-01 20:53:26 +02:00
Yohann D'ANELLO 650040ef10 Forwarding test must serve then the forwarding package in a subroutine 2020-10-01 19:34:40 +02:00
Yohann D'ANELLO d7e104261f Unify the forwarding package start with the other, start it in a go routine 2020-10-01 19:26:12 +02:00
Yohann D'ANELLO 98d5c609a3 Comment Packet structure 2020-10-01 19:05:39 +02:00
Yohann D'ANELLO e74213fefa 🐛 Copy SRT data in another buffer before sending it in the forwarding package to avoid overwriting issues 2020-10-01 18:54:35 +02:00
Yohann D'ANELLO ee1f1e331b 💩 Change port of SRT server if the forwarding test. We should instead kill the server after the test. 2020-10-01 12:09:49 +02:00
Yohann D'ANELLO c0689ae063 💩 Change port of SRT server if the forwarding test. We should instead kill the server after the test. 2020-10-01 12:07:28 +02:00
Yohann D'ANELLO efa44488c0 Use channels to send SRT packets to forwarded streams 2020-10-01 12:00:59 +02:00
Yohann D'ANELLO dc7a3fef9f Test stream forwarding, but disable it while the project structure is not clean, ie. to avoid that forwarding is a dependency to srt 2020-10-01 11:20:34 +02:00
Yohann D'ANELLO e8b145550e Skip stream tests if ffmpeg is not installed 2020-09-30 19:28:30 +02:00
Yohann D'ANELLO ddd8be155e Try to test serving SRT server 2020-09-30 16:53:15 +02:00
Alexandre Iooss 8883c878bf
Better error handling in stream forwarder 2020-09-30 15:28:19 +02:00
Alexandre Iooss 2550d75c57
Refractor streamKey to name 2020-09-30 15:10:13 +02:00
Alexandre Iooss 8f7384ba35
Rename multicast to stream forwarding 2020-09-30 15:07:36 +02:00
Yohann D'ANELLO b647c761f3 Test loading the configuration 2020-09-30 13:08:44 +02:00
Yohann D'ANELLO 4024ed5b2a Add a comment, fix linting 2020-09-30 08:50:54 +02:00
Yohann D'ANELLO 5efbe309ac Optimize FFMPEG parameters to reduce CPU charge 2020-09-30 00:36:58 +02:00
Yohann D'ANELLO 9049935ee4 Use only one instance of FFPMEG per SRT stream instead of one per additional cast 2020-09-29 23:43:54 +02:00
Yohann D'ANELLO 351870e92a Merge remote-tracking branch 'origin/golang' into multicast
# Conflicts:
#	stream/srt/srt.go
2020-09-29 22:43:37 +02:00
Yohann D'ANELLO 5fa492547b Use external configuration to setup multicasts 2020-09-29 22:40:49 +02:00
Yohann D'ANELLO 2920b6883c Separate multicast feature 2020-09-29 21:31:53 +02:00
Alexandre Iooss ad26242d4a
Simplify SRT handling 2020-09-29 20:58:55 +02:00
Yohann D'ANELLO 969d36fab4 Use FFMPEG to broadcast the stream on Twitch 2020-09-29 20:56:31 +02:00
Alexandre Iooss 5b5bf2b518
Test splitHostPort 2020-09-29 18:52:27 +02:00
Alexandre Iooss 078a74add1
Do not read prometheus metrics 2020-09-29 18:17:55 +02:00
Yohann D'ANELLO 2005f3ece1 Store connected viewers in Prometheus and serve this amount 2020-09-29 18:03:28 +02:00
Alexandre Iooss 95f4b81f01
Make STUN server configurable 2020-09-29 17:27:19 +02:00
Alexandre Iooss 1c98754624
Restructure projet and add webrtc settings 2020-09-29 17:04:23 +02:00
Alexandre Iooss 29eeb2c0fd
Load SRT host and port from configuration 2020-09-29 16:49:30 +02:00
Yohann D'ANELLO c67a4adf83 6 UDP ports are enough (but does not work) 2020-09-29 14:23:20 +02:00
Alexandre Iooss d46efaae3c
Limit WebRTC UDP ports 2020-09-29 14:11:56 +02:00
Yohann D'ANELLO da5ba44e6b 🌱 Create empty test files to have a realistic coverage 2020-09-28 21:18:49 +02:00
Alexandre Iooss 92f44c981d
More code for SRT handling 2020-09-28 16:32:35 +02:00
Alexandre Iooss 6c7ac2d3b3
Fix sck to srtgo 2020-09-27 22:32:49 +02:00