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

Can I set the interval time for i-frames during encoding? #658

Closed
zhuya1996 opened this issue Jan 11, 2024 · 7 comments
Closed

Can I set the interval time for i-frames during encoding? #658

zhuya1996 opened this issue Jan 11, 2024 · 7 comments

Comments

@zhuya1996
Copy link

Can I set the interval time for i-frames during encoding?My desktop resolution may cause lag when others view it

@mpromonet
Copy link
Owner

mpromonet commented Jan 11, 2024

Hi,

You could try to set cricket::VideoCodec::H264()->keyFrameInterval given to webrtc::VideoEncoder::InitEncode

Best Regards,
Michel.

@mpromonet mpromonet changed the title Can I set the interval time for i-frames during encoding? thansk Can I set the interval time for i-frames during encoding? Jan 11, 2024
@zhuya1996
Copy link
Author

zhuya1996 commented Jan 12, 2024

May I ask how to set up H264 decoding? I think the default VP8 is currently used, right?

@mpromonet
Copy link
Owner

Hi,

codec is negociate between codec supported by client and supported by server. It could be VP8 or H264 or VP9. You could use setCodecPreferences to set preferences.

Best Regards,
Michel.

@zhuya1996
Copy link
Author

zhuya1996 commented Jan 15, 2024

In which code is setCodecPreferences set? Can you provide more details? Also, I found that when sharing the screen or reading rtsp, if it is local opencv playback, there will be no lag. If it is web playback, it will lag. Do you know why this is?

@zhuya1996
Copy link
Author

zhuya1996 commented Jan 17, 2024

virtual bool onData(const char *id, unsigned char *buffer, ssize_t size, struct timeval presentationTime)

Is the buffer here live555 data or encoded data???

@mpromonet
Copy link
Owner

Hi,

This callback receive encoded data.

Best Regards,
Michel.

@zhuya1996
Copy link
Author

zhuya1996 commented Jan 20, 2024

Hello, why do I lose frames when I play RTSP during the day but play smoothly at night? How can I make RTSP playback smooth during the day?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants