mattdesl / mp4-wasm

[proof-of-concept] fast MP4 mux / demux using WASM
MIT License
275 stars 23 forks source link

Does not work on windows #6

Open marcofugaro opened 2 years ago

marcofugaro commented 2 years ago

Browser: Chrome 94 (WebCodecs API is available) Platform: Windows 10

The example with the updated WebCodecs API from #5 does not work on windows.

No errors to console, the video it creates is empty:

Anyone has any idea what might be causing this?

mattdesl commented 2 years ago

Try again with latest? Should be fixed thanks to #5.

https://codepen.io/mattdesl/pen/LYWvmyp?editors=1010

marcofugaro commented 2 years ago

@mattdesl I tested and it doesn't work. This is a different issue.

It is probably related to the minimp4 library build. It looks like everything works but no frames are added to the video? The result is an empty/invalid video (see screenshot).

1ucay commented 2 years ago

I have same issue :(

ffdead commented 2 years ago

Same here. Doesn't seem to work on Windows, unfortunately.

Windows 10 Home Chrome Version 99.0.4844.51 (Official Build) (64-bit)

marcofugaro commented 2 years ago

I think the wasm library needs to be rebuilt on windows. I did not attempt that.

Samsy commented 2 years ago

Hey hello ! Bumped into the same issue, I did a lot of research, hours of debugging into web-assembly on windows etc..

Finally tried all the avc1 codecs and found out that : avc1.42001e works

It works on windows !

Thanks a lot @mattdesl for this lib, this is fantastic 🙏🏼

1ucay commented 2 years ago

Hi @Samsy , can you please provide demo link? Like this => https://codepen.io/mattdesl/pen/LYWvmyp?editors=1010

Thank you.

Samsy commented 2 years ago

Nop sorry, if someone can test on their side before pull-requesting as well would be useful

JoeHorvath commented 1 year ago

I believe there are a couple of issues for windows being described here.

  1. The codec issue is fixed by specifying the 'avc1.42001e' codec
  2. There is an issue with certain resolutions: For width 1920 x height 1080 the video is not created however if you increase the height to 1090 it fixes it.
marcofugaro commented 1 year ago

Here is a codepen example of it working on windows:

https://codepen.io/marco_fugaro/pen/yLKmjeM?editors=1010

JoeHorvath commented 1 year ago

When using format: 'avc', it still seems to fail with heights greater than 1090px. Also, I found that I had to use an fps value of double the actual framerate to get correct playback. This is still only on Windows specifically