-
Notifications
You must be signed in to change notification settings - Fork 82
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
作者您好,一个编译问题 #5
Comments
版本信息如下,编译ffmpeg4.1 ,ffmpeg4.2 版本均有此问题。其中禁用了--disable-pthreads ,否则编译无法通过 emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 1.39.18 |
我们用的编译代码就是github上的版本,没有额外的更改,也没有设置--disable-pthreads。 另外,之前碰到了一些编译问题,gcc是单独安装的 |
好的,我这边先尝试下 |
@wusopp 请教一下,这问题解决了么?我现在也遇到这问题,谢谢! |
你可以试试 1.38.45 版本的,我当时是这个问题,仅供参考。 |
用1.38以上的版本,就会出现以上的问题吗? |
var videoCallback = Module.addFunction(function (addr_y, addr_u, addr_v, stride_y, stride_u, stride_v, width, height, pts) {
console.log("[%d]In video callback, size = %d * %d, pts = %d", ++videoSize, width, height, pts)
let size = width * height + (width / 2) * (height / 2) + (width / 2) * (height / 2)
let data = new Uint8Array(size)
let pos = 0
for(let i=0; i< height; i++) {
let src = addr_y + i * stride_y
let tmp = HEAPU8.subarray(src, src + width)
tmp = new Uint8Array(tmp)
data.set(tmp, pos)
pos += tmp.length
}
for(let i=0; i< height / 2; i++) {
let src = addr_u + i * stride_u
let tmp = HEAPU8.subarray(src, src + width / 2)
tmp = new Uint8Array(tmp)
data.set(tmp, pos)
pos += tmp.length
}
for(let i=0; i< height / 2; i++) {
let src = addr_v + i * stride_v
let tmp = HEAPU8.subarray(src, src + width / 2)
tmp = new Uint8Array(tmp)
data.set(tmp, pos)
pos += tmp.length
}
var obj = {
data: data,
width,
height
}
displayVideoFrame(obj);
}, 'viiiiiiiii'); 这里改成这样,新的版本https://emscripten.org/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.html#calling-javascript-functions-as-function-pointers-from-c 需要传函数的返回还有参数类型 |
您好,请教一个编译问题。我这边按照示例说明,编译了ffmpeg4.1.6版本,但总是提示。编译其他版本也是一样的,编译环境采用的是Ubuntu18.04
当载入H264或者H265后,总是出现报错,如下
libffmpeg_265.js:1 Uncaught TypeError: Cannot read property 'slice' of undefined
at convertJsFunctionToWasm (libffmpeg_265.js:1)
at addFunctionWasm (libffmpeg_265.js:1)
at Object.addFunction (libffmpeg_265.js:1)
at decode_seq (video.js:30)
at handleVideoFiles (video.js:14)
at HTMLInputElement.onchange (main.html:11)
音频播放无问题
但使用从源程序中下载的libffmpeg_265.js 和 libffmpeg_265.wasm 却不会报错,是编译上哪里出问题了么?还是需要代码进行调整?
The text was updated successfully, but these errors were encountered: