When you run this code and print each item from formats, you'll notice that many properties are missing from VideoFormat. One of them is filesize_approx, which is often useful when filesize is not available
const info = await ytdlp.getInfoAsync("https://www.youtube.com/shorts/4lMhrCxgXK0");
if (info._type === "video") {
info.formats.forEach(f => {
console.log(f); // it prints several properties that are not included in the type, such as 'filesize_approx'
console.log(f.filesize_approx); // ERROR: Property 'filesize_approx' does not exist on type 'VideoFormat'
});
}
When you run this code and print each item from
formats, you'll notice that many properties are missing fromVideoFormat. One of them isfilesize_approx, which is often useful whenfilesizeis not available