VideoHelp Forum
+ Reply to Thread
Results 1 to 24 of 24
Thread
  1. Member
    Join Date
    Mar 2023
    Location
    Romānia
    Search Comp PM
    Hello!! I'm a medical student in my first year and since a few months I came across many subscription based websites which offer a great deal of explained medical content on examination topics, one of them is Osmosis (osmosis.org). I tried to retrieve the .m3u8 file by the classical method with inspect element but I did not succeed. Is anyone willing to help me on how to download osmosis videos for free, please? (step by step) It would be a great deal for me and my colleagues as it is not so affordable 😅

    https://www.osmosis.org/learn/Anatomy_of_the_heart?from=/do/foundational-sciences/anat...thorax/anatomy
    Quote Quote  
  2. the easiest way would be to find the request url like this "data:application/x-mpegURL;base64,I0VYVE0zVQo.....<long_string>" in the network tab
    then go to the response tab copy the whole response, and save it as a m3u8 file eg heart.m3u8.

    then download it with n_m3u8dl-re.
    eg.
    Code:
    n_m3u8dl-re heart.m3u8

    if you wanted to automate it, look for the request with "videoPlaylist" in the url.
    the response to this is the m3u8 playlist but it has been reversed (and upside down) and it also doesnt have a full url for the key.
    you just need to reverse the text and then add the rest of the url to the key part to get a working m3u8
    Quote Quote  
  3. Member
    Join Date
    Mar 2023
    Location
    Romānia
    Search Comp PM
    OH MY GOD this actually worked!!! Thank you so so so much 💙💙💙💙 you just saved lives (seriously, these videos will make us better doctors ❤️)
    Quote Quote  
  4. Member
    Join Date
    Jul 2021
    Location
    Desktop
    Search Comp PM
    Ah, it works but it's a pain to process them one by one.
    Quote Quote  
  5. Member
    Join Date
    Mar 2023
    Location
    Romānia
    Search Comp PM
    i was able to convert it to m3u8 file but now I don't know how to convert it to mp4...
    Quote Quote  
  6. @ElCap Thanks for the detailed explaination.

    @Vy23, you wrote


    1) OH MY GOD this actually worked!!!


    and later


    2) i was able to convert it to m3u8 file but now I don't know how to convert it to mp4


    This does not make sense. If it worked as you stated, then you would have had a file with a name similar to heart_2023-03-03_23-07-17.mp4

    Please study this code and modify as required when needing to download another video


    Code:
    curl -ks "https://www.osmosis.org/videoPlaylist?hash=bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7z&mediaID=56924608" | rev | sed "1!G;h;$!d" | sed -e "/EXT-X-KEY/ {s#URI=\"#URI=\"https://www.osmosis.org#}" > heart.m3u8 & N_m3u8DL-RE heart.m3u8
    Image Attached Files
    Quote Quote  
  7. Explaining the code using the instructions as per ElCap



    look for the request with "videoPlaylist" in the url.
    curl -ks "https://www.osmosis.org/videoPlaylist?hash=bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7 z&mediaID=56924608"



    the response to this is the m3u8 playlist but it has been reversed
    rev


    (and upside down)
    sed "1!G;h;$!d"




    and it also doesnt have a full url for the key.
    sed -e "/EXT-X-KEY/ {s#URI=\"#URI=\"https://www.osmosis.org#}"


    Save the working m3u8 to heart.m3u8
    > heart.m3u8




    Download the video file
    N_m3u8DL-RE heart.m3u8
    Quote Quote  
  8. Member
    Join Date
    Mar 2023
    Location
    Romānia
    Search Comp PM
    Yesss it worked in the sense I succeeded to get a m3u8 file!
    Now I succeeded to get an mp4 file but with VLC, I used the convert function from VLC to convert m3u8 to ".ts" (".mp4" was crashing vlc) and then from ".ts" to ".mp4" with a video editor converter.. in the end it worked yay
    thank you!!
    Quote Quote  
  9. Member
    Join Date
    Mar 2023
    Location
    Romānia
    Search Comp PM
    @jack_666 sorry I am not really into all of this so it's a bit harder to understand where to introduce each line of code, but thank you!!
    Quote Quote  
  10. JeanetGuillen
    Guest
    Hello! I have also trouble introducing each line of the code, and I also wanna ask how I can save the working m3u8 to heart.m3u8, and download the video file. I am a future doctor, and as a student, I feel the responsibility to learn intensively. I try finding only trustful sources and use only support from professionals. On https://papersowl.com/write-my-essay-please I find many exciting ideas from academic experts. Frequently I ask them to write my essay to gain valuable knowledge. Therefore, to achieve your goals in medicine and any other science field, you must learn and study continuously and qualitatively. Hope I've helped you and brought valuable resources.
    Last edited by JeanetGuillen; 31st Mar 2023 at 04:00.
    Quote Quote  
  11. Originally Posted by JeanetGuillen View Post
    Hello! I have also troubles introducing each line of the code, and also wanna ask how can I save the working m3u8 to heart.m3u8, and download the video file?
    Thanks!
    have a look at the code in Jacks previous post #6 as this is what you need to run (replacing the videoPlaylist url, of course)
    post #7 is a detailed explanation of each part of his code.

    if that is a bit advanced for you, try my method in post #2
    Quote Quote  
  12. Banned
    Join Date
    Oct 2022
    Location
    hhhhhhhhhhh
    Search Comp PM
    guys good to see you all helping , but do we know for sure if these guys are telegram sellers or not? i did notice some things in telegram recently, which i will not tell here
    Quote Quote  
  13. Originally Posted by jack_666 View Post
    @ElCap Thanks for the detailed explaination.

    @Vy23, you wrote


    1) OH MY GOD this actually worked!!!


    and later


    2) i was able to convert it to m3u8 file but now I don't know how to convert it to mp4


    This does not make sense. If it worked as you stated, then you would have had a file with a name similar to heart_2023-03-03_23-07-17.mp4

    Please study this code and modify as required when needing to download another video


    Code:
    curl -ks "https://www.osmosis.org/videoPlaylist?hash=bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7z&mediaID=56924608" | rev | sed "1!G;h;$!d" | sed -e "/EXT-X-KEY/ {s#URI=\"#URI=\"https://www.osmosis.org#}" > heart.m3u8 & N_m3u8DL-RE heart.m3u8
    Hi, i'm trying to download a video, but it gives an error. "/bin/bash: /content/N_m3u8DL-RE: cannot execute binary file: Exec format error"
    Quote Quote  
  14. Member
    Join Date
    Sep 2023
    Location
    iran parsabad
    Search Comp PM
    Originally Posted by jack_666 View Post
    Explaining the code using the instructions as per ElCap



    look for the request with "videoPlaylist" in the url.
    curl -ks "https://www.osmosis.org/videoPlaylist?hash=bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7 z&mediaID=56924608"



    the response to this is the m3u8 playlist but it has been reversed
    rev


    (and upside down)
    sed "1!G;h;$!d"




    and it also doesnt have a full url for the key.
    sed -e "/EXT-X-KEY/ {s#URI=\"#URI=\"https://www.osmosis.org#}"


    Save the working m3u8 to heart.m3u8
    > heart.m3u8




    Download the video file
    N_m3u8DL-RE heart.m3u8
    hello .thank you for being helpful .im just a medicine student in iran tehran and we actually dont have access to the regular payment methods here.so i couldnt purchase osmosis prime/ i was able to find media id and playlist url in different videos as you said my question is where am i going to put these together...? cmd ? i have no idea where that code belongs and how it is going to be a downloadable link
    Quote Quote  
  15. cmd ? i have no idea where that code belongs and how it is going to be a downloadable link
    Yes you need to use cmd. Most of the required software for this task require the knowledge of cmd/cli ( windows batch and command line interface)


    If you find the code that I wrote to be difficult to follow (and I do understand that it is), then I highly recommend the solution that ElCap proposed in post #2


    we actually dont have access to the regular payment methods here.so i couldnt purchase osmosis prime
    Very sorry to hear.


    Wishing you all the best in your endeavors.
    Quote Quote  
  16. Hi. there could someone explain what i need to do get it to work. Im new to this.

    I found videoplaylist
    then i found the response
    then im lost to what to do.
    U guys mentioned its reverse then i need to add some coding.

    Thanks
    Quote Quote  
  17. Link removed due to complaint
    Last edited by jack_666; 14th Oct 2023 at 17:37.
    Quote Quote  
  18. Link removed due to complaint
    Quote Quote  
  19. Originally Posted by jack_666 View Post
    @ElCap Thanks for the detailed explaination.

    @Vy23, you wrote


    1) OH MY GOD this actually worked!!!


    and later


    2) i was able to convert it to m3u8 file but now I don't know how to convert it to mp4


    This does not make sense. If it worked as you stated, then you would have had a file with a name similar to heart_2023-03-03_23-07-17.mp4

    Please study this code and modify as required when needing to download another video


    Code:
    curl -ks "https://www.osmosis.org/videoPlaylist?hash=bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7z&mediaID=56924608" | rev | sed "1!G;h;$!d" | sed -e "/EXT-X-KEY/ {s#URI=\"#URI=\"https://www.osmosis.org#}" > heart.m3u8 & N_m3u8DL-RE heart.m3u8

    Hi Jack.

    I have tried the code you have sent and swapped the videoplaylist link. However, I keeping getting the error - "Uncaught SyntaxError: Unexpected string".
    I have tried it one by one and it appears the syntax error is caused by the first line.

    Have you got any ideas for a solution?

    Many thanks.
    Quote Quote  
  20. Here is a further code bread down. Please study this.


    Part 1 capture the manifest (m3u8)


    Code:
    curl -ks "https://www.osmosis.org/videoPlaylist?hash=bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7z&mediaID=56924608"
    bottom of response


    Code:
    KG3ME8OUW07FK=dI-riaP-yeK&__QH6Z6ozCDEPYqOil3Gl7b3p2~u9dd6OrJ~PSsRWyB~HZCyzeGVainlbPxhxfU6HURKm~uoIygIUk2lS4QvM2OHb0tTGJkqo5Sl1zJ-En0Ce9psXqw3J5~l8q8ng8rn8PM2jlS1QT87P0lVgebr4F4XixqbAWUpInrsrJNJWZN0dLkymDgtZ2FpqGOFYFhIwt4xQk8Z6iI0-DIlpCUDbSVs3kR7greaWw~gn-pSSgCESbCpdFxlv8SY1pq60XVoBr-bYp772CCZuo9c7Cx30COWdn2K4m6GXXvaKBrHRXdMIab8QWKoZEK-BCpNvYxOySqmErcXqZpeuvv10EWKVqMB=erutangiS&_0XX91Xf5MDM3MjM5kjNxojIl1WaUh2YvBXR6M1VBJye6IibhhGVzNXZMVGdhRkI7pjIu9Wa0lGZu92QiwiIw0jclNXd~MHduoyL6dTQwF1XHNlW0pGRX9lRwUVd3MGaDFjUMNUcqZUNqJ2L0VmbuQnbvJnZkV3bsNmLspWdppXYrVHZ2gmbk9yL6MHc0RHaiojIlNmc192clJlI7tlOiQnbl1WZ0FGdTJye=yciloP&9307329961=seripxE&0=resu?st.0z7ApQ_GSZtjDW_F0Uu7chC1RLCqjF5jb/z7ApQ_GSZtjDW_F0Uu7chC1RLCqjF5jb/ten.tnorfduolc.ljuizakud6hnd//:sptth
    ,3333.8:FNITXE#
    36237393532333566643331623263643x0=VI,"z7ApQ_GSZtjDW_F0Uu7chC1RLCqjF5jb=hsah?yek.cne/"=IRU,821-SEA=DOHTEM:YEK-X-TXE#
    0:ECNEUQES-AIDEM-X-TXE#
    9:NOITARUDTEGRAT-X-TXE#
    3:NOISREV-X-TXE#
    U3MTXE#
    Part 2 ... characters are reversed
    curl -ks "https://www.osmosis.org/videoPlaylist?hash=bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7 z&mediaID=56924608" | rev


    bottom section of code ... notice the reverse


    Code:
    #EXTINF:8.3333,
    https://dnh6dukaziujl.cloudfront.net/bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7z/bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7z0.ts?user=0&Expires=1699237155&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kbmg2ZHVrYXppdWpsLmNsb3VkZnJvbnQubmV0L2JqNUZqcUNMUjFDaGM3dVUwRl9XRGp0WlNHX1FwQTd6LyoudHM~dXNlcj0wIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNjk5MjM3MTU1fX19XX0_&Signature=JlfAdy9cfHjg8ROAyu1ABaybqFgG0tDKbp7h~dv8wdsCo1WJusxhpEBzRhUcSo2a7QmOC6TlMw2Yn5FFXFxYRTdujzU4E6FV08HhcoLo~YwF3QMfAF3ZeyHd2DhS0hazpsiJ5sbse~2pjjmUVl~ml0lQIc~lpmGxE9To7ueSnch1PQqmVvx779oafPfEf870yI4VNlghWqiEdq3q62aRSlKMWrwYaa97lV8IXIPIGccGrj9UhEIlHiQ3RQRBx9gI2~L~TQvaqx5n-rgy7sOpZiQjeZiVCVIbL4sbvI5Ukr0G1uldNIF4j4fmdCeIlHAOSFGFNt8~KVaZcsdl3574Ag__&Key-Pair-Id=KF70WUO8EM3GK
    #EXTINF:8.3333,
    #EXT-X-KEY:METHOD=AES-128,URI="/enc.key?hash=bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7z",IV=0x34636232613334666533323539373263
    #EXT-X-MEDIA-SEQUENCE:0
    #EXT-X-TARGETDURATION:9
    #EXT-X-VERSION:3
    #EXTM3U
    Part 3 the code is reversed. What was top is now bottom and the vise versa.


    Code:
    curl -ks "https://www.osmosis.org/videoPlaylist?hash=bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7z&mediaID=56924608" | rev | sed "1!G;h;$!d"
    #EXTM3U
    Code:
    #EXT-X-VERSION:3
    #EXT-X-TARGETDURATION:9
    #EXT-X-MEDIA-SEQUENCE:0
    #EXT-X-KEY:METHOD=AES-128,URI="/enc.key?hash=bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7z",IV=0x34636232613334666533323539373263
    #EXTINF:8.3333,
    https://dnh6dukaziujl.cloudfront.net/bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7z/bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7z0.ts?user=0&Expires=1699237240&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kbmg2ZHVrYXppdWpsLmNsb3VkZnJvbnQubmV0L2JqNUZqcUNMUjFDaGM3dVUwRl9XRGp0WlNHX1FwQTd6LyoudHM~dXNlcj0wIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNjk5MjM3MjQwfX19XX0_&Signature=g-7yfQlbiR9OtHEU9x1RTeBv27pqyiEE3THfFfOrqZWaNtjfRGD7t1c4TRYB3~0l8EtDllXZc7EH6f4mWeKWSVmE2uDdWVHdBqY75MtGCizr7iEZ9WxhdJQQK2uxw8fAz9e9piyOeWPaSx2JkCElyD97T~7XdXLDOLG6ufMr3W4qAHgPeG0CiUAT8ZkMeqBBj2fcAuR7sgCgpg5fLzBa5r-oAUOWp-25qaM-Uhg6OfmkyNr4LFsIDo7VPnmnNmjBvccrJ2akgakS-EUFKn3P12OtPPFTG5yOtyTN3kwPPSOODrZvwPzIMyRFTtBn2I-W-l-iLh0~5QYvG5kbwujjJg__&Key-Pair-Id=KF70WUO8EM3GK
    Part 4 added the complete URI to the manifest


    Code:
    curl -ks "https://www.osmosis.org/videoPlaylist?hash=bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7z&mediaID=56924608" | rev | sed "1!G;h;$!d" | sed -e "/EXT-X-KEY/ {s#URI=\"#URI=\"https://www.osmosis.org#}"

    Code:
    #EXTM3U
    #EXT-X-VERSION:3
    #EXT-X-TARGETDURATION:9
    #EXT-X-MEDIA-SEQUENCE:0
    #EXT-X-KEY:METHOD=AES-128,URI="https://www.osmosis.org/enc.key?hash=bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7z",IV=0x34636232613334666533323539373263
    #EXTINF:8.3333,
    https://dnh6dukaziujl.cloudfront.net/bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7z/bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7z0.ts?user=0&Expires=1699237328&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kbmg2ZHVrYXppdWpsLmNsb3VkZnJvbnQubmV0L2JqNUZqcUNMUjFDaGM3dVUwRl9XRGp0WlNHX1FwQTd6LyoudHM~dXNlcj0wIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNjk5MjM3MzI4fX19XX0_&Signature=mr88UPA3WFOHgyMdsfHNpceHYNsrBrmYFvphDK0MyH-wq6AV03Hpq56-rLhOP2~qNFB2jIzzXG44PkwytKy1jThOb9279uNhzDUq81icJ5nJbgQ1EIZHcQwLMziDEaM91CXoRzgyE~wsgJRo9i9TmtECRdM7jLR4kZWVdTQGr8CyCAAmtzQ6EZ1jkZS9oW~RtMOqfhX6sKzptEImMMKkx3pz~fot4OR4GBQYpvq7D4Ubmzomct4Wg1~Z1Tf3n~ItyqIQQh3D6OB1UcCn-bJK-84WgOj6eRVIW-jqDgwHqy9sW7ZPFxU3BSHvwfaxiidVJJlhtGgvWIGc2jsLs1mGKw__&Key-Pair-Id=KF70WUO8EM3GK
    The manifest is then saved to heart.m3u8 (in the same directory from which the script is run) and N_m3u8DL-RE is then used to download the video.


    Does not work?, then use google to figure out the reason. Don't have the window's file?. Again, use google.


    you can use
    Code:
    sed "G;:a;s/^\(.\)\(.*\n\)/\2\1/;ta;s/\n//"
    instead of rev


    Therefore, the whole code can be executed with just sed as curl comes with windows
    Quote Quote  
  21. Originally Posted by jack_666 View Post
    Here is a further code bread down. Please study this.


    Part 1 capture the manifest (m3u8)


    Code:
    curl -ks "https://www.osmosis.org/videoPlaylist?hash=bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7z&mediaID=56924608"
    bottom of response


    Code:
    KG3ME8OUW07FK=dI-riaP-yeK&__QH6Z6ozCDEPYqOil3Gl7b3p2~u9dd6OrJ~PSsRWyB~HZCyzeGVainlbPxhxfU6HURKm~uoIygIUk2lS4QvM2OHb0tTGJkqo5Sl1zJ-En0Ce9psXqw3J5~l8q8ng8rn8PM2jlS1QT87P0lVgebr4F4XixqbAWUpInrsrJNJWZN0dLkymDgtZ2FpqGOFYFhIwt4xQk8Z6iI0-DIlpCUDbSVs3kR7greaWw~gn-pSSgCESbCpdFxlv8SY1pq60XVoBr-bYp772CCZuo9c7Cx30COWdn2K4m6GXXvaKBrHRXdMIab8QWKoZEK-BCpNvYxOySqmErcXqZpeuvv10EWKVqMB=erutangiS&_0XX91Xf5MDM3MjM5kjNxojIl1WaUh2YvBXR6M1VBJye6IibhhGVzNXZMVGdhRkI7pjIu9Wa0lGZu92QiwiIw0jclNXd~MHduoyL6dTQwF1XHNlW0pGRX9lRwUVd3MGaDFjUMNUcqZUNqJ2L0VmbuQnbvJnZkV3bsNmLspWdppXYrVHZ2gmbk9yL6MHc0RHaiojIlNmc192clJlI7tlOiQnbl1WZ0FGdTJye=yciloP&9307329961=seripxE&0=resu?st.0z7ApQ_GSZtjDW_F0Uu7chC1RLCqjF5jb/z7ApQ_GSZtjDW_F0Uu7chC1RLCqjF5jb/ten.tnorfduolc.ljuizakud6hnd//:sptth
    ,3333.8:FNITXE#
    36237393532333566643331623263643x0=VI,"z7ApQ_GSZtjDW_F0Uu7chC1RLCqjF5jb=hsah?yek.cne/"=IRU,821-SEA=DOHTEM:YEK-X-TXE#
    0:ECNEUQES-AIDEM-X-TXE#
    9:NOITARUDTEGRAT-X-TXE#
    3:NOISREV-X-TXE#
    U3MTXE#
    Part 2 ... characters are reversed
    curl -ks "https://www.osmosis.org/videoPlaylist?hash=bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7 z&mediaID=56924608" | rev


    bottom section of code ... notice the reverse


    Code:
    #EXTINF:8.3333,
    https://dnh6dukaziujl.cloudfront.net/bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7z/bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7z0.ts?user=0&Expires=1699237155&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kbmg2ZHVrYXppdWpsLmNsb3VkZnJvbnQubmV0L2JqNUZqcUNMUjFDaGM3dVUwRl9XRGp0WlNHX1FwQTd6LyoudHM~dXNlcj0wIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNjk5MjM3MTU1fX19XX0_&Signature=JlfAdy9cfHjg8ROAyu1ABaybqFgG0tDKbp7h~dv8wdsCo1WJusxhpEBzRhUcSo2a7QmOC6TlMw2Yn5FFXFxYRTdujzU4E6FV08HhcoLo~YwF3QMfAF3ZeyHd2DhS0hazpsiJ5sbse~2pjjmUVl~ml0lQIc~lpmGxE9To7ueSnch1PQqmVvx779oafPfEf870yI4VNlghWqiEdq3q62aRSlKMWrwYaa97lV8IXIPIGccGrj9UhEIlHiQ3RQRBx9gI2~L~TQvaqx5n-rgy7sOpZiQjeZiVCVIbL4sbvI5Ukr0G1uldNIF4j4fmdCeIlHAOSFGFNt8~KVaZcsdl3574Ag__&Key-Pair-Id=KF70WUO8EM3GK
    #EXTINF:8.3333,
    #EXT-X-KEY:METHOD=AES-128,URI="/enc.key?hash=bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7z",IV=0x34636232613334666533323539373263
    #EXT-X-MEDIA-SEQUENCE:0
    #EXT-X-TARGETDURATION:9
    #EXT-X-VERSION:3
    #EXTM3U
    Part 3 the code is reversed. What was top is now bottom and the vise versa.


    Code:
    curl -ks "https://www.osmosis.org/videoPlaylist?hash=bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7z&mediaID=56924608" | rev | sed "1!G;h;$!d"
    #EXTM3U
    Code:
    #EXT-X-VERSION:3
    #EXT-X-TARGETDURATION:9
    #EXT-X-MEDIA-SEQUENCE:0
    #EXT-X-KEY:METHOD=AES-128,URI="/enc.key?hash=bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7z",IV=0x34636232613334666533323539373263
    #EXTINF:8.3333,
    https://dnh6dukaziujl.cloudfront.net/bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7z/bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7z0.ts?user=0&Expires=1699237240&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kbmg2ZHVrYXppdWpsLmNsb3VkZnJvbnQubmV0L2JqNUZqcUNMUjFDaGM3dVUwRl9XRGp0WlNHX1FwQTd6LyoudHM~dXNlcj0wIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNjk5MjM3MjQwfX19XX0_&Signature=g-7yfQlbiR9OtHEU9x1RTeBv27pqyiEE3THfFfOrqZWaNtjfRGD7t1c4TRYB3~0l8EtDllXZc7EH6f4mWeKWSVmE2uDdWVHdBqY75MtGCizr7iEZ9WxhdJQQK2uxw8fAz9e9piyOeWPaSx2JkCElyD97T~7XdXLDOLG6ufMr3W4qAHgPeG0CiUAT8ZkMeqBBj2fcAuR7sgCgpg5fLzBa5r-oAUOWp-25qaM-Uhg6OfmkyNr4LFsIDo7VPnmnNmjBvccrJ2akgakS-EUFKn3P12OtPPFTG5yOtyTN3kwPPSOODrZvwPzIMyRFTtBn2I-W-l-iLh0~5QYvG5kbwujjJg__&Key-Pair-Id=KF70WUO8EM3GK
    Part 4 added the complete URI to the manifest


    Code:
    curl -ks "https://www.osmosis.org/videoPlaylist?hash=bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7z&mediaID=56924608" | rev | sed "1!G;h;$!d" | sed -e "/EXT-X-KEY/ {s#URI=\"#URI=\"https://www.osmosis.org#}"

    Code:
    #EXTM3U
    #EXT-X-VERSION:3
    #EXT-X-TARGETDURATION:9
    #EXT-X-MEDIA-SEQUENCE:0
    #EXT-X-KEY:METHOD=AES-128,URI="https://www.osmosis.org/enc.key?hash=bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7z",IV=0x34636232613334666533323539373263
    #EXTINF:8.3333,
    https://dnh6dukaziujl.cloudfront.net/bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7z/bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7z0.ts?user=0&Expires=1699237328&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kbmg2ZHVrYXppdWpsLmNsb3VkZnJvbnQubmV0L2JqNUZqcUNMUjFDaGM3dVUwRl9XRGp0WlNHX1FwQTd6LyoudHM~dXNlcj0wIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNjk5MjM3MzI4fX19XX0_&Signature=mr88UPA3WFOHgyMdsfHNpceHYNsrBrmYFvphDK0MyH-wq6AV03Hpq56-rLhOP2~qNFB2jIzzXG44PkwytKy1jThOb9279uNhzDUq81icJ5nJbgQ1EIZHcQwLMziDEaM91CXoRzgyE~wsgJRo9i9TmtECRdM7jLR4kZWVdTQGr8CyCAAmtzQ6EZ1jkZS9oW~RtMOqfhX6sKzptEImMMKkx3pz~fot4OR4GBQYpvq7D4Ubmzomct4Wg1~Z1Tf3n~ItyqIQQh3D6OB1UcCn-bJK-84WgOj6eRVIW-jqDgwHqy9sW7ZPFxU3BSHvwfaxiidVJJlhtGgvWIGc2jsLs1mGKw__&Key-Pair-Id=KF70WUO8EM3GK
    The manifest is then saved to heart.m3u8 (in the same directory from which the script is run) and N_m3u8DL-RE is then used to download the video.


    Does not work?, then use google to figure out the reason. Don't have the window's file?. Again, use google.


    you can use
    Code:
    sed "G;:a;s/^\(.\)\(.*\n\)/\2\1/;ta;s/\n//"
    instead of rev


    Therefore, the whole code can be executed with just sed as curl comes with windows

    Thanks for getting back to me.
    The problem might be because I am using a macos instead of windows. I'll see what I can do.
    Quote Quote  
  22. simple python program to achieve the same result:
    Code:
    import subprocess
    
    
    url = "https://www.osmosis.org/videoPlaylist?hash=bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7z&mediaID=56924608"
    
    
    curl_command = f'curl -ks "{url}" | rev | sed \'1!G;h;$!d\' | sed -e "s#URI=\\"#URI=\\"https://www.osmosis.org#g"'
    response = subprocess.check_output(curl_command, shell=True)
    
    
    output_filename = input("Enter the desired output filename (without extension): ")
    output_mpd_filename = f'{output_filename}.mpd'
    
    
    with open(output_mpd_filename, 'wb') as file:
        file.write(response)
    
    
    download_command = f'N_m3u8DL-RE -M format=mp4 "{output_mpd_filename}" --save-name "{output_filename}.mp4"'
    subprocess.call(download_command, shell=True)
    Quote Quote  
  23. Originally Posted by swappyison View Post
    simple python program to achieve the same result:
    Code:
    import subprocess
    
    
    url = "https://www.osmosis.org/videoPlaylist?hash=bj5FjqCLR1Chc7uU0F_WDjtZSG_QpA7z&mediaID=56924608"
    
    
    curl_command = f'curl -ks "{url}" | rev | sed \'1!G;h;$!d\' | sed -e "s#URI=\\"#URI=\\"https://www.osmosis.org#g"'
    response = subprocess.check_output(curl_command, shell=True)
    
    
    output_filename = input("Enter the desired output filename (without extension): ")
    output_mpd_filename = f'{output_filename}.mpd'
    
    
    with open(output_mpd_filename, 'wb') as file:
        file.write(response)
    
    
    download_command = f'N_m3u8DL-RE -M format=mp4 "{output_mpd_filename}" --save-name "{output_filename}.mp4"'
    subprocess.call(download_command, shell=True)
    Thanks!

    I tried this however, it still doesn't work. Nothing is outputted as a file. Maybe because I'm on a macOS again...

    Anyone know how to get N_m3u8DL-RE to work on MacOS?
    Quote Quote  
  24. download from here
    Code:
    https://github.com/nilaoda/N_m3u8DL-RE/releases/tag/v0.2.0-beta

    use this command
    Code:
    chmod +x N_m3u8DL-RE
    Quote Quote  



Similar Threads

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