-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
ffmpeg: Error initializing output stream: Error while opening encoder for output stream: width not divisible by 2 #3491
ffmpeg: Error initializing output stream: Error while opening encoder for output stream: width not divisible by 2 #3491
Comments
Supposedly it happens when screen size (particularly height) is less than or equal to requested browser size (1280x720).
|
Hey @x-yuri, could you provide an example of a failing test file? Are you setting the size using |
// see original post
describe('My First Test', function() {
it('Visits the Kitchen Sink', function() {
cy.visit('https://example.cypress.io')
})
}) I'm not using |
I am using |
@narinepoghosyan The answer was in one of the previous posts, but to add more details, you've got to change
Add
or
after
Or make resolution bigger than |
As you might see, I've found a way to reproduce it without screen.width == real_screen_width - 1
screen.height == real_screen_height - 1 But I wonder if it's okay to demand a window to fit the screen. Generally that is not possible, since there usually exist some sort of a taskbar. |
Solved by adding |
Indeed with |
This issue may also come if you switch hardware screens. Removing the old file does the trick. |
Which old file? I am currently facing this issue running specs with MS Edge. |
The video file created by running cypress and tests, should be from the top of my head in this path |
We just saw this error popping up in our cypress tests after upgrading to chrome |
How did you specify the version? Through cypress/browsers or did you download it from google directly? |
We do not use cypress/browsers for this since we use centos as our linux distribution for all Docker images. So yes, we download it directly from google via the following link:
If you need a different version, just take a look at this stackexchange answer on how to get the version you might need. |
Thank you @Spea , we use linux and deb images for chrome. I've read that google doesn't share the older version download links so it is pretty hard to figure them out. In case someone need the debian file for Chrome version 88:
|
The code for this is done in cypress-io/cypress#15295, but has yet to be released. |
Thanks maintainers for moving so quickly on this! Do you have a target release date for this fix? |
@nickbreid The next release is awaiting some specific feature work, so it will go out as soon as possible - this is off from our normal release schedule. |
@jennifer-shehane It looks like Azure DevOps have just upgraded their images to now ship with Chrome v89, which means video recordings are failing for all tests. We've just upgraded to Cypress Dashboard so no videos is a bit of a bummer. Do you have an estimate release date at this time? |
I'm running into this issue as well in GitHub Actions (which presumably uses the same images as Azure). For anyone running into this issue using GitHub Actions, you can use the Cypress Chrome 87 container to mitigate until Chrome 89 works: jobs:
job:
runs-on: ubuntu-latest
container: cypress/browsers:node12.18.3-chrome87-ff82 Seeing this issue I'd probably recommend pegging your workflow to a specific container/image to prevent this issue from happening in the future and periodically upgrade the container in the workflow. |
Starting seeing this in our github actions with 89 :(
Error: ffmpeg exited with code 1: Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height |
If you don't actually need the video, here's a potential workaround for anyone dealing with this error: Go into your cypress |
Sorry for the delay everyone. We're working on getting a release out today, been some extra juggling of feature work. 🤞 |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior:
Tests doesn't run without the GUI because of the error with video capture.
Desired behavior:
Tests run.
And by the way, isn't it supposed to run all the tests even if it can't record the video?
Steps to reproduce: (app code and test code)
Run the following test without GUI:
If your screen resolution is greater than 1280x720. Otherwise:
electron
bug: Screen dimensions are off by one pixel in offscreen mode.Workarounds
Add
.outputOptions("-vf pad=ceil(iw/2)*2:ceil(ih/2)*2")
after the following line. Based on the following Stack Overflow answer. This fixes it for me.Or probably
.videoFilter('pad=ceil(iw/2)*2:ceil(ih/2)*2')
.Versions
cypress-3.1.4
, Arch Linux, Electron 59 (headless)The text was updated successfully, but these errors were encountered: