Skip to content

Commit 087d2d7

Browse files
committed
Removed noisy yamls, updated sh script to handle vp9 download only webm clip removed ivf dep, updated lib gstreamer with addon local clip function for vp9 test
Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
1 parent 11b76a2 commit 087d2d7

5 files changed

Lines changed: 188 additions & 317 deletions

File tree

Runner/suites/Multimedia/GSTreamer/Display/Waylandsink_Playback/Waylandsink_Playback.yaml

Lines changed: 13 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -10,40 +10,19 @@ metadata:
1010
- linux
1111
scope:
1212
- functional
13+
1314
params:
14-
VIDEO_DURATION: "30" # seconds
15-
VIDEO_PATTERN: "smpte" # smpte|snow|black|white|red|green|blue|checkers-1|checkers-2|ball
16-
VIDEO_WIDTH: "1920" # pixels
17-
VIDEO_HEIGHT: "1080" # pixels
18-
VIDEO_FRAMERATE: "30" # fps
19-
VIDEO_GST_DEBUG: "2" # 1-9
15+
VIDEO_DURATION: "30" # seconds
16+
VIDEO_PATTERN: "smpte" # smpte|snow|black|white|red|green|blue|checkers-1|checkers-2|ball
17+
VIDEO_WIDTH: "1920" # pixels
18+
VIDEO_HEIGHT: "1080" # pixels
19+
VIDEO_FRAMERATE: "30" # fps
20+
VIDEO_GST_DEBUG: "2" # 1-9
21+
2022
run:
2123
steps:
22-
- |
23-
REPO_PATH=$PWD
24-
cd Runner/suites/Multimedia/GSTreamer/Display/Waylandsink_Playback || exit 0
25-
26-
CMD="./run.sh"
27-
28-
# Use CLI args only (no exports). Script defaults apply if params are empty.
29-
if [ -n "${VIDEO_WIDTH}" ] && [ -n "${VIDEO_HEIGHT}" ]; then
30-
CMD="${CMD} --resolution ${VIDEO_WIDTH}x${VIDEO_HEIGHT}"
31-
fi
32-
if [ -n "${VIDEO_PATTERN}" ]; then
33-
CMD="${CMD} --pattern ${VIDEO_PATTERN}"
34-
fi
35-
if [ -n "${VIDEO_DURATION}" ]; then
36-
CMD="${CMD} --duration ${VIDEO_DURATION}"
37-
fi
38-
if [ -n "${VIDEO_FRAMERATE}" ]; then
39-
CMD="${CMD} --framerate ${VIDEO_FRAMERATE}"
40-
fi
41-
if [ -n "${VIDEO_GST_DEBUG}" ]; then
42-
CMD="${CMD} --gst-debug ${VIDEO_GST_DEBUG}"
43-
fi
44-
45-
echo "[LAVA] Running: ${CMD}"
46-
sh -c "${CMD}" || true
47-
48-
# Send result to LAVA (single command line to avoid YAML parsing issues)
49-
${REPO_PATH}/Runner/utils/send-to-lava.sh Waylandsink_Playback.res
24+
- REPO_PATH="$PWD"
25+
- cd Runner/suites/Multimedia/GSTreamer/Display/Waylandsink_Playback/
26+
- export VIDEO_DURATION VIDEO_PATTERN VIDEO_WIDTH VIDEO_HEIGHT VIDEO_FRAMERATE VIDEO_GST_DEBUG
27+
- ./run.sh --resolution "${VIDEO_WIDTH}x${VIDEO_HEIGHT}" --pattern "${VIDEO_PATTERN}" --duration "${VIDEO_DURATION}" --framerate "${VIDEO_FRAMERATE}" --gst-debug "${VIDEO_GST_DEBUG}" || true
28+
- $REPO_PATH/Runner/utils/send-to-lava.sh Waylandsink_Playback.res || true

Runner/suites/Multimedia/GSTreamer/Video/Video_Encode_Decode/README.md

