Skip to content
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

RuntimeError with ffmpeg and timeout #29

Open
zuisho-1848-o opened this issue May 4, 2023 · 2 comments
Open

RuntimeError with ffmpeg and timeout #29

zuisho-1848-o opened this issue May 4, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@zuisho-1848-o
Copy link

Environments

  • OS name: MacBookPro Ventrura 13.2.1, Intel Core i5 2GHz
  • Scene.js Component Version: "@scenejs/recorder": "^0.15.0", "@scenejs/render": "^0.15.2"
  • Component Name (Render, Recorder): Render

Description

I tried this command.

npx @scenejs/render -i index.html --name scene -h 720 -w 1280 -d 3 -o out.mp4

The error was here.

Start Render

  Puppeteer old Headless deprecation warning:
    In the near feature `headless: true` will default to the new Headless mode
    for Chrome instead of the old Headless implementation. For more
    information, please see https://developer.chrome.com/articles/new-headless/.
    Consider opting in early by passing `headless: "new"` to `puppeteer.launch()`
    If you encounter any bugs, please report them to https://github.com/puppeteer/puppeteer/issues/new/choose.

(node:37097) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
/path/to/node_modules/@ffmpeg/core/dist/ffmpeg-core.js:12
if(l){ra=oa?require("path").dirname(ra)+"/":__dirname+"/";ta=function(a,b){wa||(wa=require("fs"));xa||(xa=require("path"));a=xa.normalize(a);return wa.readFileSync(a,b?null:"utf8")};va=function(a){a=ta(a,!0);a.buffer||(a=new Uint8Array(a));assert(a.buffer);return a};1<process.argv.length&&(ka=process.argv[1].replace(/\\/g,"/"));ja=process.argv.slice(2);process.on("uncaughtException",function(a){if(!(a instanceof ca))throw a;});process.on("unhandledRejection",u);la=function(a){process.exit(a)};f.inspect=
                                                                                                                                                                                                                                                                                                                                                                                                                                    ^

RuntimeError: abort(TypeError: Failed to parse URL from /path/to/node_modules/@ffmpeg/core/dist/ffmpeg-core.wasm). Build with -s ASSERTIONS=1 for more info.
    at process.u (/path/to/node_modules/@ffmpeg/core/dist/ffmpeg-core.js:25:109)
    at process.emit (node:events:513:28)
    at emit (node:internal/process/promises:149:20)
    at processPromiseRejections (node:internal/process/promises:283:27)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:32)

Node.js v18.12.0

After that, I also tried specify the ffmpeg path like this.

npx @scenejs/render -i index.html -F /usr/local/bin/ffmpeg

Then, the error changed to timeout.

/path/to/node_modules/@scenejs/render/dist/render.cjs.js:78
        throw new Error("Timeout: 10000ms");
              ^

Error: Timeout: 10000ms
    at openPage (/path/to/node_modules/@scenejs/render/dist/render.cjs.js:78:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async render (/path/to/node_modules/@scenejs/render/dist/render.cjs.js:531:18)

Node.js v18.12.0

I tried to the command without detail options like this.

npx @scenejs/render -i index.html -F /usr/local/bin/ffmpeg
npx @scenejs/render -i index.html

However, the same error occured.
I would appreciate it if you help me.

daybrush added a commit that referenced this issue May 5, 2023
@daybrush daybrush added bug Something isn't working and removed checking labels May 5, 2023
@daybrush
Copy link
Owner

daybrush commented May 5, 2023

@zuisho-1848-o

  1. I found that the ffmpeg-core issue has a problem with Node 18. Node less than 18 or --ffmpegPath must be used.
  2. Is the scene variable declared in the global(window) index.html?
    The timeout occurs because there is no scene variable.

@zuisho-1848-o
Copy link
Author

Thank you for your answer.

I used ffmpegPath and the first problem was solved.
About the second problem, I realized I was wrong about the scene name.

Thank you for your support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants