VideoHelp Forum




+ Reply to Thread
Results 1 to 11 of 11
  1. Hello

    I'd like to be able to know (and display) the total number of fragments of a video without downloading it.
    I've tried some code combinations with yt-dlp but it didn't work.

    Could you please help me?

    Thanks in advance
    Quote Quote  
  2. Easiest I can think of is something along

    Code:
    yt-dlp -j <url> | jq '.formats[0].fragments|length'
    So dump json and count elements in first array of fragments dumped. I don't know if this works for every video that consists of fragments though.
    Quote Quote  
  3. Originally Posted by Obo View Post
    Easiest I can think of is something along

    Code:
    yt-dlp -j <url> | jq '.formats[0].fragments|length'
    So dump json and count elements in first array of fragments dumped. I don't know if this works for every video that consists of fragments though.
    Thank you
    I have a "not recognized" error message for "jq".
    Ps: i work in a python file
    Quote Quote  
  4. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Originally Posted by Gene View Post
    I have a "not recognized" error message for "jq".
    If you're using windows you can install jq by opening powershell as administrator and running
    Code:
    winget install jqlang.jq
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*]
    Quote Quote  
  5. another easy way is put mpd/m3u8 link on N_m3u8DL-RE and you will be able to see from cmd segments number

    Image
    [Attachment 85008 - Click to enlarge]
    Quote Quote  
  6. Thank you very much
    I am testing the 2 solutions
    For 'N_m3u8DL-RE.exe URL --skip-download --no-log --no-date-info --auto-select'
    I have far too much info and would like to reduce (to what I need).
    Is this possible?

    ..And that it doesn't create a folder with the date and time of the action every time please?
    Last edited by Gene; 21st Jan 2025 at 13:48.
    Quote Quote  
  7. Originally Posted by 2nHxWW6GkN1l916N3ayz8HQoi View Post
    Originally Posted by Gene View Post
    I have a "not recognized" error message for "jq".
    If you're using windows you can install jq by opening powershell as administrator and running
    Code:
    winget install jqlang.jq
    Even though I'm curious to understand/learn, for this solution I need to go further... and install other environment(s) like ‘winget’?
    Quote Quote  
  8. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Originally Posted by Gene View Post
    for this solution I need to go further... and install other environment(s) like ‘winget’?
    You most likely have it already on windows 10/11. But if you need to install it, you can read
    https://learn.microsoft.com/en-us/windows/package-manager/winget/
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*]
    Quote Quote  
  9. Originally Posted by 2nHxWW6GkN1l916N3ayz8HQoi View Post
    Originally Posted by Gene View Post
    I have a "not recognized" error message for "jq".
    If you're using windows you can install jq by opening powershell as administrator and running
    Code:
    winget install jqlang.jq
    Thanks !
    The problem is that i get this message:
    WARNING : [generic] Falling back on generic information extractor
    ERROR : [generic] .mpd : This video is protected by DRM
    Quote Quote  
  10. then try add --allow-u
    Quote Quote  
  11. Originally Posted by shellcmd View Post
    then try add --allow-u
    Thank you !

    On the other hand, for N_m3u8DL-RE, it would be nice if it didn't create a folder for its files every time it's used...
    Last edited by Gene; 22nd Jan 2025 at 13:58.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!