Table of Contents
Fetching ...

ELLMPEG: An Edge-based Agentic LLM Video Processing Tool

Zoha Azimi, Reza Farahani, Radu Prodan, Christian Timmerer

TL;DR

ELLMPeg tackles the problem of generating correct video processing commands without relying on cloud LLMs by combining a dual-tool RAG framework with an edge-optimized agentic LLM and a self-reflection loop. The approach uses two separate vector stores for FFmpeg and VVenC documentation, chunked retrieval, and iterative refinement to produce executable FFmpeg and VVenC commands locally. Empirical results show that open-source models augmented with ELLMPEG reach up to about $78\%$ command-generation accuracy on edge devices with zero recurring API costs, outperforming several baselines especially on the specialized VVenC domain. The work demonstrates practical viability for on-device multimedia AI, with implications for privacy, cost, and offline operation, and points to future gains from domain-specific embeddings and energy-aware inference.

Abstract

Large language models (LLMs), the foundation of generative AI systems like ChatGPT, are transforming many fields and applications, including multimedia, enabling more advanced content generation, analysis, and interaction. However, cloud-based LLM deployments face three key limitations: high computational and energy demands, privacy and reliability risks from remote processing, and recurring API costs. Recent advances in agentic AI, especially in structured reasoning and tool use, offer a better way to exploit open and locally deployed tools and LLMs. This paper presents ELLMPEG, an edge-enabled agentic LLM framework for the automated generation of video-processing commands. ELLMPEG integrates tool-aware Retrieval-Augmented Generation (RAG) with iterative self-reflection to produce and locally verify executable FFmpeg and VVenC commands directly at the edge, eliminating reliance on external cloud APIs. To evaluate ELLMPEG, we collect a dedicated prompt dataset comprising 480 diverse queries covering different categories of FFmpeg and the Versatile Video Codec (VVC) encoder (VVenC) commands. We validate command generation accuracy and evaluate four open-source LLMs based on command validity, tokens generated per second, inference time, and energy efficiency. We also execute the generated commands to assess their runtime correctness and practical applicability. Experimental results show that Qwen2.5, when augmented with the ELLMPEG framework, achieves an average command-generation accuracy of 78 % with zero recurring API cost, outperforming all other open-source models across both the FFmpeg and VVenC datasets.

ELLMPEG: An Edge-based Agentic LLM Video Processing Tool

TL;DR

ELLMPeg tackles the problem of generating correct video processing commands without relying on cloud LLMs by combining a dual-tool RAG framework with an edge-optimized agentic LLM and a self-reflection loop. The approach uses two separate vector stores for FFmpeg and VVenC documentation, chunked retrieval, and iterative refinement to produce executable FFmpeg and VVenC commands locally. Empirical results show that open-source models augmented with ELLMPEG reach up to about command-generation accuracy on edge devices with zero recurring API costs, outperforming several baselines especially on the specialized VVenC domain. The work demonstrates practical viability for on-device multimedia AI, with implications for privacy, cost, and offline operation, and points to future gains from domain-specific embeddings and energy-aware inference.

Abstract

Large language models (LLMs), the foundation of generative AI systems like ChatGPT, are transforming many fields and applications, including multimedia, enabling more advanced content generation, analysis, and interaction. However, cloud-based LLM deployments face three key limitations: high computational and energy demands, privacy and reliability risks from remote processing, and recurring API costs. Recent advances in agentic AI, especially in structured reasoning and tool use, offer a better way to exploit open and locally deployed tools and LLMs. This paper presents ELLMPEG, an edge-enabled agentic LLM framework for the automated generation of video-processing commands. ELLMPEG integrates tool-aware Retrieval-Augmented Generation (RAG) with iterative self-reflection to produce and locally verify executable FFmpeg and VVenC commands directly at the edge, eliminating reliance on external cloud APIs. To evaluate ELLMPEG, we collect a dedicated prompt dataset comprising 480 diverse queries covering different categories of FFmpeg and the Versatile Video Codec (VVC) encoder (VVenC) commands. We validate command generation accuracy and evaluate four open-source LLMs based on command validity, tokens generated per second, inference time, and energy efficiency. We also execute the generated commands to assess their runtime correctness and practical applicability. Experimental results show that Qwen2.5, when augmented with the ELLMPEG framework, achieves an average command-generation accuracy of 78 % with zero recurring API cost, outperforming all other open-source models across both the FFmpeg and VVenC datasets.
Paper Structure (42 sections, 9 figures, 4 tables, 1 algorithm)

This paper contains 42 sections, 9 figures, 4 tables, 1 algorithm.

Figures (9)

  • Figure 1: Comparison of responses to two queries: green borders indicate valid commands, red borders denote invalid ones.
  • Figure 2: ELLMPEG architecture.
  • Figure 3: Query distribution across various categories in the (a) FFmpeg and (b) VVenC command pools.
  • Figure 4: Accuracy on the FFmpeg command pool.
  • Figure 5: Accuracy on the VVenC command pool.
  • ...and 4 more figures