How I built a parallel video pipeline with Next.js, BullMQ and FFmpeg

Discover how to process 50 videos in parallel with Next.js, BullMQ and FFmpeg. Optimize your workflow with direct uploads to R2 and silence removal.

jueves, 9 de julio de 2026 • 4 min read • Q2BSTUDIO Team

Parallel processing of 50 videos with BullMQ and FFmpeg

Currently, audiovisual content generation has grown exponentially. Creators, companies, and agencies need to process dozens of videos simultaneously to remove silences, add subtitles, adjust formats, and adapt them to multiple platforms. Doing this sequentially is inefficient and creates bottlenecks that delay publication. To solve this, a robust architecture is required that enables parallel processing, managing work queues, cloud storage, and orchestration of CPU and memory-intensive tasks.

Companies like Q2BSTUDIO, specialized in custom software development, offer tailored solutions to address these technological challenges. Their experience in building scalable systems allows them to design pipelines that optimize performance and reliability.

When videos are processed one after another, the total time is the sum of the individual times. A batch of 50 videos can take several hours if each one takes a few minutes. Additionally, any failure stops the entire process and forces a restart. This approach is not viable for applications requiring high availability and speed. The alternative is to implement a system based on queues and workers that execute tasks concurrently, making the most of server resources. AWS and Azure cloud services are essential to ensure elasticity and high availability in this type of architecture.

An effective solution combines Next.js on the frontend to manage the interface and requests, a job queue like BullMQ backed by Redis to orchestrate tasks, and a pool of workers that run FFmpeg and artificial intelligence models like Whisper for transcription. Each worker processes a video independently, downloading the file from cloud storage (e.g., AWS S3 or Cloudflare R2) and uploading the final result. This architecture allows horizontal scaling by adding more worker instances. The use of AWS and Azure cloud services is key to implementing this infrastructure in a managed way.

A common mistake is routing video uploads through the web server. This consumes bandwidth, processing power, and can exceed request size limits. The alternative is to use presigned URLs that allow the browser to upload directly to cloud storage. This way, the server only generates the URL and the client performs the upload in parallel, with progress control. This pattern is a good practice in custom software for applications that handle large volumes of data.

BullMQ manages the job queue and concurrency. By adding all videos to the queue at once, workers start processing them as they become available. Concurrency configuration depends on server resources, especially CPU and memory, since FFmpeg is very intensive. Additionally, BullMQ offers automatic retries on failures, increasing system robustness. To monitor performance, business intelligence services like Power BI can be integrated, allowing visualization of processing times, error rates, and bottlenecks. Q2BSTUDIO offers business intelligence consulting to optimize these processes.

Audio-to-text transcription is one of the most demanding stages. Models like Whisper, from OpenAI, offer over 95% accuracy under optimal conditions. However, audio quality can degrade the result. It is important to set realistic expectations and, if necessary, apply preprocessing techniques. Artificial intelligence for businesses has become a key enabler for automating tasks that previously required manual intervention. AI agents can manage complete workflows, from transcription to metadata generation. At Q2BSTUDIO, we develop AI solutions for businesses that integrate language and vision models to enhance content processing applications.

One of the main lessons is the importance of measuring the time of each pipeline stage (transcription, silence removal, rendering, etc.) to identify bottlenecks. Storing this data in a database allows adjusting configuration and planning capacity. It is also crucial to test each FFmpeg operation separately before chaining them, as complex filters can produce unexpected results. Cybersecurity should not be neglected: presigned URLs must have expiration, data at rest must be encrypted, and communications must be protected via HTTPS. Q2BSTUDIO offers cybersecurity and pentesting services to ensure applications meet the most demanding standards.

The result of implementing a parallel video pipeline is a drastic reduction in processing times, going from hours to minutes for batches of dozens of files. This architecture is applicable not only to video editing but to any workflow requiring intensive parallel data processing. If your organization needs to develop a similar solution, Q2BSTUDIO offers consulting and development of custom software, integrating cloud technologies, artificial intelligence, and business analytics. Contact us to transform your processes and take them to the next level.

A BREAK?

Play for a moment before you go

OUR SERVICES

How we can help you

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.