mne_videobrowser.browsers.VideoBrowser#

class mne_videobrowser.browsers.VideoBrowser(videos: list[VideoFile], show_sync_status: bool = False, video_splitter_orientation: Literal['horizontal', 'vertical'] = 'horizontal', parent: QWidget | None = None)[source]#

Bases: SyncableBrowserWidget

A browser for viewing video frames from one or more video files.

Parameters:
  • videos (list[VideoFile]) – The video file(s) to be displayed.

  • show_sync_status (bool, optional) – Whether to show a label indicating the synchronization status of each video, by default False.

  • display_method (Literal["image_view", "image_item"], optional) – The method used to display the video frames. If “image_view”, uses pyqtgraph.ImageView with histogram and extra controls. If “image_item”, uses plain ‘pyqtgraph.ImageItem’ inside a pyqtgraph.ViewBox.

  • video_splitter_orientation (Literal["horizontal", "vertical"], optional) – The orientation of the video splitter that separates multiple video views, by default “horizontal”. Has no effect if only one video is provided.

  • parent (QWidget, optional) – The parent widget for this browser, by default None

Methods

acceptDrops(self, /)

accessibleDescription(self, /)

accessibleIdentifier(self, /)

accessibleName(self, /)

actionEvent(self, event, /)

actions(self, /)

activateWindow(self, /)

addAction(...)

addActions(self, actions, /)

adjustSize(self, /)

autoFillBackground(self, /)

backgroundRole(self, /)

backingStore(self, /)

baseSize(self, /)

blockSignals(self, b, /)

changeEvent(self, event, /)

childAt(...)

childEvent(self, event, /)

children(self, /)

childrenRect(self, /)

childrenRegion(self, /)

clearFocus(self, /)

clearMask(self, /)

close(self, /)

closeEvent(self, event, /)

colorCount(self, /)

connect(...)

connectNotify(self, signal, /)

contentsMargins(self, /)

contentsRect(self, /)

contextMenuEvent(self, event, /)

contextMenuPolicy(self, /)

create(self, /[, arg__1, initializeWindow, ...])

createWinId(self, /)

createWindowContainer(window, /[, parent, flags])

cursor(self, /)

customEvent(self, event, /)

deleteLater(self, /)

depth(self, /)

destroy(self, /[, destroyWindow, ...])

devType(self, /)

devicePixelRatio(self, /)

devicePixelRatioF(self, /)

devicePixelRatioFScale()

disconnect(...)

disconnectNotify(self, signal, /)

display_frame_for_selected_video(frame_idx)

Display the frame at the specified index for the selected video view.

display_next_frame_for_selected_video()

Display the next frame for the currently selected video.

display_previous_frame_for_selected_video()

Display the previous frame for the currently selected video.

dragEnterEvent(self, event, /)

dragLeaveEvent(self, event, /)

dragMoveEvent(self, event, /)

dropEvent(self, event, /)

dumpObjectInfo(self, /)

dumpObjectTree(self, /)

dynamicPropertyNames(self, /)

effectiveWinId(self, /)

emit(self, signal, /, *args)

encodeMetricF(metric, value, /)

ensurePolished(self, /)

enterEvent(self, event, /)

event(self, event, /)

eventFilter(self, watched, event, /)

find(arg__1, /)

findChild(self, type, /[, name, options])

findChildren() -> List[~PlaceholderType] ))

focusInEvent(self, event, /)

focusNextChild(self, /)

focusNextPrevChild(self, next, /)

focusOutEvent(self, event, /)

focusPolicy(self, /)

focusPreviousChild(self, /)

focusProxy(self, /)

focusWidget(self, /)

font(self, /)

fontInfo(self, /)

fontMetrics(self, /)

foregroundRole(self, /)

frameGeometry(self, /)

frameSize(self, /)

geometry(self, /)

get_current_position(media_idx)

Return the current position index of the specified video.

grab(self, /[, rectangle])

grabGesture(self, type, /[, flags])

grabKeyboard(self, /)

grabMouse(-> None)

grabShortcut(self, key, /[, context])

graphicsEffect(self, /)

graphicsProxyWidget(self, /)

hasFocus(self, /)

hasHeightForWidth(self, /)

hasMouseTracking(self, /)

hasTabletTracking(self, /)

height(self, /)

heightForWidth(self, arg__1, /)

heightMM(self, /)

hide(self, /)

hideEvent(self, event, /)

inherits(self, classname, /)

initPainter(self, painter, /)

inputMethodEvent(self, event, /)

inputMethodHints(self, /)

inputMethodQuery(self, arg__1, /)

insertAction(self, before, action, /)

insertActions(self, before, actions, /)

installEventFilter(self, filterObj, /)

internalWinId(self, /)

isActiveWindow(self, /)

isAncestorOf(self, child, /)

isEnabled(self, /)

isEnabledTo(self, arg__1, /)

isFullScreen(self, /)

isHidden(self, /)

isLeftToRight(self, /)

isMaximized(self, /)

isMinimized(self, /)

isModal(self, /)

isQuickItemType(self, /)

isRightToLeft(self, /)

