increase ogg/theora framerate for streaming
I'm using a modified version of ogg_saver to create a stream of video from the images published from a camera node. However, the behaviour of recording the video at a constant rate of one frame per second is not very appropriate.
I've been trying to figure out how to increase the frame rate to something closer to the rate my camera publishes images, but I've been unable to find a solution.
How should I do this?
@patrick-mihelich Thanks for your nice answer. I'll try that!
There's still one thing that bothers me, which I guess is related to the theora header packets somehow.
- I can start and stop the ogg_saver node as many times as I want to record several videos when the node publishing the images is the openni_node in openni_camera package.
- I can only record one video with images published from a camera node of mine. All subsequent runs of ogg_saver without restarting the camera node will produce an invalid video file.
I guess there must be something being done in openni_node which isn't on my node, but I cannot find the key difference (of course there are many differences). Do you have any idea of what might be the reason for these different behaviours?
I can also somehow replicate this with my ogg/theora server hack (only first stream request works vs. as many stream request as needed), but it just puts more stuff in play and difficults finding the culprit.
@zxie Thanks for suggesting the mjpeg_server package. I still need to check if the rest of the infrastructure supports this encoding, but it sure will help to have several options. Also, it's way more stable than my quick-and-dirty solution ;)