
Q-bits: Easy video editing with Q Developer command line
This blog post explores how Amazon Q Developer for command line can simplify working with CLI tools such as ffmpeg
Kawsar
Amazon Employee
Published Apr 9, 2025
Last Modified Apr 12, 2025
Welcome to another installment of Q-Bits, our regular series showcasing cool ways Amazon employees are leveraging Amazon Q Developer. Today, we're diving into how Q Developer can assist with a popular command line tool called ffmpeg.
You can use Amazon Q Developer to enable completions for many command line tools such as like git, docker, and aws. This week I had to upload a video recording to our wiki, but due to a dropped call, the video was in two segments. I decided to try Amazon Q Developer with a popular video editing tool called ffmpeg. In this blog post, I will show you how you can use NLP to carry out some common video editing tasks quickly. I will also show where you may need to rely on more specialized software beyond the command line.
Pre-requisites: I assume that you already have Q-Developer for command line installed. Make sure that you have already completed the authentication workflow using q login. Then use q chat to start your session. Fo each of the prompts below, Q Developer first describes what it will do, synthesizes the command, then executes it. You can use the use the
/tools trustall
(or /acceptall in the old version) command to bypass typing y
every time - use carefully as it can make system or code changes.First I needed to combine the two parts, and cut out portions of the recording around the time the meeting dropped, and at the end of the recording when there was some silence.
Prompt: Merge the two mp4 recordings to into one mp4 file using ffmpeg.
Q Developer proceeded to first install ffmpeg on my Mac using brew ran a long ffmpeg command to combine the files.
Prompt: Splice and cut the following segment out from the merged file: 24:01 to 24:37. Show progress while the command runs.
With this prompt, it extracted the small segment as a separated file which is not what I intended. I revised my prompt as below, which produced the correct behavior. This highlights the interactive nature of working with Q Developer command line.
Revised prompt: I meant that remove the segment from the merged file. The final output should contain the entire video minus the above time slot.
Prompt: Now can you remove the portion 1:20:21 to the end of the final video?
It followed a similar process as the previous task:
Prompt: I want to you to blur a portion of the directory path from a demo from 20:50 to 23:30.
Hiccup: Here Q developer acknowledged that this is a complex task and said it needs the coordinates and size of the box to blur. It extracted three sample frames from the specified segment that I can inspect in another tool (such as preview) to provide the information. I did supply the blurring coordinates and size of the box but the final ffmpeg command was stuck (or just taking a long time).
I switched to a visual video editing tool to blur multiple segments. However this process actually left the video file size quite large. I wanted to compress it for easier video upload and transcoding.
Prompt: In the trimmed video, I have a demo from 20:50 to 23:30. Can you remove some frames in this segment to make the demo go faster? Save the file under a new name
The 70% optimization was impressive. I opened the file and really could not tell much of a difference in the video, even in my large monitor! Finally, I used Q Developer command line to help me upload the video file to S3 using the AWS CLI.
In this post we reviewed a use-case for Q Developer to speed up tasks with a popular video editing command line tool called ffmpeg. Whether you are using tools within your SDLC, building an application, or have a one-off task such as video editing, Q developer can really help you save time and mental energy. You can use for other high-value tasks such as going for a walk.
Any opinions in this post are those of the individual author and may not reflect the opinions of AWS.