RootEncoder icon indicating copy to clipboard operation
RootEncoder copied to clipboard

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

Open penmatsa opened this issue 1 year ago • 5 comments

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.

penmatsa avatar Nov 26 '24 12:11 penmatsa

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.

pedroSG94 avatar Nov 26 '24 21:11 pedroSG94

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?

penmatsa avatar Nov 28 '24 10:11 penmatsa

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'

pedroSG94 avatar Nov 28 '24 10:11 pedroSG94

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.

penmatsa avatar Nov 28 '24 17:11 penmatsa

No, I haven't that feature

pedroSG94 avatar Nov 28 '24 21:11 pedroSG94