| 1 |
.TH "V4L2-TRACER" "1" "November 2022" "v4l-utils @MAN_PACKAGE_VERSION@" "User Commands" |
| 2 |
.SH NAME |
| 3 |
v4l2-tracer - An application to trace and replay stateless video decoding. |
| 4 |
.SH SYNOPSIS |
| 5 |
\fBv4l2-tracer \fR[options] \fBtrace\fR <\fItracee\fR> |
| 6 |
.RS |
| 7 |
.RE |
| 8 |
\fBv4l2-tracer \fR[options] \fBretrace\fR <\fItrace_file\fR>\fB.json\fR |
| 9 |
.RS |
| 10 |
.RE |
| 11 |
\fBv4l2-tracer clean\fR <\fIfile\fR>\fB.json\fR |
| 12 |
.RS |
| 13 |
.RE |
| 14 |
|
| 15 |
.SH DESCRIPTION |
| 16 |
The v4l2-tracer utility traces, records and replays userspace applications |
| 17 |
that implement the v4l2 memory-to-memory stateless video decoder interface. |
| 18 |
.SS Trace |
| 19 |
Trace system calls and video frame data passed by userspace application <\fItracee\fR> to kernel driver. |
| 20 |
All stateless codec controls in user-space API can be traced. Outputs a JSON-formatted trace file. |
| 21 |
.SS Retrace |
| 22 |
Read the JSON-formatted <\fItrace_file\fR>\fB.json\fR. Replay the same system calls and pass the same video frame data to kernel driver. |
| 23 |
Outputs a JSON-formatted retrace file. |
| 24 |
|
| 25 |
.SS Clean |
| 26 |
Remove lines with irrelevant differences (e.g. file descriptors and memory addresses) from JSON files. |
| 27 |
Outputs a clean copy, not necessarily still in JSON-format. |
| 28 |
|
| 29 |
.SH OPTIONS |
| 30 |
.SS Common Options |
| 31 |
.TP |
| 32 |
\fB\-c\fR, \fB\-\-compact\fR |
| 33 |
Write minimal whitespace in JSON file. |
| 34 |
.TP |
| 35 |
\fB\-g\fR, \fB\-\-debug\fR |
| 36 |
Turn on verbose reporting plus additional debug info. |
| 37 |
.TP |
| 38 |
\fB\-h\fR, \fB\-\-help\fR |
| 39 |
Display this message. |
| 40 |
.TP |
| 41 |
\fB\-r\fR, \fB\-\-raw\fR |
| 42 |
Write decoded video frame data to JSON file. |
| 43 |
.TP |
| 44 |
\fB\-v\fR, \fB\-\-verbose\fR |
| 45 |
Turn on verbose reporting. |
| 46 |
.TP |
| 47 |
\fB\-y\fR, \fB\-\-yuv\fR |
| 48 |
Write decoded video frame data to yuv file. |
| 49 |
|
| 50 |
.SS Retrace Options |
| 51 |
.TP |
| 52 |
\fB\-d\fR, \fB\-\-device\fR <\fIdev\fR> |
| 53 |
Use a different video device than specified in the trace file. |
| 54 |
.RS |
| 55 |
<\fIdev\fR> must be a digit corresponding to an existing /dev/video<\fIdev\fR> |
| 56 |
.RE |
| 57 |
.TP |
| 58 |
\fB\-m\fR, \fB\-\-media\fR <\fIdev\fR> |
| 59 |
Use a different media device than specified in the trace file. |
| 60 |
.RS |
| 61 |
<\fIdev\fR> must be a digit corresponding to an existing /dev/media<\fIdev\fR> |
| 62 |
.RE |
| 63 |
|
| 64 |
.SH EXIT STATUS |
| 65 |
On success, it returns 0. Otherwise, it will return 1 or an error code. |
| 66 |
|
| 67 |
.SH EXAMPLE |
| 68 |
.TP |
| 69 |
Trace an application decoding VP8 video: |
| 70 |
.EX |
| 71 |
\fIv4l2-tracer trace gst-launch-1.0 -- filesrc location=test-25fps.vp8 ! parsebin ! v4l2slvp8dec ! videocodectestsink\fR |
| 72 |
.EE |
| 73 |
.TP |
| 74 |
A trace file is generated: |
| 75 |
.EE |
| 76 |
\fI71827_trace.json\fR |
| 77 |
.TP |
| 78 |
Retrace the trace file: |
| 79 |
.EX |
| 80 |
\fIv4l2-tracer retrace 71827_trace.json\fR |
| 81 |
.EE |
| 82 |
.TP |
| 83 |
Specify device nodes if retracing on a different driver: |
| 84 |
.EX |
| 85 |
\fIv4l2-tracer -d0 -m0 retrace 71827_trace.json\fR |
| 86 |
.EE |
| 87 |
.TP |
| 88 |
A retrace file is generated: |
| 89 |
.EE |
| 90 |
\fI71827_trace_retrace.json\fR |
| 91 |
.EX |
| 92 |
.TP |
| 93 |
Remove file descriptors and addresses (optional): |
| 94 |
.EX |
| 95 |
\fIv4l2-tracer clean 71827_trace.json\fR |
| 96 |
.EE |
| 97 |
.EX |
| 98 |
\fIv4l2-tracer clean 71827_trace_retrace.json\fR |
| 99 |
.EE |
| 100 |
.TP |
| 101 |
Clean files are generated for comparison: |
| 102 |
.EX |
| 103 |
\fIclean_71827_trace.json\fR |
| 104 |
.EE |
| 105 |
.EE |
| 106 |
\fIclean_71827_trace_retrace.json\fR |
| 107 |
.EX |
| 108 |
|
| 109 |
.SH BUGS |
| 110 |
Bug reports or questions about this utility should be sent to the |
| 111 |
[email protected] mailinglist. |