Skip to content

libobs: Add handling for obs-ffmpeg-mux standard error output on POSIX systems - #10070

Merged
Lain-B merged 1 commit into
obsproject:masterfrom
PatTheMav:posix-ffmpeg-mux-stderr
Jan 14, 2024
Merged

Lain-B merged 1 commit into
obsproject:masterfrom
PatTheMav:posix-ffmpeg-mux-stderr

Conversation

@PatTheMav

Copy link
Copy Markdown
Member

Description

Adds support for standard error output from subprocesses spawned on POSIX systems, specifically for obs-ffmpeg-mux.

Updates and supersedes #3459.

Motivation and Context

obs-ffmpeg-mux provides error messages that are ignored by the main application right now because of lack of support for the standard error output stream. The original PR added the necessary code to handle all required input and output streams, including the standard error output.

How Has This Been Tested?

Tested on macOS 14.2.1 with modified obs-ffmpeg-mux to fail early with an error message and checked that the return code as well as the error message was successfully displayed in the log.

Types of changes

  • Tweak (non-breaking change to improve existing functionality)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@PatTheMav PatTheMav added platform/macos Categorizes issue or PR as affecting macOS specifically platform/linux Categorizes issue or PR as affecting Linux specifically labels Jan 3, 2024
@eric

eric commented Jan 3, 2024

Copy link
Copy Markdown
Contributor

Thanks for taking this over

@kkartaltepe kkartaltepe self-assigned this Jan 4, 2024
Transition from using popen() to using fork()/dup2()/execl() to provide
a way to read stderr from ffmpeg.

Co-Authored by: PatTheMav <[email protected]>
@PatTheMav

Copy link
Copy Markdown
Member Author

@kkartaltepe Did you have a chance to check this out?

@kkartaltepe

Copy link
Copy Markdown
Collaborator

I just wanted to test it some on my system, the code all seemed fine to me (but im not familiar with posix_spawn limitations).

Comment thread libobs/util/pipe-posix.c Resolved
@Lain-B
Lain-B merged commit 71d963a into obsproject:master Jan 14, 2024
@PatTheMav
PatTheMav deleted the posix-ffmpeg-mux-stderr branch January 16, 2024 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform/linux Categorizes issue or PR as affecting Linux specifically platform/macos Categorizes issue or PR as affecting macOS specifically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants