tonhowtf/omniget · error

ffmpeg nao converteu o video: {}

Error message

ffmpeg nao converteu o video: {}

What it means

download_video in the Pinterest tool shells out to ffmpeg to transcode/mux the downloaded media into the final video file. If the ffmpeg child process exits with a non-zero status, the error wraps the last line of ffmpeg's stderr, which is where ffmpeg prints its final fatal diagnostic. This means the media was downloaded but post-processing failed, so no usable output video exists.

Solutions

  1. Read the wrapped stderr tail in the message — it names the exact ffmpeg failure (codec, I/O, or argument error)
  2. Re-run the download to rule out a truncated/corrupt intermediate download
  3. Verify the installed ffmpeg supports the required codecs (ffmpeg -encoders | grep -E 'libx264|aac')
  4. Check disk space and write permissions on the destination directory
  5. Update ffmpeg to a full build (e.g. from a static build) if a codec is missing

Example fix

// before: assuming ffmpeg handles any input
.output().await?;
// after: probe the file / check tool first, and surface full stderr
let ffmpeg = crate::core::dependencies::find_tool("ffmpeg").await
    .ok_or_else(|| anyhow!("ffmpeg não encontrado"))?;
if !o.status.success() {
    let err = String::from_utf8_lossy(&o.stderr);
    return Err(anyhow!("ffmpeg nao converteu o video: {}", err));
}
Defensive patterns

Strategy: try-catch

Validate before calling

if crate::core::dependencies::find_tool("ffmpeg").await.is_none() {
    return Err(anyhow!("ffmpeg não disponível"));
}

Try / catch

match download_pin(&opts).await {
    Err(e) if e.to_string().contains("ffmpeg nao converteu") => {
        eprintln!("falha na conversão: {e}. verifique codecs/disco e tente de novo");
    }
    Err(e) => eprintln!("erro: {e}"),
    Ok(files) => println!("ok: {:?}", files),
}

Prevention

When it happens

Trigger: Calling download_pin (which calls download_video) when ffmpeg cannot decode the downloaded stream (corrupt/partial download, unsupported codec/container), when the output path is unwritable, or when incompatible/invalid ffmpeg args are used.

Common situations: ffmpeg not compiled with the needed codec (e.g. missing libx264 or AAC encoder), disk full, output file locked by another process, or the pinned video URL returned an HTML error page instead of media that ffmpeg then chokes on.

Understand the failure class

Background: "git command failed": what it means when a tool shells out to git and git exits non-zero — this error's family across 21 libraries.

Related errors


AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12). Data as JSON: /api/errors/f38610cc9a576a0e. Report an issue: GitHub.

Appendix: source

Thrown at src-tauri/omniget-core/src/core/tools/pinterest/media.rs:257

            "-headers",
            "Referer: https://www.pinterest.com/\r\n",
            "-protocol_whitelist",
            "file,http,https,tcp,tls,crypto",
            "-i",
            hls,
            "-c",
            "copy",
            "-bsf:a",
            "aac_adtstoasc",
            "-movflags",
            "+faststart",
        ])
        .arg(out)
        .output()
        .await?;
    if !o.status.success() {
        let err = String::from_utf8_lossy(&o.stderr);
        return Err(anyhow!(
            "ffmpeg nao converteu o video: {}",
            err.lines().last().unwrap_or("").trim()
        ));
    }
    Ok(())
}

/// Baixa tudo de um pin para `dir`. Devolve os caminhos gravados.
pub async fn download_pin(
    client: &PinClient,
    pin: &Pin,
    dir: &Path,
    opts: &DownloadOptions,
) -> anyhow::Result<Vec<String>> {
    let base = base_name(pin, &opts.naming);
    let mut files = Vec::new();

    let save_image =

View on GitHub (pinned to 8600b91f42)