You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempting a simple filter to convert pixel format, there is an error when calling the filter method on the filterer.
Unexpected N-API status not OK in file ../src/beamcoder_util.cc at line 149 value 10
Simultaneously, the JS code receives a TypeError: Cannot convert undefined or null to object error.
Can be fixed by updating beamcoder C++ sources by a newer version. I replaced all C++ files from the src directory by those from beamcoder 0.6.3 and the situation was resolved.
I was not sure about using newer versions due to FFmpeg dependency version upgrades, which would require rebuilding the static libraries.
Source code of the situation leading to the error:
// dm is an already instantiated demuxer
let packet = await dm.read()
let dec = beamcoder.decoder({ demuxer: dm, stream_index: 0 })
let decResult = await dec.decode(packet)
if (decResult.frames.length === 0)
decResult = await dec.flush()
let v_filterer = await beamcoder.filterer({
filterType: 'video',
inputParams: [
{
width: dec.width,
height: dec.height,
pixelFormat: dec.pix_fmt,
timeBase: dec.time_base,
pixelAspect: dec.sample_aspect_ratio,
}
],
outputParams: [
{
pixelFormat: 'rgb24'
}
],
filterSpec: 'null', // we only want to convert pixel format
})
// This call triggers the error
let filtered = await v_filterer.filter(decResult.frames)`
`
The text was updated successfully, but these errors were encountered:
Attempting a simple filter to convert pixel format, there is an error when calling the filter method on the filterer.
Unexpected N-API status not OK in file ../src/beamcoder_util.cc at line 149 value 10
Simultaneously, the JS code receives a
TypeError: Cannot convert undefined or null to object
error.Can be fixed by updating beamcoder C++ sources by a newer version. I replaced all C++ files from the src directory by those from beamcoder 0.6.3 and the situation was resolved.
I was not sure about using newer versions due to FFmpeg dependency version upgrades, which would require rebuilding the static libraries.
Source code of the situation leading to the error:
`
The text was updated successfully, but these errors were encountered: