I know it sounds lazy, but the situation really demands something practical, simple and effective. I explain:
I receive a stream of data that are supposed to be h264 packets. Repetitively they come like this: a packet with 8 bytes, a packet with 40 bytes and about 10 consecutive packets with more than 500 bytes, where the images are.
The SDK I have has a function that decodes these larger packets and turns them into readable images. This has already been tested.
My mission is to take advantage of these still encoded images and create a standardized stream that can be read by players and transmit this across my network.
Detail, this occurs on a "screen remote control" which is actually an API 21 adroid with little processing power.
I have already tried to decode the images and pass them to an encoder of some RTMP API. It works, but slow processing causes the FPS to drop too much.
I need to know if there is any way to send these packets with the current encoding, just encapsulating them in a video stream muxer. This saves processing.
Currently I send the frames through a simple socket directly, without any interference (package in-package out) it works perfectly, but in this case only I can reproduce the stream on the client, with my own program.
And I wish players like VLC could play the stream.
If you can give examples of how to package it, showing the functions of the APIS, I would appreciate it, I've already spent many hours and hours on this, and the project isn't worth that much financially speaking.
I tried using RootEncoder RTMP and other associated projects to just replace the video stream with the stream I already receive, taking advantage of all the negotiation part it presents, but I couldn't.