Skip to content

A rust wrapper around the Intel OneAPI Video Processing Library

License

Notifications You must be signed in to change notification settings

FallingSnow/onevpl-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

work in progress

oneVPL

oneVPL is Intel's replacement for intel-media-sdk.

You should really only use this with intel hardware acceleration. The onevpl CPU runtime is End-of-Life.

Features

  • Software Encode
  • Hardware Encode
  • Software Decode
  • Hardware Decode
  • Simple Video Post/Pre Processing (VPP)
    • Color space conversion, Crop
  • Advanced Video Post/Pre Processing (VPP)
    • Sharpening, Denoise, Rotate, etc.
  • External Frame Allocator (Use your own buffers)
  • Legacy API

Dependencies

Building bindings requires clang to be installed.

Windows

If you install clang tools with VS build tools (not recommended, use link above instead), you may have to manually set the libclang path with an environmental variable in order to build. The folder should contain libclang.dll. For example in powershell:

$env:LIBCLANG_PATH="C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/Llvm/x64/bin"
cargo build

Usage

See examples folder. You need git lfs to download the test files. You may need to run git lfs install after cloning.

Examples

Decode a file

RUST_LOG=trace cargo run --example decode_file

Encode a file

RUST_LOG=trace cargo run --example encode_file

Notes

  • HW encoding requires HW input formats (NV12 instead of YUV). You should use the VPP to preprocess the video/frames into HW formats. See encode_file_hw example.

Thread Safety

It appears the OneVPL is thread safe in the "main loop" of the application. https://community.intel.com/t5/Media-Intel-oneAPI-Video/oneVPL-beta10-concurrent-encode-stream/m-p/1233576

This library does it's best to try to enforce that. If you find a theading bug, please open an issue.

Todo

About

A rust wrapper around the Intel OneAPI Video Processing Library

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages