Skip to content

[DLStreamer Pipeline Server] WebRTC GPU pipeline fallback to software encoding when vah264enc is missing#700

Merged
sajeevrajput merged 1 commit intoopen-edge-platform:release-1.2.0from
sajeevrajput:dlsps/webrtc-fallback-sw-encoders-on-missing-vah264enc
Aug 8, 2025
Merged

[DLStreamer Pipeline Server] WebRTC GPU pipeline fallback to software encoding when vah264enc is missing#700
sajeevrajput merged 1 commit intoopen-edge-platform:release-1.2.0from
sajeevrajput:dlsps/webrtc-fallback-sw-encoders-on-missing-vah264enc

Conversation

@sajeevrajput
Copy link
Copy Markdown
Contributor

@sajeevrajput sajeevrajput commented Aug 8, 2025

Description

When running WebRTC on platforms that donot have vah264enc gstreamer plugin and the primary pipeline feeds GPU buffers, the secondary pipeline i.e. webrtc pipeline will fail complaining the element is unavailable.
As a workaround, we will fallback to use software encoder (x264enc) instead if the plugin is missing.

Fixes # (issue)
https://jira.devtools.intel.com/browse/ITEP-74078

Any Newly Introduced Dependencies

None

How Has This Been Tested?

sanity tested
CPU pipeline on Core and Xeon(Platinum 8468V)
GPU pipeline on Core and Xeon(Platinum 8468V with dGPU)

DLSPS pipeline

{
    "config": {
        "pipelines": [
            {
                "name": "pallet_defect_detection",
                "source": "gstreamer",
                "queue_maxsize": 50,
                "pipeline": "{auto_source} name=source ! parsebin ! vah264dec ! vapostproc ! video/x-raw(memory:VAMemory) ! gvadetect device=GPU pre-process-backend=va-surface-sharing model-instance-id=inst0 name=detection ! queue ! gvametaconvert add-empty-results=true name=metaconvert ! gvametapublish name=destination ! queue ! gvafpscounter ! appsink name=appsink",
                "parameters": {
                    "type": "object",
                    "properties": {
                        "detection-properties": {
                            "element": {
                                "name": "detection",
                                "format": "element-properties"
                            }
                        }
                    }
                },
                "auto_start": false
            }
        ]
    }
}

CURL command

curl --location '<HOST_IP>:8080/pipelines/user_defined_pipelines/pallet_defect_detection' \
--header 'Content-Type: application/json' \
--data '{
    "source": {
        "uri": "file:///home/pipeline-server/resources/videos/classroom.avi",
        "type": "uri"
    },
    "destination": {
        "metadata": {
            "type": "file",
            "path": "/tmp/results8.jsonl",
            "format": "json-lines"
        },
        "frame": {
            "type": "webrtc",
            "peer-id": "pdd"
        }
    },
    "parameters": {
        "detection-properties": {
            "model": "/home/pipeline-server/resources/models/geti/pallet_defect_detection/deployment/Detection/model/model.xml",
            "device": "GPU"
        }
    }
}'

Checklist:

  • I agree to use the APACHE-2.0 license for my code changes.
  • I have not introduced any 3rd party components incompatible with APACHE-2.0.
  • I have not included any company confidential information, trade secret, password or security token.
  • I have performed a self-review of my code.

Copy link
Copy Markdown
Contributor

@rrajore rrajore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sajeevrajput sajeevrajput merged commit 70a3d22 into open-edge-platform:release-1.2.0 Aug 8, 2025
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants