W
W
Wasya UK2017-05-22 14:18:45
JavaScript
Wasya UK, 2017-05-22 14:18:45

Why is the metadata of video files always empty?

Already rummaged through a bunch of modules, of them - liquid-ffmpeg and ffmpeg work, but show empty values. Maybe I'm doing something wrong? Here's what happened:
liquid-ffmpeg

videos.forEach(function(video) {
    if (!fs.existsSync(video.path)) {
        console.log('file not found');

        video.metadata = [];
        return;
    }

    var metaObject = new Metalib(video.path);

    metaObject.get(function(metadata, err) {
        console.log(metadata);
    });
});

ffmpeg
videos.forEach(function(video) {
    var process = new ffmpeg(video.path);

    process.then(function (video) {
        console.log(video.metadata);
    }, function (err) {
        console.log('Video not found');
    });
});

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question