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

Slow MP4 video's are being recorded when low network conditions with both RTMP streaming and recording .mp4 video at same time. #1653

Open
penmatsa opened this issue Nov 26, 2024 · 5 comments

Comments

@penmatsa
Copy link

penmatsa commented Nov 26, 2024

When we RTMP stream and record local mp4 video's at same time . In Low network conditions frames are dropped by mediamuxer when
RTMP pipline is slow due to low network conditions.can u please suggest any solutions for this fix.

@pedroSG94
Copy link
Owner

Hello,

MediaMuxer never drop frames, only the stream client drop frames if it is necessary. If you implemented the BitrateApdater then you are reducing the bitrate to avoid drop frames and this affect to the local video quality because reduce the bitrate to both, record and stream.

@penmatsa
Copy link
Author

penmatsa commented Nov 28, 2024

Thanks @pedroSG94 ,Even we removed BitrateApdater for Video MediaCodec but enabled for stream client.we are absorbing low quality video's in low network conditions Please help us to make "Video recording and stream client independent of each other".can they process video frames parallel not sequential?

@pedroSG94
Copy link
Owner

pedroSG94 commented Nov 28, 2024

Hello,

I added a feature to support record and stream with different quality. This is available with StreamBase and Camera2Base.
This way you can use BitrateAdapter without affect to record and keep constant the video quality. The only difference is that this feature require use a different resolution in stream and local record. Example:

genericStream.prepareVideo(width, height, vBitrate, rotation = rotation, recordWidth = recordWidth, recordHeight = recordHeight, recordBitrate = recordBitrate)

Requirements to work:

  • Stream and record resolution must be different.
  • Stream and record resolution must use the same aspect ratio
  • Only Available with Camera2Base and StreamBase classes

This feature is not released yet but you can use this gradle meanwhile:

  implementation 'com.github.pedroSG94.RootEncoder:library:b51a9aa081'

@penmatsa
Copy link
Author

penmatsa commented Nov 28, 2024

Thanks @pedroSG94 for your time. Is there any feature that support's segmented(15minutes) video file while recording without lossing any frames between video segmentation.

@pedroSG94
Copy link
Owner

No, I haven't that feature

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

No branches or pull requests

2 participants