Skip to content

rapAlignment option has no effect when extracting samples #30

Open
@richardmitic

Description

@richardmitic

mp4box.onSamples() will always receive a list of nbSamples samples, regardless of which ones are RAPs. The script below will reproduce the problem.

window.onload = function() {
var mp4box = new MP4Box();
mp4box.onError = function(e) {};
mp4box.onReady = function(info) {
videoTrackID = info.videoTracks[0].id;
mp4box.setExtractionOptions(videoTrackID, null, {nbSamples:10, rapAlignement:true});
};
mp4box.onSamples = function(id, user, samples) {
console.log("Received "+samples.length+" samples on track "+id+" for object "+user);
console.log(samples);
}
var downloader = new Downloader();
downloader.setUrl("https://dl.dropboxusercontent.com/u/7245016/bug_buck_bunny_trailer.mp4")
downloader.setCallback(function(response, eof) {
mp4box.appendBuffer(response);
mp4box.flush();
});
downloader.getFile();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions