Cap icon indicating copy to clipboard operation
Cap copied to clipboard

Combine Ffmpeg commands into one single command (macOS)

Open richiemcilroy opened this issue 10 months ago • 12 comments

Right now, there are two separate commands for capturing audio and video. They can be found in media.rs located in apps/desktop/src-tauri. I would like to have them combined into one single ffmpeg command to reduce system load when recording.

Requirements

  • Create one single ffmpeg command that takes input from both the audio and video sources, muxing into one .ts file
    • This will probably be done by creating separate named pipes as the input sources
  • Make sure the recording process is still performant after changing

You can use this guide to help you get started developing locally as quickly as possible.

richiemcilroy avatar Apr 11 '24 12:04 richiemcilroy

/bounty $100

richiemcilroy avatar Apr 11 '24 12:04 richiemcilroy

💎 $200 bounty • Cap

Steps to solve:

  1. Start working: Comment /attempt #24 with your implementation plan
  2. Submit work: Create a pull request including /claim #24 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to CapSoftware/Cap!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🔴 @webbdays Apr 11, 2024, 3:11:38 PM WIP
🟢 @Brendonovich Jun 13, 2024, 8:21:35 AM #46

algora-pbc[bot] avatar Apr 11 '24 12:04 algora-pbc[bot]

/attempt

Algora profile Completed bounties Tech Active attempts Options
@webbdays 1 bounty from 1 project
Python, Rust,
JavaScript & more
Cancel attempt

webbdays avatar Apr 11 '24 15:04 webbdays

@richiemcilroy some example usage of the command?

webbdays avatar Apr 11 '24 16:04 webbdays

@webbdays here's a link to where both of the separate commands are located;

https://github.com/CapSoftware/Cap/blob/main/apps/desktop/src-tauri/src/media.rs#L418

richiemcilroy avatar Apr 11 '24 16:04 richiemcilroy

yes, i would like to have idea of using command with both type of inputs.

webbdays avatar Apr 11 '24 17:04 webbdays

@webbdays it's possible but requires the use of fifo named pipes so that ffmpeg can read from the two input sources from one command.

Or if there's an alternative method with a better approach that can also be used.

richiemcilroy avatar Apr 11 '24 17:04 richiemcilroy

ok.

webbdays avatar Apr 11 '24 18:04 webbdays

Currently, i am not full-fledged working on this. others with ideas can attempt this issue.

webbdays avatar Apr 11 '24 18:04 webbdays

Make sure the recording process is still performant after changing

do we have any sort of benchmark to run before and after?

ologbonowiwi avatar Apr 12 '24 21:04 ologbonowiwi

I guess the benchmark is just making sure that the screen capture and microphone recording is being created from a single ffmpeg command instead of two currently

richiemcilroy avatar Apr 13 '24 12:04 richiemcilroy

Where are recordings saved on the dev environment (without S3 enabled)?

Also, do I need a running mysql to run the app locally?

ologbonowiwi avatar Apr 18 '24 17:04 ologbonowiwi

/attempt #24

Options

Brendonovich avatar Jun 13 '24 08:06 Brendonovich

💡 @Brendonovich submitted a pull request that claims the bounty. You can visit your bounty board to reward.

algora-pbc[bot] avatar Jun 13 '24 09:06 algora-pbc[bot]

/bounty $200

richiemcilroy avatar Jul 15 '24 14:07 richiemcilroy

🎉🎈 @Brendonovich has been awarded $200! 🎈🎊

algora-pbc[bot] avatar Jul 16 '24 21:07 algora-pbc[bot]