Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Run puppeteer and ffmpeg inside docker container #1
base: main
Are you sure you want to change the base?
Run puppeteer and ffmpeg inside docker container #1
Changes from 2 commits
a82a1fa
3ed09bf
2168dd6
132aae6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You covered 2/3 of the recommendations the Docker gives about the usage of
apt-get
.Could you add
&& rm -rf /var/lib/apt/lists/*
at the end as well?It should do nothing except reduce image size.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why
host
for the network?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question here! (There isn't a good emoji to express this sentiment on GitHub 😆)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are specifying 30 fps as a target frame rate both here and on line 73 - but on line 73, it is very implicitly encoded as the result of 1000/30.
Could you define a constant and reuse it everywhere? I am sorry if this causes weird floating point issues.
This does look very easy to overlook if the next programmer just does a "CTRL-F" for "30".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed that part of the code already and will ask for a review in another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(This regards line 73, which GitHub won't let me select :()
setInterval
?setTimeout
orsetInterval
in a variable which is then cleared when the function exits - otherwise I am not sure if this doesn't causecaptureFrame
to continuously execute even after theffmpeg
process has exited.If this becomes an issue at any point, it might make sense to use a more specific method like
lodash
's debounce/throttle orrequestAnimationFrame
, but I leave this to your judgement.Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.