Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recording stream #3

Open
Mladenovic92 opened this issue Jan 25, 2019 · 2 comments
Open

Recording stream #3

Mladenovic92 opened this issue Jan 25, 2019 · 2 comments

Comments

@Mladenovic92
Copy link

Hi, is there way to record broadcast?
I was trying with createRtpStreamer, i added it inside Server.js
room.on('newpeer', (peer) => { peer.on('newproducer', (producer) => { let rtpParams = { remoteIP: '127.0.0.1', remotePort: (producer.kind === 'audio') ? 10000 : 10002}; room.createRtpStreamer(producer, rtpParams).then((streamer) => { console.log('started mirroring RTP for', producer.kind); }); }); });
So when i publish broadcast i get in console:
::ffff:127.0.0.1 59300 new peer joined the room publisher
started mirroring RTP for audio
started mirroring RTP for video

I tried to access stream with vlc but i cant connect over rtmp://127.0.0.1:1935/stream.
When i try gstreamer
command:
gst-launch-1.0 -em rtpbin name=rtpbin latency=5 udpsrc port=10000 caps="application/x-rtp,media=(string)audio,clock-rate=(int)48000,encoding-name=(string)OPUS" ! rtpbin.recv_rtp_sink_0 rtpbin. ! queue ! rtpopusdepay ! opusdec ! audioconvert ! audioresample ! voaacenc ! mux. udpsrc port=10002 caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264" ! rtpbin.recv_rtp_sink_1 rtpbin. ! queue ! rtph264depay ! h264parse ! mux. flvmux name=mux streamable=true ! rtmpsink sync=false location=rtmp://127.0.0.1:1935/stream
then when i publish broadcast i get in terminal:
Got message #185 from element "rtpsession0" (element): application/x-rtp-source-sdes, cname=(string)"\{f02b34db-da4f-456b-a964-0eb4d3e9f383\}";
Do you have any idea why i cant access stream?
Im still learning webrtc/mediasoup

@michaelfig
Copy link
Owner

Hi,

Sorry, but I don't have any experience with mirroring. All I can suggest is that you search for information in the mediasoup Google Group, and if you don't find anything, try posting there.

I'll leave this ticket open, so if you solve it yourself, please post what you needed to do. Ideally, I would make it a configuration option (controlled by an environment variable) for the broadcast server, so I look forward to what you find out.

Good luck,
Michael.

@ravensnowbird
Copy link

Recording would be great with just a boolean field: record: true/false on each channel. If true - store video in a specific folder of the server provided in the configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants