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

How can one stub ffmpeg #999

Open
1 of 3 tasks
gmbwa opened this issue Apr 20, 2020 · 0 comments
Open
1 of 3 tasks

How can one stub ffmpeg #999

gmbwa opened this issue Apr 20, 2020 · 0 comments

Comments

@gmbwa
Copy link

gmbwa commented Apr 20, 2020

How can one stub ffmpeg while testing the function below.

I wanted to test out the a few different scenarios eg.
error,
.on('end'
calling .on('progress' a few times

function resizeMe(url){
      ffmpeg(url)
      .on('end', async (e) => {})
      .on('error', (error) => {})
      .on('progress', (progress) => {})
      .size(size)
      .output(`${filePath}`)
      .run();
}

(note: if the problem only happens with some inputs, include a link to such an input file)

Expected results

Observed results

Checklist

  • I have read the FAQ
  • I tried the same with command line ffmpeg and it works correctly (hint: if the problem also happens this way, this is an ffmpeg problem and you're not reporting it to the right place)
  • I have included full stderr/stdout output from ffmpeg
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