Allow to override ffmpeg path and options#41007
Conversation
|
@microsoft-github-policy-service agree |
d3cf0da to
7cad89a
Compare
7cad89a to
7a34702
Compare
pavelfeldman
left a comment
There was a problem hiding this comment.
I'd rather make it lower level and allow passing ffmpeg properties that would override our defaults.
|
Thanks for the feedback. To make sure I'm building what you have in mind: would |
|
I'd try to mirror what we have for browser launching: https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-ignore-default-args |
That works for me. |
Browsers arsgs are generally used for additional args, which is not override-friendly. I'd use object notation as proposed - ignore-default-args is overall horrible. |
7a34702 to
70c48fe
Compare
|
Updated. So there are two options:
|
70c48fe to
e2a84af
Compare
|
I love the custom `ffmpeg path option. We discussed it at the API review meeting and are thinking that we want to give you full control over the options (both input and output, even though we produce the input), for simplicity. So we are now thinking that { ffmpegExecutable: string, ffmpegOptions: string, fps: number, outputExtension: string } should be sufficient for you to produce any content desired. Sorry for going back and forth on this one. Wdyt? |
Oops. I misclicked, I did not want to open the PR here yet, just on my own fork to trigger the CI. I'll update the description soon with all the details.Sorry for that noise ☝️
I am a contributor of sphinxcontrib-screenshot, which is an extension that takes screenshots and screencasts for integration in Python sphinx documentations. I use it to automatically generate videos and demonstrate reactive behaviors in other apps documentations.
The current static quality settings generate some glitches in the videos, and too much blur. The end quality is not fitting professional documentation, so I opened this PR to add quality customization parameters that are passed to ffmpeg. I evoked this in #17217
This PR adds an optional field to
recordVideoto control ffmpeg encoding quality:mode: 'crf'— constant rate factor (constant visual quality, variable file size).valueis an integer between 0 (lossless) and 63 (worst).mode: 'bitrate'— target bitrate (variable visual quality, predictable file size).valueis in bits per second.When
qualityis omitted, the ffmpeg command line stays identical to today. The tests just check that the command run. I am not really sure how to check deterministically which quality parameters were passed from the output video.Let me know if the quality tweaking seems right but the implementation feel wrong, and I will update the PR.
Regards
related to to #22257