Needed a local copy of a video posted to social media, and realized today I already had the tools to obtain it.

Requirements

  • FFmpeg
  • Web browser
  1. Open the page containing the video. Do not start playing the video yet
  2. Open the browser’s dev tools and click to the Network tab
  3. (Optional) Set the filter to “Media”
  4. Start playing the video
  5. Look in the network tab for the first network request that references an .m3u8 file.
  6. Copy that URL
  7. Run ffmpeg -protocol_whitelist file,http,https,tcp,tls,crypto -i "https://url-you-copied/file.m3u8" -c copy output_filiename.mp4

That’s it.

  • inlandempire@jlai.lu
    link
    fedilink
    English
    arrow-up
    7
    ·
    2 days ago

    Wish I saw this when I was struggling with some video on I stock, I ended up downloading the m3u8 file and rebuilt it into mp4 with VLC I think

    Anyway thanks for the tip!!

    • Admiral Patrick@dubvee.orgOP
      link
      fedilink
      English
      arrow-up
      5
      ·
      2 days ago

      Yeah, I saw the steps for VLC and they’re similar. I tend to prefer CLI, so that’s what I did / wrote up.

      • inlandempire@jlai.lu
        link
        fedilink
        English
        arrow-up
        4
        ·
        2 days ago

        Yeah I feel more comfortably just typing the commands instead of trying to find my way through a gui

  • Bobby Turkalino
    link
    fedilink
    English
    arrow-up
    4
    ·
    2 days ago

    This is what I use to download game replays from NFL+, because they don’t have a download function for whatever reason