Skip to content

About

CLI that generates unique abstract test files: exact-size 1920×1080 PNG images, A4 PDFs, and H.264 MP4 videos, singly or in batches. Handy for testing uploads and storage.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dummy-artifact

dummy-artifact generates unique abstract image, video, and PDF artifacts. Images are 1920×1080 PNGs padded to an exact size. PDFs are exact-size, one-page A4 documents. Videos are silent 1920×1080, 30 fps H.264 MP4s with animated artwork and an optional approximate size target.

Build

go build -o dummy-artifact .

Images

./dummy-artifact --size 25 --output sample.png

Generate ten 3 MB images:

./dummy-artifact batch --count 10 --size 3 --output ./images

Generate five images distributed from 1 MB through 5 MB:

./dummy-artifact batch --count 5 --min-size 1 --max-size 5 --output ./images

Batch files are numbered and include their size, for example image-1-3mb.png. Use --prefix to replace the default image filename prefix. If the count and range do not map one-to-one, sizes are evenly distributed and rounded to the nearest whole MB while preserving both endpoints.

Batch generation is sequential by default. Use --workers to generate multiple artifacts concurrently, for example:

./dummy-artifact batch --count 20 --size 3 --workers 4 --output ./images

Worker counts must be between 1 and 256. Output messages remain ordered by file number. Higher values increase CPU, memory, and (for videos) ffmpeg usage.

The --size value accepts decimals and uses binary megabytes (1 MB = 1,048,576 bytes), so --size 0.5 creates a 524,288-byte image. Targets are rounded to the nearest byte. Small PNG targets automatically use a reduced lossless color palette while retaining 1920×1080 dimensions. Targets smaller than the reduced base image return an error. Padding is streamed in bounded 1 MiB chunks.

Videos

Video generation requires ffmpeg to be installed and available on PATH. Generate a two-minute video:

./dummy-artifact --type video --duration 120 --output sample.mp4

Generate a two-minute video targeting approximately 10 MB:

./dummy-artifact --type video --duration 120 --size 10 --output sample.mp4

--duration uses whole seconds and can be used alone. A video --size accepts decimal MB values and always requires a duration. Video sizes use two-pass bitrate targeting and are best effort; the command reports the actual byte count without padding the MP4.

Generate ten videos with the same duration and approximate size:

./dummy-artifact batch --type video --count 10 --duration 30 --size 5 --output ./videos

Distribute approximate sizes while keeping duration fixed:

./dummy-artifact batch --type video --count 5 --duration 30 --min-size 1 --max-size 5 --output ./videos

Distribute durations while keeping size fixed:

./dummy-artifact batch --type video --count 5 --size 5 --min-duration 10 --max-duration 50 --output ./videos

Duration ranges can also be used without a size target. Size and duration ranges cannot be supplied together. Batch values are evenly distributed, rounded to whole units, and preserve both requested endpoints.

PDFs

Generate an exact 1 MB, one-page A4 PDF containing labeled abstract artwork:

./dummy-artifact --type pdf --size 1 --output sample.pdf

Generate ten 3 MB PDFs:

./dummy-artifact batch --type pdf --count 10 --size 3 --output ./pdfs

Generate five PDFs distributed from 1 MB through 5 MB:

./dummy-artifact batch --type pdf --count 5 --min-size 1 --max-size 5 --output ./pdfs

PDF sizes accept decimal binary megabytes, are rounded to the nearest byte, and are exact. Batch files are numbered and include their size, for example pdf-1-0.5mb.pdf; --prefix overrides the default pdf prefix. PDF generation is self-contained and does not require an external PDF tool.

About

CLI that generates unique abstract test files: exact-size 1920×1080 PNG images, A4 PDFs, and H.264 MP4 videos, singly or in batches. Handy for testing uploads and storage.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages