Skip to content

Command never ends when being executed in cmd_lib::spawn_with_output #35

Closed
@0x7FFFFFFFFFFFFFFF

Description

@0x7FFFFFFFFFFFFFFF

I have a ffmpeg command to process a video file.

ffmpeg -i 4.mp4 -i a2.png -ss 00:00:00 -to 00:01:00 -y -filter_complex "overlay=x=263:y=752" -c:a copy -max_muxing_queue_size 9999 -nostdin testtttt.mp4

It runs very well when being executed in a terminal. But when I run it with cmd_lib::spawn_with_output, it never ends and the program just stuck there. This is my program.

fn main() -> eyre::Result<()>{
    std::env::set_current_dir(r##"f:\temp"##);

    println!("{:?}", "Starting......");
    let output = cmd_lib::spawn_with_output!(
ffmpeg -i 4.mp4 -i a2.png -ss 00:00:00 -to 00:01:00 -y -filter_complex "overlay=x=263:y=752"  -c:a copy -max_muxing_queue_size 9999 -nostdin testtttt.mp4
    )?.wait_fun_result()?;
    println!("{:?}", "Done!");
    println!("{:?}", output);
    println!("{:?}", output.trim());
    Ok(())
}

Is there something I'm doing wrong? Thanks.

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