Skip to content

Feature Request: Allow skipping video/audio inputΒ #10

@mateowoetam

Description

@mateowoetam

Allow skipping video/audio input

Right now the beheader script always requires a video or audio input, even if the user just wants to combine an image with other file types (e.g. PDF, HTML, ZIP, extras).

The usage is currently defined as:

const [output, image, video] = argv.slice(2);
if (!output) printHelpAndExit();

This enforces <video|audio> as a mandatory third argument. Later, the tool always probes and re-encodes it:

const streamProbe = await $`ffprobe ... "${video}"`.quiet();
...
if (isVideo) await $`ffmpeg -i "${video}" ...`;
else await $`ffmpeg -i "${video}" ...`;

That means the tool cannot run without a video/audio file, even if the user only wants to embed other formats.


Proposal

Make the video argument optional, so that beheader can also generate polyglots from just an image + PDF/HTML/ZIP/etc. For example:

const [output, image, video] = argv.slice(2);

if (!output || !image) printHelpAndExit();

if (video) {
  // current ffmpeg/ffprobe path
} else {
  // create a minimal "empty" MP4 container to hold atoms
}

This way, users could run:

beheader out.polyglot cover.png -p doc.pdf -z data.zip

without needing to supply a dummy audio/video file.


Benefits

  • Makes the tool more flexible for users who only want to bundle non-video assets.
  • Removes the need to create placeholder video/audio files for these cases.
  • Still compatible with existing workflows that expect video/audio input.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions