Skip to content

Commit

Permalink
fix(ff): use fixed inputFPS instead of vfr to prevent dropped f… (#6368)
Browse files Browse the repository at this point in the history
* fix(ff): use fixed inputFPS instead of vfr to prevent dropped frames
  • Loading branch information
kuceb committed Feb 7, 2020
1 parent 434d23b commit b5c2120
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/server/lib/video_capture.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,19 @@ module.exports = {
if (options.webmInput) {
cmd
.inputFormat('webm')
.outputOption('-vsync vfr')

// assume 18 fps. This number comes from manual measurement of avg fps coming from firefox.
// TODO: replace this with the 'vfr' option below when dropped frames issue is fixed.
.inputFPS(18)

// 'vsync vfr' (variable framerate) works perfectly but fails on top page navigation
// since video timestamp resets to 0, timestamps already written will be dropped
// .outputOption('-vsync vfr')

// this is to prevent the error "invalid data input" error
// when input frames have an odd resolution
.videoFilters(`crop='floor(in_w/2)*2:floor(in_h/2)*2'`)

// same as above but scales instead of crops
// .videoFilters("scale=trunc(iw/2)*2:trunc(ih/2)*2")
} else {
Expand Down

2 comments on commit b5c2120

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on b5c2120 Feb 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.

You will need to use custom CYPRESS_INSTALL_BINARY url and install Cypress using an url instead of the version.

export CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/4.0.0/linux-x64/circle-develop-b5c21205d80953b11812135c15c20bbee0cf0373-248764/cypress.zip
npm install https://cdn.cypress.io/beta/npm/4.0.0/circle-develop-b5c21205d80953b11812135c15c20bbee0cf0373-248750/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on b5c2120 Feb 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.

You will need to use custom CYPRESS_INSTALL_BINARY url and install Cypress using an url instead of the version.

export CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/4.0.0/darwin-x64/circle-develop-b5c21205d80953b11812135c15c20bbee0cf0373-248816/cypress.zip
npm install https://cdn.cypress.io/beta/npm/4.0.0/circle-develop-b5c21205d80953b11812135c15c20bbee0cf0373-248765/cypress.tgz

Please sign in to comment.