# Access incoming video data before buffering

**URL:** https://discourse.lynckia.com/t/access-incoming-video-data-before-buffering/197
**Category:** Uncategorized
**Created:** [May 9, 2016, 11:14am UTC](https://discourse.lynckia.com/t/access-incoming-video-data-before-buffering/197 "2016-05-09T11:14:29Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Joe\_Palmer](https://avatars.discourse-cdn.com/v4/letter/j/8baadc/32.png) [@Joe\_Palmer](https://discourse.lynckia.com/u/Joe_Palmer)
#### Post date: [May 9, 2016, 11:14am UTC](https://discourse.lynckia.com/t/access-incoming-video-data-before-buffering/197/1 "2016-05-09T11:14:29Z")

</div>

I have successfully got Licode up and running and am now able to save  
WebRTC streams directly to disk which is great! However, I can see that  
there is about a 5 second delay from when the server logs that the stream  
is being received to the video beginning to be written to disk. When the  
stop stream message is logged, the rest of the video gets dumped into the  
file almost instantly so it must be being buffered somewhere inside Licode.

We have a system that does real-time analysis of live video and we provide  
feedback to the user during the streaming. Therefore, we need to access the  
data for each frame as close to real-time as possible. Is there an way to  
get hold of the incoming video data in Node before it is buffered so we can  
pipe it into our video analysis system? Alternatively, can I reduce the  
size of the buffer so it writes to disk quicker? The ideal solution would  
be being able to access the raw video data in Node as soon as it is  
recieved as it would be better for the video to not have to go via disk to  
be processed.

Thanks in advance for any help or suggestions.
