This helps with some obscure edge cases like this:
[libx264 @ 0x648b540] width not divisible by 2 (1045x730)
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
Conversion failed!
The first line which shows the culprit isn’t present in any output generated by playwright-video and DEBUG='pw-video:*'. I had to dig in and make it print the stderr so I can see the real reason.
https://github.com/qawolf/playwright-video/blob/58037692bfbd30c9e1a1a2b011488e1149400499/src/VideoWriter.ts#L48-L61
fluent-ffmpeg
sends thestdout
andstderr
, so our error handler can accept this:This helps with some obscure edge cases like this:
The first line which shows the culprit isn’t present in any output generated by playwright-video and
DEBUG='pw-video:*'
. I had to dig in and make it print the stderr so I can see the real reason.