-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Indicate
filesize approximated from tbr better
- Loading branch information
Showing
1 changed file
with
7 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0dff8e4There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, I've noticed a bug in the output JSON after these changes. for some reason after this was implemented all formats with protocol = "m3u8_native"; lost "filesize" and "filesize_approx" values.
I'm not sure if I'm correct with all the terms here.
Test link: https://www.youtube.com/watch?v=__edp8NgPx0
BEFORE changes - part of JSON (filesize_approx is there):
abr = 0;
acodec = none;
"aspect_ratio" = "1.78";
"audio_ext" = none;
"dynamic_range" = SDR;
ext = mp4;
"filesize_approx" = 23658578;
format = "269 - 256x144";
"format_id" = 269;
"format_index" = "";
fps = 30;
"has_drm" = "";
height = 144;
"http_headers" = {
Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8";
"Accept-Language" = "en-us,en;q=0.5";
"Sec-Fetch-Mode" = navigate;
"User-Agent" = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36";
};
"manifest_url" = "https://manifest.googlevideo.com/api/manifest/hls_variant/expire/1687490167/ei/F7qUZObYNseQxgKX4L3oAQ/ip/80.174.175.175/id/fff79da7c3603f1d/source/youtube/requiressl/yes/playback_host/rr1---sn-8vq54voxn25po-5ajz.googlevideo.com/mh/b6/mm/31%2C29/mn/sn-8vq54voxn25po-5ajz%2Csn-h5qzen7y/ms/au%2Crdu/mv/m/mvi/1/pcm2cms/yes/pl/24/hfr/1/demuxed/1/tts_caps/1/maudio/1/initcwndbps/1618750/vprv/1/go/1/mt/1687468141/fvip/2/nvgoi/1/short_key/1/ncsapi/1/keepalive/yes/fexp/24007246/beids/24350017/dover/13/itag/0/playlist_type/DVR/sparams/expire%2Cei%2Cip%2Cid%2Csource%2Crequiressl%2Chfr%2Cdemuxed%2Ctts_caps%2Cmaudio%2Cvprv%2Cgo%2Citag%2Cplaylist_type/sig/AOq0QJ8wRAIgew55kZ1kNRW8KyygEQ4qKWkrJ4d7GHXzIuDWs9o94OcCIHHipgmc7CX4PQNWMrxQJzxU5w3aWoE__73zBSeHem-J/lsparams/playback_host%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps/lsig/AG3C_xAwRgIhAO8S-V9L9XltBMbPRPhaoGF1wMDWTIZu36AoI4MywSMtAiEA-fqU5muE8Otgk1uWtN_ytAUMMfkbUg0mCqjhv2OLkeE%3D/file/index.m3u8";
preference = "";
protocol = "m3u8_native";
quality = 0;
resolution = 256x144;
tbr = "196.213";
url = "https://manifest.googlevideo.com/api/manifest/hls_playlist/expire/1687490167/ei/F7qUZObYNseQxgKX4L3oAQ/ip/80.174.175.175/id/fff79da7c3603f1d/itag/269/source/youtube/requiressl/yes/ratebypass/yes/pfa/1/sgovp/clen%3D9970822%3Bdur%3D941.940%3Bgir%3Dyes%3Bitag%3D160%3Blmt%3D1687462720226093/hls_chunk_host/rr1---sn-8vq54voxn25po-5ajz.googlevideo.com/mh/b6/mm/31,29/mn/sn-8vq54voxn25po-5ajz,sn-h5qzen7y/ms/au,rdu/mv/m/mvi/1/pcm2cms/yes/pl/24/initcwndbps/1618750/vprv/1/playlist_type/DVR/dover/13/txp/6319224/mt/1687468141/fvip/2/short_key/1/keepalive/yes/fexp/24007246/beids/24350017/sparams/expire,ei,ip,id,itag,source,requiressl,ratebypass,pfa,sgovp,vprv,playlist_type/sig/AOq0QJ8wRQIhAIYAhUhJRXbhpdZM94pdcGCBp_vn7F7fmHHmryWjJW7qAiAZ1iH1PGM6_GJBSdSK0cv2BRkN7BeuY-74b-jhPRt55Q%3D%3D/lsparams/hls_chunk_host,mh,mm,mn,ms,mv,mvi,pcm2cms,pl,initcwndbps/lsig/AG3C_xAwRgIhAOx_1dA0SlN1wrzK2UXsfyfJ1Y_mJUu4-y7SGyk4OAEuAiEA9chbvQ0_7EmBOfTf_LNFiBLFoV9x1oonIwGq3jhXCwo%3D/playlist/index.m3u8";
vbr = "196.213";
vcodec = "avc1.4D400C";
"video_ext" = mp4;
width = 256;
}
After changes - filesize_approx is GONE: (however if using ./yt-dlp -F "https://www.youtube.com/watch?v=__edp8NgPx0" file size will be shown inform on the 269 format id with ~ before it):
0dff8e4There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@someziggyman The file size estimation was added in f2fe69c and was aimed at http formats. It has been noticed for a long time that this gives wrong results for m3u8/dash. Hence why I've decided to remove it for such formats now. The estimate is still shown in
-Fjust for convenience. If you want the old "bad" estimate, just dotbr * durationmanually0dff8e4There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your explanation and apologies for the trouble! Thought I've caught something, but turned out just a newbie comment.