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

export error #29

Open
abdallahrabiaa opened this issue Oct 24, 2024 · 6 comments
Open

export error #29

abdallahrabiaa opened this issue Oct 24, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@abdallahrabiaa
Copy link

abdallahrabiaa commented Oct 24, 2024

i got an export error and i got it many times, i hope it's not a bug , i walk around in docs and i tried many times but sometimes it's rendered and sometimes give me this error: export error Promise timed out after 20000 ms

Screenshot-20241024234524-603x49
this my render code :

async render(name?: string, props?: {
resolution?: number;
sampleRate?: number;
numberOfChannels?: number;
videoBitrate?: number;
gpuBatchSize?: number;
fps?: number;
debug?: boolean;
audio?: boolean;
}) {
if (props && !props.gpuBatchSize) {
props.gpuBatchSize = 100;
}
const encoder = new Encoder(this.composition, props);
await encoder.render(name);
}

thanks :)
@k9p5
Copy link
Contributor

k9p5 commented Oct 24, 2024

Does it work with a different file?

@abdallahrabiaa
Copy link
Author

maybe also work with same file , it's happened often when network is slow .

@k9p5 k9p5 added the enhancement New feature or request label Oct 25, 2024
@k9p5
Copy link
Contributor

k9p5 commented Oct 25, 2024

I see, I might be able to improve that. It's timing out because the file takes too long to load

@abdallahrabiaa
Copy link
Author

okay thanks for your effort :)

@k9p5
Copy link
Contributor

k9p5 commented Oct 25, 2024

No problem :) A workaround would be to use the File API instead of the Source object:

const response = await fetch('.../some_video.mp4');

const blob = await response.blob();

// Convert Blob to File
const file = new File([blob], fileName, { type: "video/mp4" });

const clip = new VideoClip(file);

@abdallahrabiaa
Copy link
Author

Thanks for this solution, i appreciate that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants