Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ndarray, image, AVFrame convert #2

Merged
merged 9 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 81 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
- name: Build Linux FFmpeg
run: bash scripts/linux_ffmpeg.rs

- name: Setup ffmpeg env
- name: Setup FFmpeg ENV
run: |
# set env
export FFMPEG_BUILD_DIR=${PWD}/tmp/ffmpeg_build
Expand All @@ -88,19 +88,13 @@ jobs:

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy

- name: Build
run: cargo build --features ${{ matrix.feature }} --verbose

- name: Test
run: cargo test --features ${{ matrix.feature }} --verbose -- --nocapture

- name: Clippy
run: cargo clippy --all --features ${{ matrix.feature }} --verbose -- -D warnings

build-macos:
name: build / macos / ffmpeg+opencv+pytorch
runs-on: macos-latest
Expand Down Expand Up @@ -159,8 +153,87 @@ jobs:
#- name: Run Test
# run: cargo test --features ${{ matrix.feature }} --verbose -- --nocapture

clippy:
name: Clippy + Test
runs-on: ubuntu-latest
strategy:
matrix:
include:
- feature: "full,test-tch"

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
ca-certificates \
clang \
curl \
pkg-config \
software-properties-common \
wget \
cmake \
python3 \
python3-pip \
python3-dev \
libavcodec-dev \
libavdevice-dev \
libavfilter-dev \
libavformat-dev \
libavutil-dev \
libswresample-dev \
libswscale-dev \
libopencv-dev \
python3-opencv

# https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
- name: Install FFmpegBuildTools
run: |
sudo apt-get update -qq
sudo apt-get -y install autoconf automake build-essential cmake \
git-core libass-dev libfreetype6-dev libgnutls28-dev libsdl2-dev \
libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev \
libxcb-shm0-dev libxcb-xfixes0-dev pkg-config texinfo wget yasm \
zlib1g-dev nasm libx264-dev libx265-dev libnuma-dev \
libvpx-dev libfdk-aac-dev libmp3lame-dev libopus-dev

- name: Build Linux FFmpeg
run: bash scripts/linux_ffmpeg.rs

- name: Setup FFmpeg ENV
run: |
# set env
export FFMPEG_BUILD_DIR=${PWD}/tmp/ffmpeg_build
echo "FFMPEG_DIR=${FFMPEG_BUILD_DIR}" >> $GITHUB_ENV
echo "FFMPEG_INCLUDE_DIR=${FFMPEG_BUILD_DIR}/include" >> $GITHUB_ENV
echo "FFMPEG_LIB_DIR=${FFMPEG_BUILD_DIR}/lib" >> $GITHUB_ENV
echo "PKG_CONFIG_PATH=${FFMPEG_BUILD_DIR}/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=${FFMPEG_BUILD_DIR}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
# check env
echo "FFmpeg build directory: $FFMPEG_BUILD_DIR"
echo "FFmpeg include directory: $FFMPEG_INCLUDE_DIR"
echo "FFmpeg library directory: $FFMPEG_LIB_DIR"
ls -l ${FFMPEG_BUILD_DIR}/lib || true
ls -l ${FFMPEG_BUILD_DIR}/include || true

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy

- name: Clippy
run: cargo clippy --all --features ${{ matrix.feature }} --verbose -- -D warnings

- name: Test
run: cargo test --features ${{ matrix.feature }} --verbose -- --nocapture

lints:
name: Rustfmt
name: Rust fmt
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down
Binary file added docs/R-REC-BT.601-7-201103-I!!PDF-E.pdf
Binary file not shown.
Binary file added docs/R-REC-BT.709-6-201506-I!!PDF-E.pdf
Binary file not shown.
Loading
Loading