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

not an existing directory error with cmake #6

Open
Random-Code-Guy opened this issue Aug 17, 2023 · 2 comments
Open

not an existing directory error with cmake #6

Random-Code-Guy opened this issue Aug 17, 2023 · 2 comments

Comments

@Random-Code-Guy
Copy link

add_subdirectory given source "Bento4" which is not an existing directory.

i got this error when trying to install

@ubuntuegor
Copy link
Owner

If you are using this package from git make sure to clone it with submodules:
git clone --recurse-submodules <url>

Or just use the version from npm:
npm install mp4decrypt-buffer

@Random-Code-Guy
Copy link
Author

Random-Code-Guy commented Aug 20, 2023

If you are using this package from git make sure to clone it with submodules: git clone --recurse-submodules <url>

Or just use the version from npm: npm install mp4decrypt-buffer

thanks i fixed it turned out it seemed to be installing the old version not the new one

i have a weird issue tho when trying to decrypt a file i get the following errors

WARNING: atom serialized to fewer bytes than declared size
WARNING: padding would be too large

have you for this issue or know how to fix it ?

also what would you say is the best way to combine the init data with the media segments right now i am using the following code

async function combineSegments(initSegmentPath, mediaSegmentPath, outputPath) {
console.log('Combining segments');

try {
    const initSegment = await readFileAsync(initSegmentPath);
    const mediaSegment = await readFileAsync(mediaSegmentPath);

    const combinedSegment = createCombinedSegment(initSegment, mediaSegment);

    await writeFileAsync(outputPath, combinedSegment);

    console.log('Segments combined successfully.');
    return true;
} catch (error) {
    console.error('Error combining segments:', error);
    return false;
}

}

function createCombinedSegment(initSegment, mediaSegment) {

const combinedSize = initSegment.length + mediaSegment.length;

const combinedSegment = Buffer.alloc(combinedSize);

initSegment.copy(combinedSegment, 0);
mediaSegment.copy(combinedSegment, initSegment.length);

return combinedSegment;

}

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