Skip to content

Help with stop steam #3

@russellevans

Description

@russellevans

I am trying to get stop stream to work but I cannot figure it out...

Could someone tell me what is wrong with my code?

Stream = require('node-ffmpeg-stream').Stream;
stream = new Stream({
  name: 'name',//name that can be used in future  
  url: 'rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4',  //Stream URL
  wsPort: 7070,  //Streaming will be transferred via this port
  options: { // ffmpeg options 
    '-stats': '', // print progress report during encoding, can be no value ''
    '-r': 30 // frame rate (Hz value, fraction or abbreviation) - By default it set to 30 if no value specified
  }
})

app.get('/stop-stream',(req,res) =>{
  console.log("Stop stream")
  stream.stop();	

  return res.json({
    message:'Stopped'
  })
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions