43 tasks from the deft benchmark. Each shows the task, the deft command, the input and the output, made by running that command. Subtitle tracks that can be switched off need a player such as VLC or QuickTime.
audio
Reduce background noise Checks passed
Reduce the background noise in example.ogg and save it as clean.mp3.
deft audio denoise example.ogg -o clean.mp3
Input
example.ogg102 KB · vorbis, 6.1s
Output
clean.mp396 KB · mp3, 6.1s
Automatic checks, and Codex
type = "format"; file = "clean.mp3"; format = "mp3"
1
00:00:00,500 --> 00:00:03,000
A quiet morning in the forest
2
00:00:03,500 --> 00:00:06,000
The big bunny wakes up
3
00:00:06,500 --> 00:00:09,500
Something is about to happen
Automatic checks, and Codex
type = "text"; file = "subs.srt"; contains = ["The big bunny wakes up", "-->"]
Codex with deft: passed. Without deft: passed.
Fix subtitles that are out of sync Checks passed
The subtitles in talk.srt appear 2 seconds too early. Save a fixed copy as fixed.srt.
deft subtitle shift talk.srt --by 2 -o fixed.srt
Input
talk.srt0 KB
1
00:00:00,500 --> 00:00:03,000
A quiet morning in the forest
2
00:00:03,500 --> 00:00:06,000
The big bunny wakes up
3
00:00:06,500 --> 00:00:09,500
Something is about to happen
Output
fixed.srt0 KB
1
00:00:02,500 --> 00:00:05,000
A quiet morning in the forest
2
00:00:05,500 --> 00:00:08,000
The big bunny wakes up
3
00:00:08,500 --> 00:00:11,500
Something is about to happen
1
00:00:00,500 --> 00:00:03,000
A quiet morning in the forest
2
00:00:03,500 --> 00:00:06,000
The big bunny wakes up
3
00:00:06,500 --> 00:00:09,500
Something is about to happen
Output
talk.vtt0 KB
WEBVTT
00:00:00.500 --> 00:00:03.000
A quiet morning in the forest
00:00:03.500 --> 00:00:06.000
The big bunny wakes up
00:00:06.500 --> 00:00:09.500
Something is about to happen
Automatic checks, and Codex
type = "text"; file = "talk.vtt"; contains = ["WEBVTT", "00:00:03.500 --> 00:00:06.000", "The big bunny wakes up"]
Codex with deft: passed. Without deft: passed.
Subtitles to a plain transcript Checks passed
Turn talk.srt into a plain text transcript with no timestamps, as transcript.txt.
deft subtitle convert talk.srt -o transcript.txt
Input
talk.srt0 KB
1
00:00:00,500 --> 00:00:03,000
A quiet morning in the forest
2
00:00:03,500 --> 00:00:06,000
The big bunny wakes up
3
00:00:06,500 --> 00:00:09,500
Something is about to happen
Output
transcript.txt0 KB
A quiet morning in the forest The big bunny wakes up Something is about to happen
Automatic checks, and Codex
type = "text"; file = "transcript.txt"; contains = ["A quiet morning in the forest", "Something is about to happen"]; absent = ["-->", "00:00"]
Codex with deft: passed. Without deft: passed.
video
Add a soundtrack Checks passed
Replace the sound of movie.mp4 with music.mp3 and save it as scored.mp4.
deft video add-audio movie.mp4 --audio music.mp3 -o scored.mp4
Burn the subtitles from talk.srt into bunny.mp4 so they are always visible. Save it as subbed.mp4.
deft video add-subtitles bunny.mp4 --subtitles talk.srt -o subbed.mp4
Input
bunny.mp4946 KB · h264 1280x720, 10.0s
talk.srt0 KB
1
00:00:00,500 --> 00:00:03,000
A quiet morning in the forest
2
00:00:03,500 --> 00:00:06,000
The big bunny wakes up
3
00:00:06,500 --> 00:00:09,500
Something is about to happen
Add a subtitle track viewers can switch off Checks passed
Add talk.srt to bunny.mp4 as a subtitle track that viewers can turn on and off. Do not re-encode the video. Save it as soft.mp4.
deft video add-subtitles bunny.mp4 --subtitles talk.srt --soft -o soft.mp4
Input
bunny.mp4946 KB · h264 1280x720, 10.0s
talk.srt0 KB
1
00:00:00,500 --> 00:00:03,000
A quiet morning in the forest
2
00:00:03,500 --> 00:00:06,000
The big bunny wakes up
3
00:00:06,500 --> 00:00:09,500
Something is about to happen
shaky.mp4 was filmed by hand. Stabilize it and save it as steady.mp4.
deft video stabilize shaky.mp4 -o steady.mp4
Input
shaky.mp43.5 MB · h264 1280x720, 10.0s
Output
steady.mp41.6 MB · h264 1280x720, 10.0s
Automatic checks, and Codex
type = "media"; file = "steady.mp4"; has_video = true
type = "python"; code = """; import re, subprocess; out = subprocess.run(['ffmpeg', '-i', 'steady.mp4', '-vf', 'tblend=all_mode=difference,signalstats,metadata=print:key=lavfi.signalstats.YAVG:file=-', '-f', 'null', '-'], capture_output=True, text=True).stdout; change = [float(v) for v in re.findall(r'YAVG=([0-9.]+)', out)]; assert sum(change) / len(change) < 6, 'the picture still shakes'; """
Codex with deft: not run. Without deft: not run.
Poster image Checks passed
Make a poster image poster.jpg for bunny.mp4 from the frame at 5 seconds.
deft video thumbnail bunny.mp4 --at 5 -o poster.jpg
Input
bunny.mp4946 KB · h264 1280x720, 10.0s
Output
poster.jpg101 KB
Automatic checks, and Codex
type = "image"; file = "poster.jpg"; format = "JPEG"
Codex with deft: not run. Without deft: not run.
Cut a clip Checks passed
Cut seconds 2 to 5 out of bunny.mp4 and save them as clip.mp4.
deft video split bunny.mp4 --from 2 --to-time 5 -o clip.mp4