Closed rklf closed 1 week ago
Thank you for sending your request. At this time, if you want to get the approxDurationMs
property, please specify true
as the second argument of toVideoFormats
to get the original format data. Note that v6.0.9 will allow you to get the data without this need.
import { YtdlCore } from '@ybd-project/ytdl-core';
const FORMATS = [...],
VIDEO_FORMATS = YtdlCore.toVideoFormats(FORMATS, true);
console.log(VIDEO_FORMATS[0].originalData.approxDurationMs);
Thanks
Describe the feature
Thanks for your work.
I'm wondering if you could add
approxDurationMs
(andwidth
/height
) to.toVideoFormats()
returned formats to get video duration.Deciphered format eg:
After
.toVideoFormats()
eg: