Changes between Version 1 and Version 2 of Ticket #9759


Ignore:
Timestamp:
May 1, 2022, 2:18:33 AM (4 years ago)
Author:
Randall
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9759 – Description

    v1 v2  
    11Summary of the bug: 
    2   In my code (written in Rust) I'm running an ffmpeg command and checking if stderr contains text.  But when I run a command successfully text is always output to stderr and nothing comes from stdout.  Other command line tools I've used behave normally with regards to stdout and stderr that my code uses, so this appears to be a problem with ffmpeg rather than Rust. 
     2
     3In my code (written in Rust) I'm running an ffmpeg command and checking if stderr contains text.  But when I run a command successfully text is always output to stderr and nothing comes from stdout.  Other command line tools I've used behave normally with regards to stdout and stderr that my code uses, so this appears to be a problem with ffmpeg rather than Rust. 
    34
    45How to reproduce:
    5   I run this command to combine a video and audio file:
     6
     7I run this command to combine a video and audio file:
    68
    79`ffmpeg -i 'bruh_video.mp4' -i 'bruh_audio.mp4' -c:v copy -c:a aac 'bruh.mp4'`
    810
    9  In Rust that code looks like
     11In Rust that code looks like
    1012
    11 ```
     13``
    1214let output =
    1315        Command::new("sh")  //(Command is std::process::Command)
     
    1921    let stdout = String::from_utf8(output.stdout).unwrap();
    2022    let stderr = String::from_utf8(output.stderr).unwrap();
    21 ```
     23``
    2224
    2325The stdout will be empty but stderr will contain all the normal output text.