Coder Social home page Coder Social logo

ffmpeggui's Issues

在编译成exe文件之后,在某些电脑上面会报错

错误: ffmpeg exited with code 1: Conversion failed
错误: ffmpeg exited with code 1: Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height Conversion failed!

请问,视频的转码参数在那个文件

请问,视频的转码参数在那个文件,我想根据需要来更改视频的质量的大小,让用户输入 ffmpeg 命令的形式执行转码操作的这个功能,我没有找到如何使用

Question: How did you get ffmpeg working as a sidecar?

Hi! I am building a Tauri project using ffmpeg. I found your repo which was a great help for me to set it up.

Did you encounter a dyld error like the following?

dyld[48903]: Library not loaded: @loader_path/../lib/libavdevice.60.dylib

  Referenced from: <************************************> /Users/sm/Developer/yt-video-downloader/src-tauri/target/debug/ffmpeg

  Reason: tried: '/Users/sm/Developer/yt-video-downloader/src-tauri/target/debug/../lib/libavdevice.60.dylib' (no such file), 
'/usr/local/lib/libavdevice.60.dylib' (no such file), 
'/usr/lib/libavdevice.60.dylib' (no such file, not in dyld cache)

I set up my tauri ffmpeg sidecar similarly to yours:
src-tauri/tauri.conf.json

{
	"$schema": "../node_modules/@tauri-apps/cli/schema.json",
	...
	"tauri": {
		"allowlist": {
			...
			"shell": {
				"sidecar": true,
				"execute": true,
				"open": true,
				"scope": [
					{
						"name": "bin/ffmpeg",
						"args": true,
						"sidecar": true
					}
				]
			
		},
		"bundle": {
			...
			"externalBin": ["bin/ffmpeg"],
			...
			}
		},
		...
	}
}

where

src-tauri/
├── bin/
│   ├── ffmpeg-aarch64-apple-darwin
│   ├── ffmpeg-x86_64-apple-darwin
│   └── ffmpeg-x86_64-pc-windows-msvc.exe
├── src/
│   └── main.rs
├── tauri.conf.json
└── ...

I am calling it on my rust side using Command which is the different part from yours, but it works same as calling it from JavaScript and the issue is identical if I do it that way too.

#[tauri::command]
async fn merge_video_and_audio(url: String, start: i32, end: i32) -> String {
    ...

    // This works
    // let output = Command::new("ffmpeg").args(&args).output().unwrap();
    
    // But this does not work
    let output = Command::new_sidecar("ffmpeg")
        .expect("why not working bro")
        .args(&args)
        .output()
        .unwrap();
    println!("{}", output.stdout);
    if output.status.success() {
        println!("Message from Rust: Merged");
    } else {
        println!("Message from Rust: Failed to merge");
        println!("{}", output.stderr);
        return format!("Failed");
    }

    ...
}

Do you have any idea?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.