pygame-web / pygbag

python and pygame wasm for everyone ( packager + test server + simulator )
https://github.com/pygame-web
MIT License
340 stars 40 forks source link

add wav->ogg converter and pngquant lib #30

Open pmp-p opened 2 years ago

pmp-p commented 2 years ago

https://github.com/ImageOptim/libimagequant

ffmpeg ?

possibly via wasm modules to get really cross platform ? performance is not an issue conversion is a one time thing like initial caching.

manually and actually supported since https://github.com/pygame-web/pygbag/commit/505bc54dc1b49991f690e4968f57cd3792743f69 on GNU/Linux it's something like :

pngquant -f --ext -pygbag.png --quality 40 $(find|grep png$)

for wav in $(find |grep wav$)
do
    ffmpeg -i $wav $wav.ogg
done

# cleanup
# rm $(find |grep pygbag.png$)
pmp-p commented 2 years ago

optimizer is implemented for 0.2.0 but only support linux ( pngquant/ffmpeg via os.system ) help wanted for other OS.

pmp-p commented 2 months ago

for now linux native converters work, including on github CI ( sudo apt-get install ffmpeg pngquant )

But converters will use wasmtime-py and wasi binaries. And they still will be optionnal.