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

Unable to render external RTSP stream #597

Open
jaimish11 opened this issue Feb 25, 2021 · 2 comments
Open

Unable to render external RTSP stream #597

jaimish11 opened this issue Feb 25, 2021 · 2 comments
Labels
question Discussion about functionality stale streams Related to streams (media-stream-library-js package)

Comments

@jaimish11
Copy link

What I'm trying to do:
I'm trying to receive RTSP frames from an external RTSP link and then render those frames in my application. I'm working on an Electron app with React and Node. Basically, I want to render an external RTSP feed in my Electron app which runs on React.

In your node example, you use this line const pipeline = new pipelines.CliMp4Pipeline(config); to initiate an RTSP connection. When I pipe these to VLC it is able to render the stream but if I try and parse the data in my own application, I'm unable to render the stream. I do receive raw data frames but they don't seem to be the actual data.

Do I need to use const pipeline = new pipelines.RtspPipeline(config); instead?
If yes then how can I go about using this?

If not, then could anyone help me by telling me why I can't render the stream on my own application. Here's how I'm doing this:

  1. Converting the stream to a base64 string from the buffer
    const imageURL = 'data:image/jpeg;base64,' + Buffer.from(frameInfo.image).toString('base64');
  2. Simply using the above string in my tag:
    <img src={imageURL} />

Been at this for days. Any help would be appreciated.

@jaimish11 jaimish11 added the question Discussion about functionality label Feb 25, 2021
@jaimish11 jaimish11 changed the title How do I use the RtspPipeline pipeline? Unable to render external RTSP stream Feb 25, 2021
@steabert
Copy link
Member

I'm not sure I understand what you are trying to do?

The CliMp4Pipeline will produce MP4 data, which you'll have to feed to a video element using MSE. However, there is already a pipeline that does this which is Html5VideoPipeline. Did you try to follow one of the examples?

@lekoaf lekoaf added the streams Related to streams (media-stream-library-js package) label Jan 25, 2023
@github-actions
Copy link

This issue is stale because it has been open for 90 days with no activity.

@github-actions github-actions bot added the stale label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Discussion about functionality stale streams Related to streams (media-stream-library-js package)
Projects
None yet
Development

No branches or pull requests

3 participants