VideoHelp Forum



Support our site by donate $5 directly to us Thanks!!!

Try StreamFab Downloader and download streaming video from Netflix, Amazon!



+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 31 to 41 of 41
  1. Originally Posted by 2nHxWW6GkN1l916N3ayz8HQoi View Post
    Maybe someone who is an expert with N_m3u8 can give you the direct command that can be used to remove the first #EXTINF. For some reason, if you leave it, N_m3u8 fails because of a bad fragment (???).
    Code:
    --custom-hls-key "key.txt" --custom range 1- index.m3u8
    Seems to work, but the resulting video and audio are not in sync (audio is about 1900 ms ahead), so it would require caution before muxing.
    Quote Quote  
  2. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Originally Posted by white_snake View Post
    Code:
    --custom-hls-key "key.txt" --custom range 1- index.m3u8
    Seems to work, but the resulting video and audio are not in sync (audio is about 1900 ms ahead), so it would require caution before muxing.

    Wow. That's a neat command and good to know. Thanks @snake But just to be safe, this command doesn't get rid of the first fragment, right? The first fragment isn't actually corrupted, it's just that N_m3u8 can't handle the m3u8 for some reason. All fragments are from the same ts file with different range bytes.
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*]
    Quote Quote  
  3. Originally Posted by 2nHxWW6GkN1l916N3ayz8HQoi View Post
    Wow. That's a neat command and good to know. Thanks @snake But just to be safe, this command doesn't get rid of the first fragment, right? The first fragment isn't actually corrupted, it's just that N_m3u8 can't handle the m3u8 for some reason. All fragments are from the same ts file with different range bytes.
    I'm afraid it does, lol. 😅 I hadn't realized you had removed the:
    Code:
    #EXTINF:12.012,
    alone (to be perfectly honest I thought that would have corrupted the .m3u8!). At this point I believe your approach is the only feasible one here, since N_m3u8DL-RE can't still selectively ignore tags. I had once proposed a similar functionality, that would have been helpful to ignore discontinuity tags that sometimes are put there as traps, but nothing of the kind has been implemented yet. :/
    Quote Quote  
  4. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Originally Posted by white_snake View Post
    to be perfectly honest I thought that would have corrupted the .m3u8!
    When I executed N_m3u8 on the original file, it failed and after taking a look at the decrypted fragments ts, only the first one was broken, the others were ok. So I thought that if I removed the first #EXTINF maybe N_m3u8 could figure it out on its own because all these fragments were from the same ts file, so maybe a specific byte range was messed up (maybe on purpose). I don't know if this is the explanation for what is happening but in a normal case, it should have corrupted it indeed as you said.

    Originally Posted by white_snake View Post
    N_m3u8DL-RE can't still selectively ignore tags. I had once proposed a similar functionality, that would have been helpful to ignore discontinuity tags that sometimes are put there as traps, but nothing of the kind has been implemented yet. :/
    That feature would be kinda rarely used, but I agree, it would have been useful here. I guess you could fix this by writing a custom script but is kinda overkill. Also, I had no idea you could place tags as traps. Thanks for the info!
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*]
    Quote Quote  
  5. Originally Posted by 2nHxWW6GkN1l916N3ayz8HQoi View Post
    When I executed N_m3u8 on the original file, it failed and after taking a look at the decrypted fragments ts, only the first one was broken, the others were ok. So I thought that if I removed the first #EXTINF maybe N_m3u8 could figure it out on its own because all these fragments were from the same ts file, so maybe a specific byte range was messed up (maybe on purpose). I don't know if this is the explanation for what is happening but in a normal case, it should have corrupted it indeed as you said.
    Ah, got you.

    That feature would be kinda rarely used, but I agree, it would have been useful here. I guess you could fix this by writing a custom script but is kinda overkill. Also, I had no idea you could place tags as traps. Thanks for the info!
    Yup, NBA does it and it "breaks" N_m3u8DL-RE (in that it stops looking for more segments, and also gives a smaller segment count) unless you manually edit the stream playlists to remove those tags (yt-dlp doesn't fall into the trap though!).
    Quote Quote  
  6. When the #EXTINF is removed it downloads segment one correctly but skips 2 and moves number on all rest up by 1

    with it in it fails 1 and does all the rest correctly
    Last edited by Jagomister; 10th Mar 2024 at 01:18.
    Quote Quote  
  7. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Originally Posted by Jagomister View Post
    When the #EXTINF is removed it downloads segment one correctly but skips 2 and moves number on all rest up by 1

    with it in it fails 1 and does all the rest correctly
    I have no idea what you're talking about. I checked the duration of the final video and is the same as the original. If, however, my approach doesn't work for you, then maybe someone will come up with a better fix. The main idea is that there are no corrupted fragments, only that N_m3u8 can't handle them.
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*]
    Quote Quote  
  8. N_m3u8DL-RE is a great tool, but it's not perfect. For AES-128 where the key is easily located with an URI, I personally prefer Streamlink. And it seems to do the job perfectly here. Just replace the path/to/key with the proper URI for each stream:

    Code:
    ❯ streamlink --hls-segment-key-uri "https://path/to/key/" "https://d2o75c1wl3rtfi.cloudfront.net/Philsophy-MASTER-1/index.m3u8" best -o "Philosophy.mp4"
    [cli][info] Found matching plugin hls for URL https://d2o75c1wl3rtfi.cloudfront.net/Philsophy-MASTER-1/index.m3u8
    [cli][info] Available streams: 73k (worst), 224p_alt, 224p, 720p_alt, 720p (best)
    [cli][info] Opening stream: 720p (hls-multi)
    [cli][info] Writing output to
    ...\Philosophy.mp4
    [utils.named_pipe][info] Creating pipe streamlinkpipe-15160-1-5915
    [utils.named_pipe][info] Creating pipe streamlinkpipe-15160-2-8337
    [download] Written 779.94 MiB to Philosophy.mp4 (36s @ 22.46 MiB/s)
    [cli][info] Stream ended
    [cli][info] Closing currently open stream...
    No mux or sync issues.
    Quote Quote  
  9. Originally Posted by 2nHxWW6GkN1l916N3ayz8HQoi View Post
    Originally Posted by Jagomister View Post
    When the #EXTINF is removed it downloads segment one correctly but skips 2 and moves number on all rest up by 1

    with it in it fails 1 and does all the rest correctly
    I have no idea what you're talking about. I checked the duration of the final video and is the same as the original. If, however, my approach doesn't work for you, then maybe someone will come up with a better fix. The main idea is that there are no corrupted fragments, only that N_m3u8 can't handle them.


    If you do not remove the #EXTINF look in the working directory you will notice that seg 0 failed ad 1,2 ... where fine
    If you remove the #EXTINF then seg 0 downloads fine however seg 1 is skipped so seg 2 is becomes 1.ts 3 become 2.ts .....
    when the segments are combined seg 0 is doubled and and used in position 0 and 1 (first 24 secs is seg 0 on repeat)
    Quote Quote  
  10. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Originally Posted by stabbedbybrick View Post
    N_m3u8DL-RE is a great tool, but it's not perfect. For AES-128 where the key is easily located with an URI, I personally prefer Streamlink. And it seems to do the job perfectly here.
    Thanks a lot @brick for providing the better tool in this case. @Jago read @brick's comment. It's the proper solution.
    Last edited by 2nHxWW6GkN1l916N3ayz8HQoi; 10th Mar 2024 at 05:22.
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*]
    Quote Quote  
  11. Yer I am its working great. Did not like passing the key as a file path but easy to put them on web server and
    Quote Quote  



Similar Threads

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