isSignalConnected(self, signal, /)

isTopLevel(self, /)

isVisible(self, /)

isVisibleTo(self, arg__1, /)

isWidgetType(self, /)

isWindow(self, /)

isWindowModified(self, /)

isWindowType(self, /)

jump_to_end(media_idx[, signal])

Display the last frame of the specified video.

jump_to_start(media_idx[, signal])

Display the first frame of the specified video.

keyPressEvent(self, event, /)

keyReleaseEvent(self, event, /)

keyboardGrabber()

killTimer(-> None)

layout(self, /)

layoutDirection(self, /)

leaveEvent(self, event, /)

locale(self, /)

logicalDpiX(self, /)

logicalDpiY(self, /)

lower(self, /)

mapFrom(-> PySide6.QtCore.QPoint)

mapFromGlobal(-> PySide6.QtCore.QPoint)

mapFromParent(-> PySide6.QtCore.QPoint)

mapTo(-> PySide6.QtCore.QPoint)

mapToGlobal(-> PySide6.QtCore.QPoint)

mapToParent(-> PySide6.QtCore.QPoint)

mask(self, /)

maximumHeight(self, /)

maximumSize(self, /)

maximumWidth(self, /)

metaObject(self, /)

metric(self, arg__1, /)

minimumHeight(self, /)

minimumSize(self, /)

minimumSizeHint(self, /)

minimumWidth(self, /)

mouseDoubleClickEvent(self, event, /)

mouseGrabber()

mouseMoveEvent(self, event, /)

mousePressEvent(self, event, /)

mouseReleaseEvent(self, event, /)

move(-> None)

moveEvent(self, event, /)

moveToThread(self, thread, /)

nativeEvent(self, eventType, message, /)

nativeParentWidget(self, /)

nextInFocusChain(self, /)

normalGeometry(self, /)

objectName(self, /)

overrideWindowFlags(self, type, /)

overrideWindowState(self, state, /)

paintEngine(self, /)

paintEvent(self, event, /)

paintingActive(self, /)

palette(self, /)

parent(self, /)

parentWidget(self, /)

pause_playback()

Pause playback of the currently playing video.

physicalDpiX(self, /)

physicalDpiY(self, /)

pos(self, /)

previousInFocusChain(self, /)

property(self, name, /)

raise_(self, /)

receivers(self, signal, /)

rect(self, /)

redirected(self, offset, /)

releaseKeyboard(self, /)

releaseMouse(self, /)

releaseShortcut(self, id, /)

removeAction(self, action, /)

removeEventFilter(self, obj, /)

render(, sourceRegion, renderFlags, renderFlags)

repaint(-> None  -> None  -> None)

resize(-> None)

resizeEvent(self, event, /)

restoreGeometry(self, geometry, /)

saveGeometry(self, /)

screen(self, /)

scroll(-> None)

sender(self, /)

senderSignalIndex(self, /)

setAcceptDrops(self, on, /)

setAccessibleDescription(self, description, /)

setAccessibleIdentifier(self, identifier, /)

setAccessibleName(self, name, /)

setAttribute(self, arg__1, /[, on])

setAutoFillBackground(self, enabled, /)

setBackgroundRole(self, arg__1, /)

setBaseSize(-> None)

setContentsMargins(-> None)

setContextMenuPolicy(self, policy, /)

setCursor(self, arg__1, /)

setDisabled(self, arg__1, /)

setEnabled(self, arg__1, /)

setFixedHeight(self, h, /)

setFixedSize(-> None)

setFixedWidth(self, w, /)

setFocus(-> None)

setFocusPolicy(self, policy, /)

setFocusProxy(self, arg__1, /)

setFont(self, arg__1, /)

setForegroundRole(self, arg__1, /)

setGeometry(-> None)

setGraphicsEffect(self, effect, /)

setHidden(self, hidden, /)

setInputMethodHints(self, hints, /)

setLayout(self, arg__1, /)

setLayoutDirection(self, direction, /)

setLocale(self, locale, /)

setMask(-> None)

setMaximumHeight(self, maxh, /)

setMaximumSize(-> None)

setMaximumWidth(self, maxw, /)

setMinimumHeight(self, minh, /)

setMinimumSize(-> None)

setMinimumWidth(self, minw, /)

setMouseTracking(self, enable, /)

setObjectName(self, name, /)

setPalette(self, arg__1, /)

setParent(-> None)

setProperty(self, name, value, /)

setScreen(self, arg__1, /)

setShortcutAutoRepeat(self, id, /[, enable])

setShortcutEnabled(self, id, /[, enable])

setSizeIncrement(-> None)

setSizePolicy(-> None)

setStatusTip(self, arg__1, /)

setStyle(self, arg__1, /)

setStyleSheet(self, styleSheet, /)

setTabOrder(arg__1, arg__2, /)

setTabletTracking(self, enable, /)

setToolTip(self, arg__1, /)

setToolTipDuration(self, msec, /)

setUpdatesEnabled(self, enable, /)

setVisible(self, visible, /)

setWhatsThis(self, arg__1, /)

setWindowFilePath(self, filePath, /)

