/PyVideoPlayer

Primary LanguageJupyter Notebook

PyVideoPlayer

PyVideoPlayer is a work in progress video and image sequence player, with built in cache for realtime playback, and scrubbing. Built on top of OpenImageIO, OpenCV, PySide6 and python3.

Features

  • support for a wide variety of image format includeing jpg, dpx, exr.
  • support for movie format including h264
  • export to mp4 with h264 encoding.
  • export to jpeg sequence
  • apply LUT (currently with CPU)
  • compare video side by side
  • annotations

screenshot

TODO

  • open files directly with UI

  • open video with drag and drop

  • open lut with drag and drop

  • implement Viewer

  • add zoom and zoom to fit fit

  • zoom around mouse cursor

  • zoom around pinch center

  • reimplement pan, interferes with zoom around pinch center

  • fix is_sequence when video files eg .mp4 ends with a number

  • Reader class to support sequence starts at non zero

  • loop by default

  • add loop option in gui

  • fix timer. QTimer works with int milliseconds. Eg. 24 fps is 1000/fps=41.66 will set the timer to 41ms frequency.

  • export to mp4

  • add non blobking export with gui

  • dark theme

  • fix first frame number when image sequence starts other than 0

  • frame scrubbing with a frame dial

  • frame scrubbing with right mouse drag on viewer

  • mark in, out point

  • create a precise frameslider widget with matching cache bar

  • LUT

    • read .cube lut files
    • apply lut with cython to pixels
    • create gui buttons to open, en enable lut
    • add LUT to cache key
    • apply lut with trilinear interpolation
    • read 1D lut
    • use OpenColorIO for LUT
  • create exe

  • fullscreen

  • use 32bit float internally

  • expusure, gamma

  • give it a better name : )

Compile cython based LUT

python setup.py build_ext --inplace

TESTS TODO

  • first and last frame equal. Only a singlie frame. Test zoom with timeslider
  • drag and drop files with non-asci characters
  • Test FrameServer
    • open single file
    • open an video then open another one

Build with PyInstaller

pyinstaller VideoPlayer/main.py --add-data "C:/Users/{user}/AppData/Local/Programs/Python/Python39/Lib/site-packages/PySide6/plugins;PySide6/plugins/"