phoboslab / jsmpeg

MPEG1 Video Decoder in JavaScript
MIT License
6.35k stars 1.43k forks source link

High CPU usaged by Streaming on Web App #283

Closed ahmethakanbillur closed 5 years ago

ahmethakanbillur commented 5 years ago

Hi all,

I try to live stream on web app from ip camera and i used jsmpeg, node-onvif and html5 for improving my app.Everything is ok but my app use cpu too much on ubuntu that only one stream working %120-130 and its command ffmpeg -rtsp_transport tcp -i rtsp://10.6.0.225 -f mpeg1video on htop monitor. I want to try reduce cpu.Can you give me advice about it.

Thanks

phoboslab commented 5 years ago

Realtime encoding of large video streams is always costly, even with MPEG1. Try a lower resolution: ffmpeg -rtsp_transport tcp -i rtsp://10.6.0.225 -s 640x480 -f mpeg1video

Also, this seems to be more related to ffmpeg, not JSMpeg!? Please use the ffmpeg forums to ask for advice.

ahmethakanbillur commented 5 years ago

How i set this command (ffmpeg -rtsp_transport tcp -i rtsp://10.6.0.225 -s 640x480 -f mpeg1video) in which class.I need your help.