This socket has been ended by the other party
See original GitHub issueEnv: Mac os 10.13.2 Node.js v9.3.0
ffmpeg version 3.4 Copyright © 2000-2017 the FFmpeg developers built with Apple LLVM version 9.0.0 (clang-900.0.37) configuration: --prefix=/usr/local/Cellar/ffmpeg/3.4 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100
//index.js
const puppeteer = require('puppeteer');
// const devices = require('puppeteer/DeviceDescriptors');
// const iPhone = devices['iPhone 6'];
const {record} = require('puppeteer-recorder');
(async () => {
const browser = await puppeteer.launch({headless: true});
let page = await browser.newPage();
page.setViewport({width: 1000, height: 600, deviceScaleFactor: 2});
await page.goto("http://www.goodboydigital.com/pixijs/examples/12-2/");
await record({
browser: browser, // Optional: a puppeteer Browser instance,
page: page, // Optional: a puppeteer Page instance,
output: 'output.webm',
// output: 'output.mp4',
fps: 25,
frames: 25 * 60, // 5 seconds at 60 fps
prepare: function (browser, page){ /* executed before first capture */
},
render: function (browser, page, frame){ /* executed before each capture */
}
});
})()
execute: node index.js output
0|index | You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection:
0|index | Error: This socket has been ended by the other party
0|index | at Socket.writeAfterFIN [as write] (net.js:365:12)
0|index | at Promise (/Users/lock/Documents/screencast/node_modules/puppeteer-recorder/index.js:72:12)
0|index | at new Promise (<anonymous>)
0|index | at write (/Users/lock/Documents/screencast/node_modules/puppeteer-recorder/index.js:71:3)
0|index | at module.exports.record (/Users/lock/Documents/screencast/node_modules/puppeteer-recorder/index.js:44:11)
0|index | at <anonymous>
0|index | at process._tickCallback (internal/process/next_tick.js:160:7)
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (3 by maintainers)
Top GitHub Comments
When I included
recorder({pipeOutput: true})
, ffmpeg was logging “unknown-auto-alt-ref
flag”. That flag is added as a vp8 encoding option. Reinstalling ffmeg with libvpx support worked for me:brew reinstall ffmpeg --with-libvpx --with-libvorbis
That should probably be mentioned in the readme.
Sorry, I’ve been very sick the last week. Getting back to it. I’ll add the information about
libvpx
to the readme. I’ll be pushing several more updates soon also.I’m open to accepting pull requests for documentation or code if you have the time and want to make an improvement!