Lines changed: 16 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ This directory contains the **Video_Encode_Decode** validation test for Qualcomm
55
It validates video **encoding and decoding** using **GStreamer (`gst-launch-1.0`)** with V4L2 hardware-accelerated codecs:
66
- **v4l2h264enc** / **v4l2h264dec** (H.264/AVC)
77
- **v4l2h265enc** / **v4l2h265dec** (H.265/HEVC)
8-
- **v4l2vp9dec** (VP9 decode only - uses pre-downloaded clips converted to WebM)
8+
- **v4l2vp9dec** (VP9 decode only - uses pre-downloaded WebM clips)
99

1010
The script is designed to be **CI/LAVA-friendly**:
1111
- Writes **PASS/FAIL/SKIP** into `Video_Encode_Decode.res`
1212
- Always **exits 0** (even on FAIL/SKIP) to avoid terminating LAVA jobs early
1313
- Logs the **final `gst-launch-1.0` command** to console and to log files
1414
- Uses **videotestsrc** plugin to generate test patterns for H.264/H.265 (no external video files needed)
15-
- For VP9: Downloads pre-encoded clips from git repo (requires network connectivity)
15+
- For VP9: Downloads WebM clips from git repo (requires network connectivity)
1616

1717
---
1818

@@ -113,14 +113,13 @@ By default, logs are written relative to the script working directory:
113113
decode_h264_4k.log
114114
decode_h265_480p.log
115115
decode_h265_4k.log
116-
decode_vp9_320p.log # VP9 decode test log
116+
decode_vp9_480p.log # VP9 decode test log
117117
encoded/ # Encoded video files
118118
encode_h264_480p.mp4
119119
encode_h264_4k.mp4
120120
encode_h265_480p.mp4
121121
encode_h265_4k.mp4
122-
320_240_10fps.ivf # Downloaded VP9 clip (IVF format)
123-
vp9_test_320p.webm # Converted VP9 clip (WebM format - used for decode test)
122+
VP9_640x480_10s.webm # Downloaded VP9 clip (WebM format)
124123
dmesg/ # dmesg scan outputs (if available)
125124
```
126125

@@ -144,7 +143,7 @@ By default, logs are written relative to the script working directory:
144143
### Parser Elements
145144
- `h264parse` - H.264 stream parser
146145
- `h265parse` - H.265 stream parser
147-
- `ivfparse` - IVF container parser (for VP9)
146+
- `matroskademux` - WebM/Matroska container demuxer (for VP9)
148147

149148
### Network Requirements (for VP9)
150149
- Network connectivity (Ethernet or WiFi)
@@ -335,27 +334,10 @@ Where:
335334
- Parser ensures proper stream format
336335
- `fakesink` discards output (no display needed for validation)
337336

338-
### VP9 Clip Conversion Pipeline
339-
340-
Before decoding, the downloaded IVF file is converted to WebM (Matroska) container:
341-
342-
```
343-
filesrc location=320_240_10fps.ivf
344-
! ivfparse
345-
! matroskamux
346-
! filesink location=vp9_test_320p.webm
347-
```
348-
349-
Where:
350-
- `ivfparse` parses the downloaded IVF container
351-
- `matroskamux` remuxes to WebM/Matroska container
352-
- **If conversion fails**: Test is skipped with reason "GST conversion failure"
353-
- **No IVF fallback**: The test will not use IVF directly if conversion fails
354-
355337
### Decoding Pipeline (VP9)
356338

357339
```
358-
filesrc location=vp9_test_320p.webm
340+
filesrc location=VP9_640x480_10s.webm
359341
! matroskademux
360342
! v4l2vp9dec
361343
! videoconvert
@@ -364,9 +346,8 @@ filesrc location=vp9_test_320p.webm
364346

365347
Where:
366348
- `matroskademux` parses WebM/Matroska container format
367-
- Input file is the converted WebM file (not IVF directly)
368-
- Resolution: 320x240
369-
- **Important**: Test skips if WebM conversion failed (no IVF fallback)
349+
- Input file is the downloaded WebM file
350+
- Resolution: 640x480
370351

371352
---
372353

@@ -416,45 +397,19 @@ Where:
416397

