mpromonet / webrtc-streamer

WebRTC streamer for V4L2 capture devices, RTSP sources and Screen Capture
https://webrtcstreamer.agreeabletree-365b9a90.canadacentral.azurecontainerapps.io/?layout=2x2
The Unlicense
2.8k stars 581 forks source link

It is invalid。callurl += "&options=" + encodeURIComponent({"width":"320","height":"240"}); #628

Closed swj369451 closed 5 months ago

swj369451 commented 8 months ago

It is invalid。callurl += "&options=" + encodeURIComponent({"width":"320","height":"240"}); I received the stream is frameWidth | 704 frameHeight | 576

mpromonet commented 8 months ago

Hi @swj369451

What is invalid ? It may depends on the source. If you describe your problem you may get better informations.

Best Regards, Michel.

swj369451 commented 8 months ago

I want to modify the quality of the output video to reduce the bandwidth. I see the option parameter.But I don't know what specific parameters can be configured to reduce the image quality. thank you for answering my question.

mpromonet commented 8 months ago

Hi,

I guess you should use something like "&options=" + encodeURIComponent("width=320&height=240")

Best Regards, Michel.

swj369451 commented 8 months ago

Hi, I configured option, but it didn't work, the resolution didn't change

callurl is http://xxx.xxx.xxx.xxx:7502/api/call?peerid=0.03189659933396083&url=rtsp%3A%2F%2Fadmin%3Aa1234567%40192.168.2.3%3A554%2Fh264%2Fch33%2Fsub%2Fav_stream&options=width%3D320%26height%3D240.

thank you for answering my question.

mpromonet commented 8 months ago

Hi,

If you are using '-o' to forward encoded packet, the resolution cannot be changed.

Best Regards, Michel.

swj369451 commented 8 months ago

I didn't use "-o"

webrtc-streamer.exe -H 127.0.0.1:9001 -C config.json -Sxxx.xxx.xxx.xxx:3478 -Ttest:123@xxx.xxx.xxx.xxx:3478

thank you for answering my question.

mpromonet commented 8 months ago

Hi,

I guess you have already open the backend stream, and then the resolution is decided by the first stream. You could check with admin.html page. I pushed https://github.com/mpromonet/webrtc-streamer/commit/670560e63c79a8151e8d4dba1944e33918901860 to separate rtsp stream when backend resolution is set.

To reduce bandwith you could try "bitrate" option.

Best Regards, Michel.