<jupyter_start><jupyter_text>**A small test video of a zebra finch is distributed with Birdwatcher**<jupyter_code>vf = bw.testvideosmall()
vf.streammetadata
print(f"framecount: {vf.nframes}")
print(f"duration: {vf.duration}")<jupyter_output>framecount: 497.0
duration: 19.88<jupyter_text>**Iterate of frames in video file. Frames are numpy arrays (height, width, color) of uint8 values,**<jupyter_code>for frame in vf.iter_frames():
    print(frame.shape, end = ', ')<jupyter_output>(720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 1280, 3), (720, 12[...]<jupyter_text>Get a frame by number<jupyter_code>frame = vf.get_frameat('00:10.')
print(frame) # numpy array, uint8<jupyter_output>[[[ 75  70  71]
  [ 97  92  93]
  [ 91  86  87]
  ..., 
  [141 144 144]
  [141 144 144]
  [141 144 144]]

 [[ 79  74  75]
  [ 99  94  95]
  [ 87  82  83]
  ..., 
  [141 144 144]
  [141 144 144]
  [141 144 144]]

 [[ 84  79  80]
  [100  95  96]
  [ 83  78  79]
  ..., 
  [141 144 144]
  [141 144 144]
  [141 144 144]]

 ..., 
 [[  5   2   3]
  [  5   2   3]
  [  5   2   3]
  ..., 
  [  5   2   3]
  [  5   2   3]
  [  5   2   3]]

 [[  5   2   3]
  [  5   2   3]
  [  5   2   3]
  ..., 
  [  5   2   3]
  [  5   2   3]
  [  5   2   3]]

 [[  5   2   3]
  [  5   2   3]
  [  5   2   3]
  ..., 
  [  5   2   3]
  [  5   2   3]
  [  5   2   3]]]<jupyter_text>**Look at frame**<jupyter_code>from birdwatcher.plotting import imshow_frame # birdwatcher has vizualization tools
%matplotlib inline
imshow_frame(frame)
from ipywidgets import interact
@interact(frameno=(0, vf.framecount-1))
def show_frame(frameno=0):
    imshow_frame(vf.get_framebynumber(frameno))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.2107485604606526, 'fraction_numerical': 0.271785028790787, 'mean_word_length': 3.0092307692307694, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '507333', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 1712, 'n_tokens_neox': 1196, 'n_words': 367, 'path': 'notebooks/.ipynb_checkpoints/videofile-checkpoint.ipynb', 'repo_name': 'gbeckers/Birdwatcher', 'size': '2605'}