Giter Club home page Giter Club logo

yuv-tools's Introduction

YCbCr (YUV)

Tools for various operations on raw YCbCr video files. http://en.wikipedia.org/wiki/YCbCr

ycbcr.py - is the main class that supports the following formats:

  • IYUV
  • UYVY
  • YV12
  • NV12
  • YVYU
  • YUY2
  • 422

Supported operations:

  • basic info about a file
  • convert between any of the formats above (including correct sub- re-sampling of chroma-data)
  • split a file into individual frames
  • creates a diff between two files
  • PSNR calculations, one value per color-plane including weighted and average
  • get luma-data per frame
  • SSIM calculation on luma
  • convert between 8bpp and 10bpp
  • flip left/right, upside/down
  • draw frame number in luma-data
  • crop
  • visualization of PSNR/SSIM using matplotlib
  • reduce framerate by throwing away frames

Also includes a simple GUI using wxpython that wraps the psnr/ssim operations above.

Usage

$ ./ycbcr.py info foreman_352x288.yuv 352 288 YV12
$ ./ycbcr.py convert --help
$ ./ycbcr.py diff --help
$ ./ycbcr.py split --help
$ ./ycbcr.py psnr --help
$ ./ycbcr.py ssim --help
$ ./ycbcr.py 8to10 --help
$ ./ycbcr.py 10to8 --help
$ ./ycbcr.py fliplr --help
$ ./ycbcr.py flipud --help
$ ./ycbcr.py fnum --help
$ ./ycbcr.py crop --help
$ ./ycbcr.py fr --help
$ ./plot_diff.py foreman_cif_frame_0.yuv foreman_cif_frame_1.yuv 352 288 YV12
$ ./visual.py psnr_all foreman_cif_frame_0.yuv 352 288 YV12 foreman_cif_frame_1.yuv

Files

  • ycbcr.py - main class
  • plot_diff.py - matplotlib wrapper around PSNR/SSIM-calculation. Generate nice plots using luma-data.
  • verify.py - unittest
  • visual.py - matplotlib wrapper around PSNR/SSIM-calculation. Generate nice plots.

Screenshots

Here's one of the output from visual.py

psnr

psnr

yuv-tools's People

Contributors

figgis avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.