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

change resolution on fly #840

Merged
merged 1 commit into from
Nov 29, 2021
Merged

Conversation

thegobot
Copy link
Contributor

It is also necessary to send the SPS\PPS along with the keyframe, in addition to the AVCSequenceHeader

Now all players do not freeze and change resolution anywhere in the stream!
Tested: PotPlayer, MPC (hard accel\soft), Chrome, Forefox, FFplay (also with h264_qsv decoder)

See
#832

It is also necessary to send the SPS\PPS along with the keyframe, in addition to the AVCSequenceHeader

Now all players do not freeze and change resolution anywhere in the stream!
Tested: PotPlayer, MPC (hard accel\soft), Chrome, Forefox, FFplay (also with h264_qsv decoder)

See
begeekmyfriend#832
@begeekmyfriend begeekmyfriend merged commit 8285391 into begeekmyfriend:master Nov 29, 2021
@begeekmyfriend
Copy link
Owner

You have solved the issue you shot on your own. Trust you!

@thegobot
Copy link
Contributor Author

thegobot commented Nov 30, 2021

How correct is it also to send an AVCSequenceHeader before a NAL (SPS\PPS\IDR) in the middle of a stream? There are no errors, moreover, the SRS server updates it and at the beginning of the stream (new client) sends the current AVCSequenceHeader to the client. This helps to quickly start the stream and not send SPS\PPS together with IDR every time.

My other implementation of encoder (webrtc -> rtmp -> SRS -> HttpFLV ) sends with IDR every time SPS\PPS. but does not send AVCSequenceHeader in the middle stream. Therefore, the client has to wait for the IDR from the SPS. Yes, you can cache GOP on the server side,, but it also slows down playback at the beginning.

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

Successfully merging this pull request may close these issues.

2 participants