noahgsolomon / brainrot.js

Text to video generator in the brainrot form. Learn about any topic from your favorite personalities 😼.
https://brainrotjs.com
MIT License
486 stars 54 forks source link

Error when adding files #10

Closed Androtim closed 3 months ago

Androtim commented 3 months ago

After running node localBuild.mjs, I get the following output:

Adding file to ffmpeg: BARACK_OBAMA-0.mp3
Adding silence to ffmpeg
Adding file to ffmpeg: BEN_SHAPIRO-1.mp3
Adding silence to ffmpeg
Adding file to ffmpeg: BARACK_OBAMA-2.mp3
Adding silence to ffmpeg
Adding file to ffmpeg: BEN_SHAPIRO-3.mp3
Adding silence to ffmpeg
Adding file to ffmpeg: BARACK_OBAMA-4.mp3
Error: Cannot find ffprobe
Error transcribing audio (attempt 1): Error: HTTP error! status: 500
    at transcribeAudio (file:///home/androtim/brainrot.js/generate/transcribe.mjs:23:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async transcribeFunction (file:///home/androtim/brainrot.js/generate/transcribe.mjs:105:31)
    at async main (file:///home/androtim/brainrot.js/generate/localBuild.mjs:63:2)
    at async file:///home/androtim/brainrot.js/generate/localBuild.mjs:90:2`
Retrying in 1 second(s)...
Error transcribing audio (attempt 2): Error: HTTP error! status: 500
    at transcribeAudio (file:///home/androtim/brainrot.js/generate/transcribe.mjs:23:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async transcribeFunction (file:///home/androtim/brainrot.js/generate/transcribe.mjs:105:31)
    at async main (file:///home/androtim/brainrot.js/generate/localBuild.mjs:63:2)
    at async file:///home/androtim/brainrot.js/generate/localBuild.mjs:90:2
Retrying in 2 second(s)...
Error transcribing audio (attempt 3): Error: HTTP error! status: 500
    at transcribeAudio (file:///home/androtim/brainrot.js/generate/transcribe.mjs:23:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async transcribeFunction (file:///home/androtim/brainrot.js/generate/transcribe.mjs:105:31)
    at async main (file:///home/androtim/brainrot.js/generate/localBuild.mjs:63:2)
    at async file:///home/androtim/brainrot.js/generate/localBuild.mjs:90:2
node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

Error: HTTP error! status: 500
    at transcribeAudio (file:///home/androtim/brainrot.js/generate/transcribe.mjs:23:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async transcribeFunction (file:///home/androtim/brainrot.js/generate/transcribe.mjs:105:31)
    at async main (file:///home/androtim/brainrot.js/generate/localBuild.mjs:63:2)
    at async file:///home/androtim/brainrot.js/generate/localBuild.mjs:90:2

I installed ffprobe in a python venv and tried running node localBuild.mjs again but I still get the same result. I am not able to install ffprobe using pip on my system as a whole as my OS does not permit it for some odd reason.

Are the errors cause by me not having ffprobe installed or is it something else?

Note: I use Ubuntu 23.10 and run on an Intel i3

noahgsolomon commented 3 months ago

Yeah some versions of linux don't work with ffmpeg well for some reason. In my amazon linux os on aws which is polling for brainrotjs.com there was a libc incompatibility error, so i had to run a docker container so i could run a different os.

u were currently running the flask server on port 5000 right

Androtim commented 3 months ago

yes everything up until that point worked with no errors

here is the history of the flask server:

Screenshot from 2024-05-10 19-26-06

noahgsolomon commented 3 months ago

and u have ffmpeg installed?

Androtim commented 3 months ago

apparently no I did not and that resolved the problem thanks!!!

Now I have a problem with npm that doesn't run properly I think :

exec error: Error: Command failed: npm run build
Error: Maximum for --concurrency is 4 (number of cores on this system)
    at Object.getActualConcurrency (/home/androtim/brainrot.js/generate/node_modules/@remotion/renderer/dist/get-concurrency.js:20:15)
    at renderVideoFlow (/home/androtim/brainrot.js/generate/node_modules/@remotion/cli/dist/render-flows/render.js:153:58)
    at async render (/home/androtim/brainrot.js/generate/node_modules/@remotion/cli/dist/render.js:99:5)
    at async cli (/home/androtim/brainrot.js/generate/node_modules/@remotion/cli/dist/index.js:89:13)
noahgsolomon commented 3 months ago

go to remotion.config.ts

/**
 * Note: When using the Node.JS APIs, the config file
 * doesn't apply. Instead, pass options directly to the APIs.
 *
 * All configuration options: https://remotion.dev/docs/config
 */

import { Config } from '@remotion/cli/config';
import { enableTailwind } from '@remotion/tailwind';

Config.setVideoImageFormat('jpeg');
Config.setOverwriteOutput(true);
Config.setConcurrency(8);
// Config.setChromiumMultiProcessOnLinux(true);

// This template processes the whole audio file on each thread which is heavy.
Config.overrideWebpackConfig((currentConfiguration) => {
    return enableTailwind(currentConfiguration);
});

Config.setConcurrency(8);

change this ^ to

Config.setConcurrency(4);

Androtim commented 3 months ago

that seems to have worked thanks!

However I now get an error that's very weird because I was able to resolve it earlier but not anymore:

androtim@androtim-pc:~/brainrot.js/generate$ node localBuild.mjs
file:///home/androtim/brainrot.js/generate/eleven.mjs:148
        throw new Error(`Server responded with status code ${response.status}`);
              ^

Error: Server responded with status code 401
    at generateAudio (file:///home/androtim/brainrot.js/generate/eleven.mjs:148:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async generateTranscriptAudio (file:///home/androtim/brainrot.js/generate/eleven.mjs:84:3)
    at async transcribeFunction (file:///home/androtim/brainrot.js/generate/transcribe.mjs:80:33)
    at async main (file:///home/androtim/brainrot.js/generate/localBuild.mjs:63:2)
    at async file:///home/androtim/brainrot.js/generate/localBuild.mjs:90:2

is elevenlabs down? I haven't touched anything since changing the Config.setConcurrency(8); ....

Androtim commented 3 months ago

oh no it's just that my free trial was over sorry

Androtim commented 3 months ago

I bought a subsciption and everything works perfectly thank you!!!