Giter VIP home page Giter VIP logo

Comments (2)

ethand91 avatar ethand91 commented on August 11, 2024 2

Create an sdp.txt file with the following contents.

v=0
o=- 0 0 IN IP4 [mediasoup server ip]
s=FFmpeg
c=IN IP4 [mediasoup server ip]
t=0 0
m=video [mediasoup consumer rtp port] RTP/AVP [video codec payloadType]
a=rtpmap :[video codec payloadType] VP8/90000
a=sendonly
m=audio [mediasoup consumer rtp port] RTP/AVP [audio codec payloadType]
a=rtpmnap:[audio codec payloadType] opus/48000/2
a=sendonly 

then create the script

#!/bin/bash

ffmpeg -protocol_whitelist file,udp,rtp -fflags +genpts -f sdp -i sdp.txt -map 0:v:0 -c:v copy -map 0:a:0 -strict 2 -c:a copy -flags +global_header file.webm

from mediasoup3-record-demo.

yarekc avatar yarekc commented on August 11, 2024

Thanks you !

  1. I have 2 question: can you a real sample of the sdp.txt (because you never know if you have to use double quote, simple quote, escape strings on parameters such as: [video codec payloadType]

  2. How to get the [mediasoup consumer rtp port] from JS ? - since the goal is to control the recording with JS with buttons like "startRecord" and "stopRecord"

Regards

from mediasoup3-record-demo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.