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

How was avc.wasm file generated with emscripten 1.35.12? #218

Open
blazvizjak opened this issue May 12, 2020 · 11 comments
Open

How was avc.wasm file generated with emscripten 1.35.12? #218

blazvizjak opened this issue May 12, 2020 · 11 comments

Comments

@blazvizjak
Copy link

My endgame is increasing TOTAL_MEMORY in make.py, but I've hit several obstacles.

In README.md it states "The current version of Broadway was built with emscripten 1.35.12" is this correct?

I've installed emsdk and installed emscripten-tag-1.35.12-64bit and fastcomp-clang-tag-e1.35.12-64bit but there is no binaryen prior to 1.36.12 so I'm wandering if there is something missing in your commit when you've added webassembly support.

Any kind of insight on how to install correct version of emscripten for "python make.py" to work and also generate avc.wasm file would be appreciated.

@soliton4
Copy link
Collaborator

sorry the readme is likely outdated.
my goal is always to use the latest version of emscripten. so try that. if you run into trouble i may be able to help

@SoylentGraham
Copy link

SoylentGraham commented Feb 24, 2021

Do we know what version of emscripten IS good?
I've just installed via official guide (on mac) 2.0.14 and it seems like the new version doesn't make a ~/.emscripten file, I think?

Possibly my setup is wrong, but I just can't get emscripten to generate this file, but I don't know if this is just out of date (given the major version change)

Traceback (most recent call last):
  File "./make.py", line 6, in <module>
    exec(open(os.path.expanduser('~/.emscripten'), 'r').read())
IOError: [Errno 2] No such file or directory: '/Users/graham/.emscripten'

I'm also trying to setup an action with the same setup
https://github.com/SoylentGraham/Broadway/runs/1973463000?check_suite_focus=true

But, I don't know if I'm working with the wrong version etc

@SoylentGraham
Copy link

https://emscripten.org/docs/introducing_emscripten/release_notes.html
Your comment is 13th may, so that should be 1.39.15: 05/06/2020

@SoylentGraham
Copy link

I think I'm not setting up emscripten correctly in some way (emcc works though), switched to 1.39.15 and have the same problem. Same error via github action.

@SoylentGraham
Copy link

Compiling directly with emscipten/emcc is okay, my setup just doesn't seem happy with the python script;
https://github.com/NewChromantics/PopH264/blob/master/PopH264.Emscripten/Build.sh#L117

@SoylentGraham
Copy link

@myjimmy the build script is in the post above your one.
That has all the instructions on how I build broadway to wasm in my project.

@soliton4
Copy link
Collaborator

@SoylentGraham why not make a pr?
im not very happy with the state of the build scripts, but i also dont have the time and motivation to make them all pretty.
but if you do pls contribute

@SoylentGraham
Copy link

SoylentGraham commented Sep 13, 2021

Being a basic bash script is a wild diversion from your python script, with no features, not very crossplatform... and I couldn't really see why the python one wouldn't work (outside of normal python2/3 dependency mess), so wasn't sure if it was just my setup, rather than a fault with your scripts. (still not sure :)

Mine's not even a build script, (it's just a one-liner really) but integrates with my systems better

@SoylentGraham
Copy link

I'm afraid I have no idea what's causing that error; (and don't really have the time to debug it)
Googling the error gives a lot of results of other people having the same problem

Note; 00 61 73 6d is \0asm and the expected hex 77 61 73 6d is wasm

Open your .wasm output file in a hex editor and see if that's correct, to make sure it's not your webserver zero'ing the first byte

Your script has a load of options I don't have, all I can suggest is cutting it way back and remove as many options until it works. That's kinda what I did.

If you're just trying to decode h264 on web though, (and not supporting every browser under the sun) you may want to look into webcodecs. It's hardware accellerated, it's an ultra basic API, and will be enabled in the next chrome release by default

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

No branches or pull requests

4 participants
@soliton4 @SoylentGraham @blazvizjak and others