417398
### H) VP9 decode fails with "Input file not found"
418399
- Ensure network connectivity is available
419-
- Check if clip was downloaded: `ls -l logs/Video_Encode_Decode/320_240_10fps.ivf`
400+
- Check if clip was downloaded: `ls -l logs/Video_Encode_Decode/VP9_640x480_10s.webm`
420401
- Manually download if needed:
421402
```bash
422403
cd logs/Video_Encode_Decode/
423-
wget https://github.com/qualcomm-linux/qcom-linux-testkit/releases/download/IRIS-Video-Files-v1.0/video_clips_iris.tar.gz
424-
tar -xzf video_clips_iris.tar.gz
425-
```
426-
- Check network connectivity:
427-
```bash
428-
ping -c 3 github.com
429-
```
430-
431-
### I) VP9 decode fails with "ivfparse not found"
432-
- Ensure `ivfparse` GStreamer plugin is installed:
433-
```bash
434-
gst-inspect-1.0 ivfparse
435-
```
436-
- This is typically part of `gst-plugins-bad` package
437-
438-
### J) VP9 test skips with "GST conversion failure"
439-
- The IVF to WebM conversion failed
440-
- Check if `matroskamux` plugin is available:
441-
```bash
442-
gst-inspect-1.0 matroskamux
443-
```
444-
- Check if `ivfparse` plugin is available:
445-
```bash
446-
gst-inspect-1.0 ivfparse
447-
```
448-
- Manually test the conversion:
449-
```bash
450-
cd logs/Video_Encode_Decode/
451-
gst-launch-1.0 filesrc location=320_240_10fps.ivf ! ivfparse ! matroskamux ! filesink location=test.webm
404+
wget https://github.com/qualcomm-linux/qcom-linux-testkit/releases/download/GST-Video-Files-v1.0/video_clips_gst.tar.gz
405+
tar -xzf video_clips_gst.tar.gz
452406
```
453-
- Check GStreamer debug output for errors:
407+
### I) VP9 decode fails with "matroskademux not found"
408+
- Ensure `matroskademux` GStreamer plugin is installed:
454409
```bash
455-
GST_DEBUG=3 gst-launch-1.0 filesrc location=320_240_10fps.ivf ! ivfparse ! matroskamux ! filesink location=test.webm
410+
gst-inspect-1.0 matroskademux
456411
```
457-
- **Note**: The test will NOT fall back to using IVF directly. If conversion fails, the test skips to ensure proper container format validation
412+
- This is typically part of `gst-plugins-good` package
458413

459414
---
460415

