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

yuv420p数据使用webgl渲染失败,可以解答下吗谢谢 #3

Open
Qianxunha opened this issue May 20, 2020 · 4 comments
Open

Comments

@Qianxunha
Copy link

博主你好,参考你的webgl.js方法将yuv420p数据渲染在网页上失败:
image

我这边思路:
1)在websock服务器推送h.265/h.264裸流到浏览器中
2)在js中收流,调用ffmpeg解码接口(加载ffmpeg.js 和ffmpeg.wasm)将裸流数据转成yuv420p数据
3)yuv420p数据使用webgl渲染在网页上
裸流->yuv数据接口函数在Linux里跑过程序,写下yuv数据在yuv播放器可以正常播放

@Qianxunha
Copy link
Author

image
image

@snxly
Copy link
Collaborator

snxly commented May 20, 2020

js里用不了c 代码定义的结构体,只能做内存数据拷贝。

@snxly
Copy link
Collaborator

snxly commented May 20, 2020

可参考 https://github.com/goldvideo/decoder_wasm/blob/master/test/video.js 这里webgl的使用

@Qianxunha
Copy link
Author

@snxly 0k谢谢

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

2 participants