diffusionstudio / core

The Video Creation Engine: Edit videos with code, featuring the fastest WebCodecs renderer for in-browser video processing.
https://examples.diffusion.studio/
Mozilla Public License 2.0
359 stars 32 forks source link

Export issue. #27

Open neilkinnish opened 1 month ago

neilkinnish commented 1 month ago

I'm getting an export issue: error in worker EncodingError: Decoding error.

I have debug true, but the error information is quite basic.

Context:

If I run on the same setup with a simple composition.add(clip); (clip being a videoclip) it will successfully export.

If I use stacked tracks like so...

const track = composition.createTrack("video");
track.stacked();

const copy = clip.copy();
copy.subclip(0, 100);
await track.add(copy);

Preview works correctly, but if fails with the export.

UPDATE: with a few clip added it works, but it seems to be an issue if you add a lot of clips.

k9p5 commented 1 month ago

Would you mind sharing a full code example? I just rendered this snippet successfully with v1.0.0:

const composition = new core.Composition();
const source = await core.VideoSource.from('https://diffusion-studio-public.s3.eu-central-1.amazonaws.com/videos/big_buck_bunny_1080p_30fps.mp4');
const track = composition.createTrack('video').stacked();
const clip = await track.add(new core.VideoClip(source));
await track.add(clip.copy().subclip(0, 100));
neilkinnish commented 1 month ago

I'll put together an example, it seems to be when you have a lot of clips.

girayk commented 1 month ago

Screenshot 2024-10-24 at 01 29 38

I exported 4k video with 5 of 4k clips, and some 720p videos included with different alpha, different volume, etc. Its exported without problem blazing fast.