Examples

Real-time Progress

The progress tracking system is built into every Job and Queue. Monitor real-time execution with detailed metrics including percentage completion, processing speed, and time estimates.

Progress Tracking Features

Real-time Updates

Progress events fire continuously during job execution

Detailed Metrics

Get completion percentage, processing speed, and time estimates

Event-Driven

Built on Node.js EventEmitter for efficient progress handling

Scalable Monitoring

Track progress across single jobs, queues, and pipelines

Complete Progress Examples

1. Single Job Progress Tracking

Monitor individual job progress with detailed metrics and timing

Completion percentageEncoding speed (kbps)Estimated time remaining

Implementation

single-job-progress-tracking-progress.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
typescript

How It Works

Each Job is an event emitter with real-time progress updates
"progress" provides granular metrics: percent, currentKbps, timemark
"end" fires when the job completes successfully
"error" handles failures with detailed error information
Perfect for single file processing with user feedback

2. Multiple Jobs with Queue Monitoring

Track progress across multiple concurrent jobs in a processing queue

Individual job progressConcurrent executionQueue management

Implementation

multiple-jobs-with-queue-monitoring-progress.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
typescript

How It Works

Queue(maxConcurrent) controls how many jobs run simultaneously
Jobs are added to queue; only maxConcurrent jobs run at once
Each job independently emits progress events
Ideal for batch processing with resource management
Progress tracking works across all concurrent jobs

3. Pipeline Progress Monitoring

Track progress through multi-step pipeline workflows with step-level detail

Step-by-step progressPipeline completionSequential tracking

Implementation

pipeline-progress-monitoring-progress.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
typescript

How It Works

pipeline.run() returns array of jobs executing sequentially
Listen to "progress" events per pipeline step
Each step reports its own progress independently
Useful for visual progress UIs with step indicators
Perfect for complex multi-stage processing workflows

4. Aggregated Progress Dashboard

Create comprehensive dashboards for batch processing with global metrics

Batch completion trackingIndividual file progressGlobal statistics

Implementation

aggregated-progress-dashboard-progress.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
typescript

How It Works

Runs multiple conversion jobs across limited worker slots
Logs individual file progress with global completion counter
Pattern for batch video/audio processing dashboards
Combines per-file and aggregate progress tracking
Ideal for large-scale media processing operations

Progress Data Structure

Every progress event includes detailed information about the job execution:

progress-interface.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
typescript

Building a Progress Dashboard

progress-dashboard.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
typescript

Progress Tracking Best Practices

Performance

  • Throttle progress updates for UI performance
  • Use debouncing for frequent progress events
  • Store progress data efficiently

User Experience

  • Show meaningful progress indicators
  • Display ETA and processing speed
  • Handle progress errors gracefully

Build Production UIs

With real-time progress mastered, you can now build sophisticated user interfaces that provide detailed feedback during media processing operations.