# Reading Individual Pixels in a Video Frame?

**URL:** <https://react-native-webrtc.discourse.group/t/reading-individual-pixels-in-a-video-frame/37>\
**Category:** Uncategorized\
**Created:** [February 5, 2019, 3:51pm UTC](https://react-native-webrtc.discourse.group/t/reading-individual-pixels-in-a-video-frame/37 "2019-02-05T15:51:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![timbotech](https://avatars.discourse-cdn.com/v4/letter/t/b77776/32.png) [@timbotech](https://react-native-webrtc.discourse.group/u/timbotech)\
**Post date:** [February 5, 2019, 3:51pm UTC](https://react-native-webrtc.discourse.group/t/reading-individual-pixels-in-a-video-frame/37/1 "2019-02-05T15:51:54Z")

</div>

Hi I’m looking to create some content in an app that is dynamic based on certain parts of an image in a WebRTC feed using React Native WebRTC.

Is there a way to read individual pixels from a single frame of WebRTC video (I would only have to do this once in awhile) and for example, count the number of white pixels in the frame?

If there isn’t a way to do this in the react-native code, would there be a good way to hook in to the native code and expose something, or is using a screenshot library or something else on top a better approach?

---

<div class="post-metadata">

**Author:** ![saghul](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/saghul/32/4_2.png) [@saghul](https://react-native-webrtc.discourse.group/u/saghul)\
**Post date:** [February 7, 2019, 11:50am UTC](https://react-native-webrtc.discourse.group/t/reading-individual-pixels-in-a-video-frame/37/2 "2019-02-07T11:50:34Z")

</div>

This is currently not possible nor do I know of a way to make it possible.

---

<div class="post-metadata">

**Author:** ![VladyslavKochetkov](https://avatars.discourse-cdn.com/v4/letter/v/3be4f8/32.png) [@VladyslavKochetkov](https://react-native-webrtc.discourse.group/u/VladyslavKochetkov)\
**Post date:** [May 10, 2019, 8:12pm UTC](https://react-native-webrtc.discourse.group/t/reading-individual-pixels-in-a-video-frame/37/3 "2019-05-10T20:12:49Z")

</div>

I actually would think that you can add this library [https://github.com/gre/react-native-view-shot](https://github.com/gre/react-native-view-shot) (React Native View Shot) and use it to take a screenshot and capture pixel data from there
