MediaInfoLib icon indicating copy to clipboard operation
MediaInfoLib copied to clipboard

[Feature] support limit duration/size in trace mode

Open quink-black opened this issue 3 years ago • 0 comments

In trace mode,

    media_info.Option("Inform", "Details;1");

it can be time and memory consuming for large files. Sometimes only a few of frames is needed, no need to parse the whole file (e.g., every frame in mp4 mdat).

It would be better to support something like

// limit parse duration to 10 seconds
media_info.Option("max_duration", "10");

Or just limit the file size to parse (in the second pass round)

media_info.Option("max_size", 1024000);

What do you think? I can implement the feature with some hints.

quink-black avatar Oct 22 '21 13:10 quink-black