{"record":{"id":"6b6af85600d52de7","repo":"tonhowtf/omniget","slug":"ffmpeg-merge-falhou-com-status","errorCode":null,"errorMessage":"FFmpeg merge falhou com status {}","messagePattern":"FFmpeg merge falhou com status (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/media_processor.rs","lineNumber":91,"sourceCode":"        if !status.success() {\n            anyhow::bail!(\"FFmpeg remux falhou com status {}\", status);\n        }\n\n        Ok(())\n    }\n\n    pub async fn merge_audio_video(video: &str, audio: &str, output: &str) -> anyhow::Result<()> {\n        let status = crate::core::process::command(\"ffmpeg\")\n            .args([\n                \"-y\", \"-i\", video, \"-i\", audio, \"-map\", \"0:v\", \"-map\", \"1:a\", \"-c\", \"copy\", output,\n            ])\n            .stdout(std::process::Stdio::null())\n            .stderr(std::process::Stdio::piped())\n            .status()\n            .await?;\n\n        if !status.success() {\n            anyhow::bail!(\"FFmpeg merge falhou com status {}\", status);\n        }\n\n        Ok(())\n    }\n\n    pub async fn download_direct(\n        url: &str,\n        output: &str,\n        headers: &[(&str, &str)],\n    ) -> anyhow::Result<()> {\n        let mut args = vec![\"-y\".to_string()];\n\n        if !headers.is_empty() {\n            let header_str: String = headers\n                .iter()\n                .map(|(k, v)| format!(\"{}: {}\\r\\n\", k, v))\n                .collect();\n            args.extend([\"-headers\".to_string(), header_str]);","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/media_processor.rs#L73-L109","documentation":"FFmpeg wrapper failure in merge_audio_video: the '-map 0:v -map 1:a -c copy' merge of separate video and audio files exited non-zero, meaning the streams could not be muxed (e.g. incompatible codecs, missing stream, or unreadable input).","triggerScenarios":"Thrown at src-tauri/omniget-core/src/core/media_processor.rs:91 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Confirm both input files exist and are fully written before merging","Capture ffmpeg stderr to identify which stream failed","Fall back to re-encoding one stream if codec compatibility is the issue"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}