jumpcutter icon indicating copy to clipboard operation
jumpcutter copied to clipboard

fix: "experimental algorithm" doesn't work sometimes (mostly on YouTube)

Open WofWca opened this issue 1 year ago • 1 comments

For example, for this video the clone gets the following clone.error:

MediaError {code: 4, message: 'CHUNK_DEMUXER_ERROR_APPEND_FAILED: Found Cluster element before Info.'}

I happens immediately as you load the video.

Here's the cloning code: https://github.com/WofWca/jumpcutter/blob/master/src/entry-points/content/cloneMediaSources/lib.ts

  • I noticed that if we replace all queueMicrotask(() => callback( with just callback(, it becomes much much more reliable. So, shall we just do that? Add try catch so that the original calls and setters don't throw. But why is this happening? Does this mess up the order of operations? Did we maybe forget to use queueMicrotask somewhere, or are using it twice somewhere??
  • I suspect further issues could be caused by various promise.then()s. Perhaps need to consider having a cached version of things that the promises resolve to. Also this could be related to the queueMicrotask order from the previous point.
  • Also see TODOs in that file. Some things issues are already known, but it is unknown how often they manifest themselves.

WofWca avatar Jun 22 '24 13:06 WofWca

MediaError {code: 4, message: 'CHUNK_DEMUXER_ERROR_APPEND_FAILED: Found Cluster element before Info.'}

this particular error got fixed (at least I haven't noticed it coming back) in b1f1278193a3597e69f3d521d634753a8ea31691

WofWca avatar Jun 22 '24 15:06 WofWca