<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/tracing-stateless-video-hardware-decoding-in-v4l2-x2mvwoem6" -->

---
title: Tracing stateless video hardware decoding in V4L2
description: v4l2-tracer is a new utility developed during a Collabora internship that traces and replays stateless video hardware decoding in V4L2 (Video4Linux2). It works...
canonical: https://daily.dev/posts/tracing-stateless-video-hardware-decoding-in-v4l2-x2mvwoem6
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Tracing stateless video hardware decoding in V4L2 | daily.dev
og:description: v4l2-tracer is a new utility developed during a Collabora internship that traces and replays stateless video hardware decoding in V4L2 (Video4Linux2). It works...
og:url: https://daily.dev/posts/tracing-stateless-video-hardware-decoding-in-v4l2-x2mvwoem6
og:image: https://api.daily.dev/og/posts/X2mvwOeM6.png
og:image:alt: Tracing stateless video hardware decoding in V4L2
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Tracing stateless video hardware decoding in V4L2

**[Collabora Blog](https://daily.dev/sources/collabora)** · 7 min read · 0 upvotes · 0 comments

## Summary

v4l2-tracer is a new utility developed during a Collabora internship that traces and replays stateless video hardware decoding in V4L2 (Video4Linux2). It works by preloading a custom library that intercepts system calls and ioctls made during decoding, writing all state information — including codec controls, request API usage, and encoded video data — to a JSON trace file. The trace can then be replayed (retraced) on the same or a different machine with compatible stateless hardware, making it useful for debugging, driver testing, and fuzz testing. Currently supports MPEG2, VP8, H.264, and FWHT formats, with partial support for VP9 and HEVC. Testing without hardware is possible via a virtual stateless decoder driver or the vicodec driver.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.collabora.com/news-and-blog/blog/2022/12/02/tracing-stateless-video-hardware-decoding-in-v4l2>

## Questions this post answers

### What compression formats does v4l2-tracer support for tracing stateless V4L2 decoding?

v4l2-tracer fully supports tracing of MPEG2, VP8, H.264, and FWHT compression formats. VP9 and HEVC stateless controls are also traced and retraced since they are part of the V4L2 uAPI, but additional work is needed to write their decoded video data to YUV files.

_Developers working on V4L2 stateless drivers track codec support gaps like these on daily.dev._

### How can I test v4l2-tracer without stateless video hardware?

Two options exist for testing without hardware: the virtual stateless decoder driver (under development at the time of writing), which accepts a GStreamer pipeline and returns a test pattern with debug info but does not actually decode data; or the existing vicodec virtual codec driver, which emulates a stateless hardware codec for the patent-free FWHT format.

_Embedded Linux developers finding workarounds for hardware-dependent testing share discoveries like this on daily.dev._

### Can a v4l2-tracer trace file be replayed on a different machine?

Yes, a trace file generated on one machine can be retraced on another as long as a stateless hardware decoder and its V4L2 driver are available. The tracer automatically attempts to match the driver from the trace file to available device numbers, and users can manually specify device nodes (e.g., /dev/video6 and /dev/media3) using the -d and -m flags.

_Teams debugging V4L2 driver portability across hardware platforms find relevant tooling discussions on daily.dev._

## Similar posts on daily.dev

- [Apple Video Decode Driver Posted For Upstream Linux Kernel Review](https://daily.dev/posts/apple-video-decode-driver-posted-for-upstream-linux-kernel-review-pfockg6ep) · Phoronix · 0 upvotes · 0 comments
- [NVIDIA Video Codec SDK 13.1: Zero-Copy Transcode, AV1 B-Frames, and Frame-Accurate Seek](https://daily.dev/posts/nvidia-video-codec-sdk-13-1-zero-copy-transcode-av1-b-frames-and-frame-accurate-seek-k2lcpkzvh) · NVIDIA Developer · 1 upvotes · 0 comments
- [Scrcpy 5.0 adds hardware decoding for Android mirroring](https://daily.dev/posts/scrcpy-5-0-adds-hardware-decoding-for-android-mirroring-c2erzqjzu) · omg\! ubuntu\! · 0 upvotes · 0 comments
- [We Mass-Deployed 15-Year-Old Screen Sharing Technology and It's Actually Better](https://daily.dev/posts/we-mass-deployed-15-year-old-screen-sharing-technology-and-it-s-actually-better-qldjxorao) · HelixML · 35 upvotes · 2 comments
- [FFmpeg at Meta: Media Processing at Scale](https://daily.dev/posts/ffmpeg-at-meta-media-processing-at-scale-ftk671jjr) · Facebook Engineering
 · 147 upvotes · 0 comments

---

Tags: [#linux](https://daily.dev/tags/linux)

[View this post on daily.dev](https://daily.dev/posts/tracing-stateless-video-hardware-decoding-in-v4l2-x2mvwoem6)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Tracing stateless video hardware decoding in V4L2","url":"https://daily.dev/posts/tracing-stateless-video-hardware-decoding-in-v4l2-x2mvwoem6","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/tracing-stateless-video-hardware-decoding-in-v4l2-x2mvwoem6"},"datePublished":"2026-08-11T08:57:18.652Z","dateModified":"2026-08-11T09:40:16.993Z","description":"v4l2-tracer is a new utility developed during a Collabora internship that traces and replays stateless video hardware decoding in V4L2 (Video4Linux2). It works...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d0edb5b4c48f590d77114a180136c392?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d0edb5b4c48f590d77114a180136c392?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Collabora Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Collabora Blog","logo":"https://media.daily.dev/image/upload/s--ZGZ0FjqS--/f_auto,q_auto/v1786438306/logos/collabora?_a=BAMAMicg0","url":"https://daily.dev/sources/collabora"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/tracing-stateless-video-hardware-decoding-in-v4l2-x2mvwoem6","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"linux","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Collabora Blog","item":"https://daily.dev/sources/collabora"},{"@type":"ListItem","position":3,"name":"Tracing stateless video hardware decoding in V4L2"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/tracing-stateless-video-hardware-decoding-in-v4l2-x2mvwoem6#faq","mainEntity":[{"@type":"Question","name":"What compression formats does v4l2-tracer support for tracing stateless V4L2 decoding?","acceptedAnswer":{"@type":"Answer","text":"v4l2-tracer fully supports tracing of MPEG2, VP8, H.264, and FWHT compression formats. VP9 and HEVC stateless controls are also traced and retraced since they are part of the V4L2 uAPI, but additional work is needed to write their decoded video data to YUV files. Developers working on V4L2 stateless drivers track codec support gaps like these on daily.dev."}},{"@type":"Question","name":"How can I test v4l2-tracer without stateless video hardware?","acceptedAnswer":{"@type":"Answer","text":"Two options exist for testing without hardware: the virtual stateless decoder driver (under development at the time of writing), which accepts a GStreamer pipeline and returns a test pattern with debug info but does not actually decode data; or the existing vicodec virtual codec driver, which emulates a stateless hardware codec for the patent-free FWHT format. Embedded Linux developers finding workarounds for hardware-dependent testing share discoveries like this on daily.dev."}},{"@type":"Question","name":"Can a v4l2-tracer trace file be replayed on a different machine?","acceptedAnswer":{"@type":"Answer","text":"Yes, a trace file generated on one machine can be retraced on another as long as a stateless hardware decoder and its V4L2 driver are available. The tracer automatically attempts to match the driver from the trace file to available device numbers, and users can manually specify device nodes (e.g., /dev/video6 and /dev/media3) using the -d and -m flags. Teams debugging V4L2 driver portability across hardware platforms find relevant tooling discussions on daily.dev."}}]}
```

