Question

How to send buffer to rtmp using ffmpeg.

As we have reactjs at client end and nodejs at server end. We are capturing webcam video/audio using mediarecorder api and sending it to the server using socket. Now at the server side getting this buffer data. We are trying to pass this buffer to ffmpeg and to stream to a rtmp url. We are stuck on converting/reading that buffer from ffmpeg.


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there,

Would you mind sharing a bit more information about your exact setup that you have?

For example, how are you currently sending the buffer from the client to the server? Are you using WebSockets or something else?

Are there any specific errors or issues you’re encountering when trying to stream the data using ffmpeg?

Can you share more details about your ffmpeg command or configuration?

If you have a code snippet that I could take a look and test out on my end that would also be helpful.

- Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.