setWindowFlag(self, arg__1, /[, on])

setWindowFlags(self, type, /)

setWindowIcon(self, icon, /)

setWindowIconText(self, arg__1, /)

setWindowModality(self, windowModality, /)

setWindowModified(self, arg__1, /)

setWindowOpacity(self, level, /)

setWindowRole(self, arg__1, /)

setWindowState(self, state, /)

setWindowTitle(self, arg__1, /)

set_position(position_idx, media_idx[, signal])

Display the frame at the specified index for a specific video view.

set_sync_status(status, media_idx)

Set the sync status for a specific video view.

sharedPainter(self, /)

show(self, /)

showEvent(self, event, /)

showFullScreen(self, /)

showMaximized(self, /)

showMinimized(self, /)

showNormal(self, /)

signalsBlocked(self, /)

size(self, /)

sizeHint(self, /)

sizeIncrement(self, /)

sizePolicy(self, /)

stackUnder(self, arg__1, /)

startTimer(self, interval, /[, timerType])

start_playback(media_idx)

Start playing the specified video.

statusTip(self, /)

style(self, /)

styleSheet(self, /)

tabletEvent(self, event, /)

testAttribute(self, arg__1, /)

thread(self, /)

timerEvent(self, event, /)

toolTip(self, /)

toolTipDuration(self, /)

topLevelWidget(self, /)

tr(self, sourceText, /[, disambiguation, n])

underMouse(self, /)

ungrabGesture(self, type, /)

unsetCursor(self, /)

unsetLayoutDirection(self, /)

unsetLocale(self, /)

update(-> None  -> None  -> None)

updateGeometry(self, /)

updateMicroFocus(self, /[, query])

updatesEnabled(self, /)

visibleRegion(self, /)

whatsThis(self, /)

wheelEvent(self, event, /)

width(self, /)

widthMM(self, /)

winId(self, /)

window(self, /)

windowFilePath(self, /)

windowFlags(self, /)

windowHandle(self, /)

windowIcon(self, /)

windowIconText(self, /)

windowModality(self, /)

windowOpacity(self, /)

windowRole(self, /)

windowState(self, /)

windowTitle(self, /)

windowType(self, /)

x(self, /)

y(self, /)

Attributes

is_playing

Return whether the video is currently playing.

painters

ushort

staticMetaObject

get_current_position(media_idx: int) int[source]#

Return the current position index of the specified video.

property is_playing: bool#

Return whether the video is currently playing.

display_frame_for_selected_video(frame_idx: int) bool[source]#

Display the frame at the specified index for the selected video view.

Parameters:

frame_idx (int) – The index of the frame to display.

Returns:

True if the frame was displayed, False if the index is out of bounds.

Return type:

bool

set_position(position_idx: int, media_idx: int, signal: bool = True) bool[source]#

Display the frame at the specified index for a specific video view.

Parameters:
  • frame_idx (int) – The index of the frame to display.

  • video_idx (int) – The index of the video view to update.

  • signal (bool, optional) – Whether to emit the frame changed signal, by default True. Setting this to False is useful when setting the view programmatically and you do not want to trigger any additional actions that might be connected to the signal.

Returns:

True if the frame was displayed, False if the index is out of bounds.

Return type:

bool

jump_to_end(media_idx: int, signal: bool = True) None[source]#

Display the last frame of the specified video.

Parameters:
  • media_idx (int) – Index of the video to jump to the end.

  • signal (bool, optional) – Whether to emit sigPositionChanged signal, by default True.

jump_to_start(media_idx: int, signal: bool = True) None[source]#

Display the first frame of the specified video.

Parameters:
  • media_idx (int) – Index of the video to jump to the start.

  • signal (bool, optional) – Whether to emit sigPositionChanged signal, by default True.

display_next_frame_for_selected_video() bool[source]#

Display the next frame for the currently selected video.

Returns:

True if the next frame was displayed, False if next frame could not be retrieved (end of video?)

Return type:

bool

display_previous_frame_for_selected_video() bool[source]#

Display the previous frame for the currently selected video.

Returns:

True if the previous frame was displayed, False if previous frame could not be retrieved (beginning of video?)

Return type:

bool

set_sync_status(status: SyncStatus, media_idx: int) None[source]#

Set the sync status for a specific video view.

Parameters:
  • status (SyncStatus) – The synchronization status to set.

  • media_idx (int) – Index of the video view to update.

start_playback(media_idx: int) None[source]#

Start playing the specified video.

Parameters:

media_idx (int) – Index of the video to start playing.

pause_playback() None[source]#

Pause playback of the currently playing video.

staticMetaObject = PySide6.QtCore.QMetaObject("VideoBrowser" inherits "SyncableBrowserWidget": Methods:   #35 type=Slot, signature=display_frame_for_selected_video(int), parameters=int   #36 type=Slot, signature=display_next_frame_for_selected_video()   #37 type=Slot, signature=display_previous_frame_for_selected_video()   #38 type=Slot, signature=_toggle_play_pause()   #39 type=Slot, signature=_play_next_frame()   #40 type=Slot, signature=_set_selected_video(int), parameters=int )#