screenpipe icon indicating copy to clipboard operation
screenpipe copied to clipboard

Failed to write frame to ffmpeg: Broken pipe (os error 32)

Open louis030195 opened this issue 1 year ago • 11 comments

ERROR screenpipe_server::video] Failed to write frame to ffmpeg: Broken pipe (os error 32)

this is a new error, did not exist last week

gotta look at what changed but this error is nondeterminisitc (e.g. sometime just restart and it works) and affects only the screen video encoding

/bounty 50

louis030195 avatar Aug 26 '24 10:08 louis030195

💎 $100 bounty • Screenpi.pe

Steps to solve:

  1. Start working: Comment /attempt #228 with your implementation plan
  2. Submit work: Create a pull request including /claim #228 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 mediar-ai/screenpipe!

Add a bountyShare on socials

algora-pbc[bot] avatar Aug 26 '24 10:08 algora-pbc[bot]

.

louis030195 avatar Aug 26 '24 12:08 louis030195

Interested about this. Can you describe how to reproduce this error? When this error occurs?

tmahmood avatar Aug 28 '24 09:08 tmahmood

i have no idea

does not happen frequently, seems random

louis030195 avatar Aug 28 '24 12:08 louis030195

Any debug log? Does this happen to fresh install? Is it fatal? I'm seeing many errors about missing files, but have not seen this one.

tmahmood avatar Aug 28 '24 13:08 tmahmood

@tmahmood what do you mean missing files?

did not see anyone complaining about this for 3-4 days so i think you might just look at solving other issues and maybe it will come up

louis030195 avatar Aug 28 '24 16:08 louis030195

Which operating system? It looks like ffmpeg closes its input stream (crashes maybe?) before receiving all the data.

booti386 avatar Aug 28 '24 18:08 booti386

@booti386 saw this on linux (some user) and on my mac once

louis030195 avatar Aug 29 '24 08:08 louis030195

image

louis030195 avatar Sep 05 '24 18:09 louis030195

There's no practical way to debug this because you're not pinning a known ffmpeg version with the application.

For some reason, ffmpeg is closing it's input stream, so that log is being generated.

I could add retry logic so when the input stream is closed it re-creates a new process. But that doesn't exactly solve the root issue here of "It's going to do weird stuff because platform/feature flag/version differences".

MinisculeGirraffe avatar Sep 05 '24 19:09 MinisculeGirraffe

@MinisculeGirraffe probably solving this https://github.com/mediar-ai/screenpipe/issues/194 would be a more long term investment if you want to give a try

louis030195 avatar Sep 05 '24 20:09 louis030195

@louis030195 this is the exact way to fix the error on my macos (fresh install DEC 17)

brew reinstall x265

And that Failed to write frame to ffmpeg: Broken pipe (os error 32) will be completely gone, good luck!

heo001997 avatar Dec 17 '24 03:12 heo001997

brew reinstall x265

Didn't work for me, but brew reinstall ffmpeg did. Also on macos

amori1729 avatar May 28 '25 14:05 amori1729