-
-
Notifications
You must be signed in to change notification settings - Fork 801
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
Pushing video frame data to custom stream server #1750
Comments
Hello, In that case I recommend you create your own RtmpStream class. Copy this class: After that, you can use the class exactly the same way you are currently using RootEncoder library. |
Hi @pedroSG94 Instead of using rtmp client, I will use the 3rd lib to send the video buffer? |
Yes, that method. |
Thanks, but I have tried it, the 3rd lib only support sending frame in NV21, I420 or ARGB format. |
Hello, In that case you can decode the frame. Copy this class (it is not the same in the current release, I did a modification to support this case): val decoder = BufferDecoder(VideoCodec.H264)
//use the same values than in prepareVideo, width, height, fps and rotation
decoder.prepare(640, 480, 30, 0)
//null because we want receive a buffer when decode instead of render a surface.
//the return indicate the raw color received when decode. check MediaCodecInfo.CodecCapabilities values
val resultColor = decoder.start(null)
//call it when needed. null if fail or if you set a surface in the start method
val rawBuffer = decoder.decode(data)
//stop it after finish
decoder.stop() |
Thanks, but I can not access the BufferDecoder class from that link (it returns 404). |
I will try it and let you know. |
Hi,
I am using your library to push frame data to RTMP server and it works fine.
Now, I need to push that frame to 3rd library which does not expose a rtmp url. It means, I can not use startStream() API.
I want to use RootEncoder to capture camera frame, apply filter, then use that 3rd SDK to push this frame to its stream server.
What I tried.
What I intend to do.
My question is: Is there a callback that notifies a processed frame data, or provide a way to push the processed frame data to external consumer.
Thanks
The text was updated successfully, but these errors were encountered: