Hi Ulf,
There isn't a specific example that does all of that out of the box but there are components that you can merge together to get the desired pipeline. Essentially I think you can start of with generic-example for getting the custom model running on 4S camera. For encoding you can add a VIdeoEncoder node and connect it to the camera video output. And then for sending all of the data to your preferred location you can implement this in your custom HostNode. So connecting all the relevant inputs (ParsingNeuralNetwork.out and encoded frames from video encoder) to it and then in its process() function you can define what data goes where outside of DepthAI. Hope this helps together with the links and examples under each link.
Best, Klemen