Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Error: write EPIPE #83

Open
tention opened this issue Jul 10, 2021 · 0 comments
Open

Getting Error: write EPIPE #83

tention opened this issue Jul 10, 2021 · 0 comments

Comments

@tention
Copy link

tention commented Jul 10, 2021

Describe the bug
Trying to generate the thumbnail using a buffer, so what i did was:

  1. Adding faststart so it works on mov and mp4 file
  2. Convert it to Readable before parsing to genThumbnail
  3. The thumbnail was generated at /tmp/test.jpg, however i'm getting following error that terminated my nodejs application.
Error: write EPIPE
    at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:94:16)
done!
✨  Done in 12.80s.

To Reproduce
Code snippet or repository link that reproduces the error:

const ffmpeg = require('ffmpeg-static');
const { faststart } = require('moov-faststart');
const genThumbnail = require('simple-thumbnail');
const { Readable } = require('stream');

          try {
            genThumbnail(Readable.from(faststart(file.buffer)), '/tmp/test.jpg', '150x?', {
              path: ffmpeg.path
            })
              .then(() => console.log('done!'))
              .catch(err => console.error(err));

          } catch (e) {
            console.log(e);
          }

Environment (please complete the following information):

  • OS: MacOS
  • Version (ffmpeg): 4.4

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant