RTSPtoWebRTC icon indicating copy to clipboard operation
RTSPtoWebRTC copied to clipboard

Not an issue, but a question: lower the resolution from 1920x1080 to 1280x720

Open bellacbs opened this issue 2 years ago • 5 comments

I'm in a situation that I need two resolutions with the same stream, would it be possible on the server to make this change?

If possible, would you have any suggestions?

bellacbs avatar Aug 25 '22 17:08 bellacbs

This is not possible because h264 packages from rtsp stream are directly feeded to web rtc Client. If you want to change the resolution you need to decode the stream with ffmpeg for example and reencode h264 AV packets. its better to get a second lower stream or so in case of an ip camera. You can look into rtsptoimage repo there u have an example of decoding

Cacsjep avatar Aug 26 '22 17:08 Cacsjep

ip camera have main or sub steam,or html set 1280x720 to

hengzheoduyou avatar Aug 28 '22 11:08 hengzheoduyou

Isso não é possível porque os pacotes h264 do fluxo rtsp são alimentados diretamente no cliente web rtc. Se você quiser alterar a resolução, você precisa decodificar o fluxo com ffmpeg, por exemplo, e recodificar pacotes AV h264. é melhor obter um segundo fluxo mais baixo no caso de uma câmera ip. Você pode olhar no repositório rtsptoimage lá você tem um exemplo de decodificação

Thanks, I'll try to do this

bellacbs avatar Sep 02 '22 12:09 bellacbs

câmera ip tem vapor principal ou secundário, ou html definido 1280x720 para

Hi, Thanks, I can't use the secondary because I can only consume the camera once But about your html idea, I didn't find much, do you know of an example for me to understand what you mean?

bellacbs avatar Sep 02 '22 12:09 bellacbs

câmera ip tem vapor principal ou secundário, ou html definido 1280x720 para

Hi, Thanks, I can't use the secondary because I can only consume the camera once But about your html idea, I didn't find much, do you know of an example for me to understand what you mean?

Then you use ffmpeg to convert video to pictures, then reduce the resolution to 720p, and then encode it into H264。

hengzheoduyou avatar Sep 05 '22 02:09 hengzheoduyou