It is possible to do such a conversion with scripting. In my opinion, the link below is the best source of information for doing so.
You could either:
1. Record the stream to an RSSDK file (which is based on an h.264 format video) and then play the file back.
2. Convert the RealSense data to a .mat file for use with OpenCV.