@@ -639,6 +594,6 @@ The test supports these environment variables (can be set in LAVA job definition
639594
- The test uses `ensure_network_online()` to establish connectivity automatically
640595
- If network is unavailable, VP9 tests will SKIP (not FAIL)
641596
- Downloaded clips are cached in the output directory for subsequent runs
642-
- VP9 clip: 320_240_10fps.ivf (320x240 resolution, IVF container)
597+
- VP9 clip: VP9_640x480_10s.webm (640x480 resolution, WebM container)
643598

644599
---

Runner/suites/Multimedia/GSTreamer/Video/Video_Encode_Decode/Video_Encode_Decode.yaml

Lines changed: 19 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -2,61 +2,29 @@ metadata:
22
name: gstreamer-video-encode-decode
33
format: "Lava-Test Test Definition 1.0"
44
description: >
5-
Video encode/decode validation using GStreamer (gst-launch-1.0) with V4L2 hardware-accelerated codecs
6-
on Qualcomm Linux platforms. Supports v4l2h264enc, v4l2h265enc, v4l2h264dec, v4l2h265dec, v4l2vp9dec.
7-
Uses videotestsrc to generate test patterns for H.264/H.265 (no external video files needed).
8-
For VP9 decode, downloads pre-encoded IVF clips from git repo, converts them to WebM container format,
9-
then decodes using v4l2vp9dec. Test skips if IVF to WebM conversion fails (no IVF fallback).
10-
Tests encoding at 480p and 4K resolutions, then decodes the encoded files.
5+
Video encode/decode validation using GStreamer (gst-launch-1.0) with V4L2 hardware-accelerated codecs.
6+
VP9 clips can be provided via VIDEO_CLIP_PATH (local dir/file/archive) or downloaded via VIDEO_CLIP_URL.
117
os:
128
- linux
139
scope:
1410
- functional
11+
1512
params:
16-
VIDEO_TEST_MODE: "all" # all|encode|decode
17-
VIDEO_CODECS: "h264,h265,vp9" # h264,h265,vp9
18-
VIDEO_RESOLUTIONS: "4k" # 480p,720p,1080p,4k
19-
VIDEO_DURATION: "30" # seconds
20-
VIDEO_FRAMERATE: "30" # fps
21-
VIDEO_STACK: "auto" # auto|upstream|downstream
22-
VIDEO_GST_DEBUG: "2" # 1-9
23-
VIDEO_CLIP_URL: "" # if set, overrides default GitHub URL
13+
VIDEO_TEST_MODE: "all"
14+
VIDEO_CODECS: "h264,h265,vp9"
15+
VIDEO_RESOLUTIONS: "480p"
16+
VIDEO_DURATION: "30"
17+
VIDEO_FRAMERATE: "30"
18+
VIDEO_STACK: "auto"
19+
VIDEO_GST_DEBUG: "2"
20+
VIDEO_CLIP_URL: ""
21+
VIDEO_CLIP_PATH: "" # dir/file/archive (tar/tar.gz/tar.xz/xz)
22+
2423
run:
2524
steps:
26-
- |
27-
REPO_PATH=$PWD
28-
cd Runner/suites/Multimedia/GSTreamer/Video/Video_Encode_Decode/ || exit 0
29-
30-
CMD="./run.sh"
31-
32-
# Use CLI args only (no exports). Script defaults apply if params are empty.
33-
if [ -n "${VIDEO_TEST_MODE}" ]; then
34-
CMD="${CMD} --mode ${VIDEO_TEST_MODE}"
35-
fi
36-
if [ -n "${VIDEO_CODECS}" ]; then
37-
CMD="${CMD} --codecs ${VIDEO_CODECS}"
38-
fi
39-
if [ -n "${VIDEO_RESOLUTIONS}" ]; then
40-
CMD="${CMD} --resolutions ${VIDEO_RESOLUTIONS}"
41-
fi
42-
if [ -n "${VIDEO_DURATION}" ]; then
43-
CMD="${CMD} --duration ${VIDEO_DURATION}"
44-
fi
45-
if [ -n "${VIDEO_FRAMERATE}" ]; then
46-
CMD="${CMD} --framerate ${VIDEO_FRAMERATE}"
47-
fi
48-
if [ -n "${VIDEO_STACK}" ]; then
49-
CMD="${CMD} --stack ${VIDEO_STACK}"
50-
fi
51-
if [ -n "${VIDEO_GST_DEBUG}" ]; then
52-
CMD="${CMD} --gst-debug ${VIDEO_GST_DEBUG}"
53-
fi
54-
if [ -n "${VIDEO_CLIP_URL}" ]; then
55-
CMD="${CMD} --clip-url ${VIDEO_CLIP_URL}"
56-
fi
57-
58-
echo "[LAVA] Running: ${CMD}"
59-
sh -c "${CMD}" || true
60-
61-
# Send result to LAVA (single command line to avoid YAML parsing issues)
62-
${REPO_PATH}/Runner/utils/send-to-lava.sh Video_Encode_Decode.res
25+
- REPO_PATH="$PWD"
26+
- cd Runner/suites/Multimedia/GSTreamer/Video/Video_Encode_Decode/
27+
- export VIDEO_TEST_MODE VIDEO_CODECS VIDEO_RESOLUTIONS VIDEO_DURATION VIDEO_FRAMERATE
28+
- export VIDEO_STACK VIDEO_GST_DEBUG VIDEO_CLIP_URL VIDEO_CLIP_PATH
29+
- ./run.sh --mode "${VIDEO_TEST_MODE}" --codecs "${VIDEO_CODECS}" --resolutions "${VIDEO_RESOLUTIONS}" --duration "${VIDEO_DURATION}" --framerate "${VIDEO_FRAMERATE}" --stack "${VIDEO_STACK}" --gst-debug "${VIDEO_GST_DEBUG}" --clip-url "${VIDEO_CLIP_URL}" --clip-path "${VIDEO_CLIP_PATH}" || true
30+
- $REPO_PATH/Runner/utils/send-to-lava.sh Video_Encode_Decode.res || true

0 commit comments

Comments
 (0)