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

how resolve error [BoxParser] Unlimited box size not supported for type in module : gpmf-extract #24

Closed
samanyousefi opened this issue May 14, 2020 · 1 comment

Comments

@samanyousefi
Copy link

I have an issue with gpmf-extract module to finds the metadata track in GoPro camera when I set the video with mp4 format to gpmfExtract (gpmf-extract) module.

this module page on nmp :
https://www.npmjs.com/package/gpmf-extract
and also home page on git :
https://github.com/JuanIrache/gpmf-extract#readme

const gpmfExtract = require('gpmf-extract');
const fs = require('fs');
const path = require('path');
const util = require('util');

const dirAddress = 'E:\\mp4files';
const pathStat = util.promisify(fs.stat);

pathStat(dirAddress).then(stat => {
    if (stat) {
        if (stat.isDirectory()) {
            const folderContent = fs.readdirSync(dirAddress,'utf-8');
            if(folderContent.length){
                    folderContent.forEach(contentName => {
                        const contentSliced = contentName.split('.');
                        if(contentSliced[1] === 'mp4' || contentSliced[1] === 'MP4'){
                            const fileAddress = path.join(dirAddress,contentName);
                            gpmfExtract(fileAddress).then(res => {
                                console.log('Length of data received:', res.rawData.length);
                                console.log('Framerate of data received:', 1 / res.timing.frameDuration);
                                // Do what you want with the data
                            }).catch(e=>{
                                console.log(e,111)
                            });
                        }

                    })
            }else{
                console.log('dir is empty')
            }
        } else {
            console.log('path is not valid directory')
        }
    } else {
        console.log('path is not valid')
    }

}).catch(e => {
    console.log(e)
});

this code result is :

[0:00:00.019] [BoxParser] Unlimited box size not supported for type: ' ╝ '
[0:00:00.027] [BoxParser] Unlimited box size not supported for type: ' ╔'

@JuanIrache
Copy link
Owner

Hi @samanyousefi , it seems that you are passing gpmfExtract a file name or path, but you should pass it a JavaScript File https://developer.mozilla.org/en-US/docs/Web/API/File

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