node-addon-examples:https://github.com/nodejs/node-addon-examples
Basic-Recording: https://github.com/AgoraIO/Basic-Recording
Beginners guide to writing NodeJS Addons using C++ and N-API (node-addon-api):
https://medium.com/@atulanand94/beginners-guide-to-writing-nodejs-addons-using-c-and-n-api-node-addon-api-9b3b718a9a7f
node-addon-api:https://github.com/nodejs/node-addon-api
node-dvbtee:https://github.com/mkrufky/node-dvbtee
nan:https://github.com/nodejs/nan
node-gyp 实现 nodejs 调用 C++:https://juejin.im/post/5def3acb6fb9a01642385d32#heading-2
如何知根知底使用Node.js C++ Addon:https://github.com/tsy77/blog/issues/4
the n-api resource: https://napi.inspiredware.com/getting-started/objectwrap.html
N-API:https://nodejs.org/api/n-api.html#n_api_napi_set_named_property
Using Buffers to share data between Node.js and C++:https://community.risingstack.com/using-buffers-node-js-c-plus-plus/
zh:
https://github.com/xitu/gold-miner/blob/master/TODO/using-buffers-node-js-c-plus-plus.md
node-dvbtee:https://github.com/mkrufky/node-dvbtee
v8 documents: https://v8docs.nodesource.com/node-8.16/dd/d0d/classv8_1_1_function_callback_info.html#a1edb6f8917278f0f7df76b727e421db0
上面的文件是NV12排放的,你的解析估计选择的是I420排放。
如果你的软件可以选择NV12排放,那显示就正常了。
如果不能只支持I420,那就下载一个ffmpeg
然后用这个命令行,把NV12转成I420
yuv格式转换:
Nv12转I420:
ffmpeg -pix_fmt nv12 -s 640x360 -i /Users/luojinghui/Downloads/360p.yuv -pix_fmt yuv420p -s 640x360 ./360p-new.yuv