JPEG image reader for VapourSynth
C Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


vsjpgreader - JPEG image reader for VapourSynth

This software is based in part on the work of the Independent JPEG Group.


>>> import vapoursynth as vs
>>> core = vs.Core()
>>> core.std.LoadPlugin('/path/to/vsjpgreader.dll')
  • read single file:
>>> clip = core.jpgr.Read(['/path/to/file.jpg'])
  • read two or more files:
>>> srcs = ['/path/to/file1.jpg', '/path/to/file2.jpg', ... ,'/path/to/fileX.jpg']
>>> clip = core.jpgr.Read(srcs)
  • read image sequence:
>>> import os
>>> dir = '/path/to/the/directory/'
>>> srcs = [dir + src for src in os.listdir(dir) if src.endswith('.jpg')]
>>> clip = core.jpgr.Read(srcs)


  • Generally, jpeg images are compressed after converted source RGB to 8bit planar YUV, and they are reconverted to RGB at the time of decoding. vsjpgreader omits the reconversion to RGB, and keep them with YUV.
  • If chroma-subsample-type of the image is YUV420 or YUV422, the width of that will be make into mod 2 with padding.
  • Also, If subsample-type of the image is YUV420 or YUV440, the height of that will be make into mod 2 with padding.
  • When reading two or more images, all those width, height, and chroma-subsampling-type need to be the same.

How to compile:

Like as follows:

$ git clone git://
$ cd ./vsjpgreader
$ HERE=$(pwd)
$ wget -O - | tar zxf -
$ cd ./libjpeg-turbo-1.2.1
$ autoreconf -fiv
$ ./configure --prefix=${HERE} --disable-shared
$ make -j4 && make test && make install-strip
$ cd ..
$ ./configure --extra-cflags="-I./include" --extra-ldflags="-L./lib"
$ make
  • NASM is required for compiling libjpeg-turbo.
  • On msys/mingw, you have to install autoconf,automake and libtool into /mingw (not /usr). If they are not place on the expected position, autoreconf will fail.


  • vsjpgreader is using TurboJPEG/OSS library. TurboJPEG/OSS is part of libjpeg-turbo project.
  • libjpeg-turbo is a derivative of libjpeg that uses SIMD instructions (MMX, SSE2, NEON) to accelerate baseline JPEG compression and decompression on x86, x86-64, and ARM systems.


vsjpgreader source code repository:

Independent JPEG Group:


Author: Oka Motofumi ( at gmail dot com)