code: def select_video_source(*args):
      global video_file
      global video_cam
      global sourceSelection
  
      selectedSource = sourceSelection.get()
  
      if selectedSource == "Open File >>":
          try:
              video_file = fd.askopenfilename(
                  filetypes=(
                      ("AVI files", "*.avi"),
                      ("MKV files", "*.mkv"),
                      ("MP4 files", "*.mp4"),
                      ("MPG files", "*.mpg"),
                      ("WMV files", "*.wmv"),
                      ("All files", "*.*"),
                  )
              )
  
              if video_file != "":
                  start_playing_file_video()
              else:
                  sourceSelection.set("None")
                  popup_menu_source["bg"] = "green"
                  popup_menu_source["bg"] = "lightgreen"
          except Exception as e:
              print(str(e))
      elif selectedSource != "None":
          # [-1:] is functional for 0 to 9 indexes, use [7:] instead to cover any index (provided all names still start with 'Camera_')
          video_cam = int(selectedSource[-1:])
          start_playing_camera_video()
  
imports: from tkinter import *
  from tkinter import filedialog
  import threading
  import platform
  import caer
label_desc: Use image node_id 1 for calling a global function with example usage: select_video_source() without return types