ffmpeg
The atago project wrote these specs on its own initiative and runs them in its own CI, to exercise atago against a real program. They are not ffmpeg’s official test suite, and the ffmpeg project is not affiliated with atago.
Summary #
2 suites · 7 scenarios
Contents #
- ffmpeg + changes (single-artifact encode) — 1 scenario
- ffmpeg / ffprobe (media pipeline) — 6 scenarios
ffmpeg + changes (single-artifact encode) #
Source: test/e2e/thirdparty/ffmpeg/changes.atago.yaml
Scenario: lavfi source encodes exactly one output file #
only when ffmpeg -version succeeds
When #
ffmpeg -v error -f lavfi -i testsrc=duration=0.1:size=64x64 -y out.mp4
Then #
- exit code is
0 - the step changed exactly created
out.mp4, modified nothing, deleted nothing
ffmpeg / ffprobe (media pipeline) #
Source: test/e2e/thirdparty/ffmpeg/ffmpeg.atago.yaml
Scenario: lavfi synthesizes a video file #
only when ffmpeg -version succeeds
When #
ffmpeg -v error -f lavfi -i testsrc=duration=1:size=320x240:rate=10 out.mp4
Then #
- exit code is
0 - file
out.mp4exists
Generated artifacts #
out.mp4
Scenario: ffprobe exposes the stream JSON contract #
only when ffmpeg -version succeeds
When #
ffmpeg -v error -f lavfi -i testsrc=duration=1:size=320x240:rate=10 out.mp4
ffprobe -v error -print_format json -show_streams out.mp4
Then #
- after
ffmpeg -v error -f lavfi -i testsrc=duration=1:size=320x240:rate=10 out.mp4:- exit code is
0
- exit code is
- after
ffprobe -v error -print_format json -show_streams out.mp4:- exit code is
0 - stdout at
$.streams[0].widthequals320 - stdout at
$.streams[0].heightequals240 - stdout at
$.streams[0].codec_typeequalsvideo - stdout at
$.streamshas length 1
- exit code is
Scenario: extracted frames are the right image and deterministic #
only when ffmpeg -version succeeds
When #
ffmpeg -v error -f lavfi -i testsrc=duration=1:size=320x240:rate=10 out.mp4
ffmpeg -v error -i out.mp4 -frames:v 1 frame.png
ffmpeg -v error -i out.mp4 -frames:v 1 frame2.png
Then #
- after
ffmpeg -v error -f lavfi -i testsrc=duration=1:size=320x240:rate=10 out.mp4:- exit code is
0
- exit code is
- after
ffmpeg -v error -i out.mp4 -frames:v 1 frame.png:- exit code is
0 - image
frame.pngispng, width 320 - image
frame.pngheight 240
- exit code is
- after
ffmpeg -v error -i out.mp4 -frames:v 1 frame2.png:- exit code is
0 - image
frame2.pngsimilar to${workdir}/frame.png
- exit code is
Generated artifacts #
frame.pngframe2.png
Scenario: transcode to webm and re-probe the codec #
only when ffmpeg -version succeeds
When #
ffmpeg -v error -f lavfi -i testsrc=duration=1:size=320x240:rate=10 out.mp4
ffmpeg -v error -i out.mp4 -c:v libvpx-vp9 -b:v 100k out.webm
ffprobe -v error -print_format json -show_streams out.webm
Then #
- after
ffmpeg -v error -f lavfi -i testsrc=duration=1:size=320x240:rate=10 out.mp4:- exit code is
0
- exit code is
- after
ffmpeg -v error -i out.mp4 -c:v libvpx-vp9 -b:v 100k out.webm:- exit code is
0 - file
out.webmexists
- exit code is
- after
ffprobe -v error -print_format json -show_streams out.webm:- exit code is
0 - stdout at
$.streams[0].codec_nameequalsvp9
- exit code is
Generated artifacts #
out.webm
Scenario: a missing input file fails with a not-found error #
only when ffmpeg -version succeeds
When #
ffmpeg -v error -i no_such_input.mp4 out.mp4
Then #
- exit code is one of
1,254 - stderr contains
No such file or directory
Scenario: ffprobe on non-media data reports invalid input #
only when ffmpeg -version succeeds
Given #
- Fixture file
corrupt.mp4is created.
When #
ffprobe -v error corrupt.mp4
Then #
- exit code is one of
1,254 - stderr contains
Invalid data