core icon indicating copy to clipboard operation
core copied to clipboard

export error

Open abdallahrabiaa opened this issue 1 year ago • 6 comments

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 :)

abdallahrabiaa avatar Oct 24 '24 21:10 abdallahrabiaa

Does it work with a different file?

k9p5 avatar Oct 24 '24 22:10 k9p5

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

abdallahrabiaa avatar Oct 25 '24 11:10 abdallahrabiaa

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

k9p5 avatar Oct 25 '24 16:10 k9p5

okay thanks for your effort :)

abdallahrabiaa avatar Oct 25 '24 18:10 abdallahrabiaa

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);

k9p5 avatar Oct 25 '24 18:10 k9p5

Thanks for this solution, i appreciate that

abdallahrabiaa avatar Oct 26 '24 01:10 abdallahrabiaa