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

x265/4.1 package update #34967

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion ffmpeg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
package:
name: ffmpeg
version: 7.1
epoch: 3
epoch: 4
description: ffmpeg multimedia library
copyright:
- license: GPL-3.0-or-later AND LGPL-3.0-or-later
Expand Down
58 changes: 37 additions & 21 deletions x265.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
name: x265
version: 4.0
version: "4.1"
epoch: 1
description: H.265/HEVC encoder
copyright:
Expand All @@ -21,7 +21,7 @@ pipeline:
with:
repository: https://bitbucket.org/multicoreware/x265_git.git
tag: ${{package.version}}
expected-commit: 6318f223684118a2c71f67f3f4633a9e35046b00
expected-commit: 1d117bed4747758b51bd2c124d738527e30392cb

- name: build 10bit static library
uses: cmake/configure
Expand Down Expand Up @@ -91,23 +91,39 @@ update:
git: {}

test:
environment:
contents:
packages:
- ffmpeg
pipeline:
- name: Verify x265 binary exists
runs: |
x265 --version
- name: Generate a sample video
runs: |
ffmpeg -f lavfi -i testsrc=duration=10:size=1280x720:rate=25 -pix_fmt yuv420p sample.y4m
- name: Encode the generated sample video to raw H.265
runs: |
x265 --input sample.y4m --output encoded.h265
- name: Package raw H.265 stream into an MP4 container
runs: |
ffmpeg -i encoded.h265 -c copy encoded.mp4
- name: Verify the encoded video is a valid MP4 file
runs: |
ffprobe -v error -show_entries format=format_name -of default=noprint_wrappers=1:nokey=1 encoded.mp4 | grep -q 'mp4'
- runs: |
# Create a temporary raw YUV file (empty video, just for testing)
RAW_YUV="test.yuv"
WIDTH=1920
HEIGHT=1080
FPS=30
FRAMES=10

# Calculate frame size for YUV420p format
FRAME_SIZE=$((WIDTH * HEIGHT * 3 / 2))

echo "Generating raw YUV file ($WIDTH x $HEIGHT, $FRAMES frames)..."
dd if=/dev/zero of=$RAW_YUV bs=$FRAME_SIZE count=$FRAMES status=none

# Output file
OUTPUT_HEVC="test_output.hevc"

echo "Encoding YUV to HEVC using x265..."
x265 --input $RAW_YUV \
--input-res ${WIDTH}x${HEIGHT} \
--fps $FPS \
--frames $FRAMES \
--output $OUTPUT_HEVC

# Check if the output file was created
if [ -f "$OUTPUT_HEVC" ]; then
echo "Encoding successful! Output file: $OUTPUT_HEVC"
else
echo "Encoding failed!"
fi

# Clean up
rm -f $RAW_YUV

echo "Done."
Loading