A system comprising: computer-readable storage medium storing instructions and a database having a plurality of frame fingerprints associated with media programs being streamed to a plurality of channels; and at least one processing device configured to execute the instructions to: receive , from a media device , a query fingerprint of content being consumed, the query fingerprint including an ordered sequence of frames; match the query fingerprint with the plurality of frame fingerprints stored in the database by determining distances between respective frame fingerprints of the plurality of frame fingerprints and corresponding ones of the ordered sequence of frames, wherein to match comprises to populate leaf nodes of a binary tree structure with the respective distances; populate the parent nodes and the root node the binary tree structure with values from adding the values of their respective children nodes; detect a channel change from a first channel to a second channel responsive to locating a value that is less than a threshold value within a threshold number of children nodes from the root node when traversing down the binary tree structure; and determine an identity of the second channel by identifying a channel streaming content with frames matching those at an end of the ordered sequence of frames of the query fingerprint. computer-readable storage medium storing instructions and a database having a plurality of frame fingerprints associated with media programs being streamed to a plurality of channels; and at least one processing device configured to execute the instructions to: receive , from a media device , a query fingerprint of content being consumed, the query fingerprint including an ordered sequence of frames; match the query fingerprint with the plurality of frame fingerprints stored in the database by determining distances between respective frame fingerprints of the plurality of frame fingerprints and corresponding ones of the ordered sequence of frames, wherein to match comprises to populate leaf nodes of a binary tree structure with the respective distances; populate the parent nodes and the root node the binary tree structure with values from adding the values of their respective children nodes; detect a channel change from a first channel to a second channel responsive to locating a value that is less than a threshold value within a threshold number of children nodes from the root node when traversing down the binary tree structure; and determine an identity of the second channel by identifying a channel streaming content with frames matching those at an end of the ordered sequence of frames of the query fingerprint. receive , from a media device , a query fingerprint of content being consumed, the query fingerprint including an ordered sequence of frames; match the query fingerprint with the plurality of frame fingerprints stored in the database by determining distances between respective frame fingerprints of the plurality of frame fingerprints and corresponding ones of the ordered sequence of frames, wherein to match comprises to populate leaf nodes of a binary tree structure with the respective distances; populate the parent nodes and the root node the binary tree structure with values from adding the values of their respective children nodes; detect a channel change from a first channel to a second channel responsive to locating a value that is less than a threshold value within a threshold number of children nodes from the root node when traversing down the binary tree structure; and determine an identity of the second channel by identifying a channel streaming content with frames matching those at an end of the ordered sequence of frames of the query fingerprint. <EOS>