Illustration of a computer screen displaying code, surrounded by icons of a gear, Android, and Apple symbols, representing software development.

To reconstruct the source video link for a Brightcove-hosted video, you can use the information embedded in the code snippet. Here’s a deconstruction of the pivotal parts and how they help:

Data in the Snippet:

  1. data-account: 6058004206001 – The Brightcove account ID.
  2. data-player: default – The player configuration being used.
  3. data-embed: default – The embed type.
  4. data-video-id: 6362567185112 – The one-off ID of the video.

Approach to Retrieve the Source Video:

  1. Brightcove URL Pattern: Brightcove videos are typically hosted with a URL in the following format:
  2. https://players.brightcove.net//_/index.?videoId=

Employing the data: Here is a demo video we downloaded from the landing page that was sent from a Yahoo Finance paid ad

https://players.brightcove.net/6058004206001/default_default/index.html?videoId=6362567185112

  1. Blob URL:
    • The src="blob:https://www3.enrichyourfood.com/c8845aef-95b7-4276-8c61-02ba0815b570" is a temporary URL pointing to the video stream. This blob link is a client-side representation, not directly accessible.
    • To access the real video source, you need to inspect the network traffic when the page loads. Tools like browser developer tools (e.g., Chrome DevTools) or network monitoring tools (like Fiddler) can be used to locate .m3u8 or .mp4 video files being loaded.
  2. Steps to Extract the Video Source:
    • Open the browser’s Developer Tools (usually F12).
    • Create Positive to the Network tab and refresh the page containing the video.
    • Filter the requests using keywords like .m3u8 or .mp4.
    • Locate the request associated with Brightcove’s CDN (e.g., URLs like https://brightcove.vo.llnwd.net/...).
    • Copy the full URL of the file for direct playback or download.
  3. Caution – Most Brighcove Videos are Copyright and Owned by the Publisher, The above mentioned way of saving for offline viewing is for **Personal Use / Fair Use** only:
    • Brightcove videos are protected with DRM, and you might not be able to retrieve or play them outside their intended setting. And all are protected by copyright.
    • Ensure that your use of any extracted video adheres to copyright and licensing policies.

 

Now that you have the video loaded on the Brightcove player page, here are the steps to inspect the network traffic and find the direct .mp4 or .m3u8 video URL:


Steps to Open Developer Tools and Find the Video URL:

  1. Open the Developer Tools:
    • On your browser, press F12 (or Ctrl+Shift+I on Windows/Linux, Cmd+Option+I on Mac).
    • This opens the Developer Tools panel.
  2. Go to the Network Tab:
    • In the Developer Tools, click on the “Network” tab.
    • This tab monitors all network requests made by the webpage.
  3. Filter for Video Files:
    • Use the filter bar (often a small text input at the top of the panel) to search for video-related requests.
    • Enter terms like:
      • .mp4
      • .m3u8
      • Or look for Brightcove-related domains such as brightcove.vo.llnwd.net.
  4. Reload the Page:
    • Refresh the page (e.g., press F5 or Ctrl+R).
    • This ensures all video-related network requests are captured.
  5. Locate the Video Request:
    • Look for a request with a file type like:
      • .mp4 – A direct video file.
      • .m3u8 – A playlist file used for streaming.
    • Note: If you see an .m3u8 file, it usually points to an adaptive bitrate streaming setup (HLS). This means the video is broken into smaller chunks.
  6. Right-Click and Copy the URL:
    • Once you find the request, right-click on it and choose “Copy URL” (or similar, depending on your browser).
  7. Test the URL:
    • Paste the copied URL into a new browser tab or a media player (like VLC) to confirm it works.
    • For .m3u8, a media player like VLC can stream it directly, or you can use tools like youtube-dl to download it.

Optional: Tools Like youtube-dl

If you find an .m3u8 file and want to download the video, you can use a command-line tool like youtube-dl

Use your termal BASH command and put in: youtube-dl “URL”

 

Step-by-Step Process to Reconstruct the .ts Files:

  1. Understand the .m3u8 File:
    • The .m3u8 file is a playlist that lists the URLs of the .ts segments in sequential order.
    • Open the .m3u8 file in a text editor or a browser to view its contents.
    • Each #EXTINF represents the duration of a segment, followed by the segment file (e.g., segment1.ts).
  2. Download All .ts Files:
    • Use a script or tool to download all .ts files listed in the .m3u8 playlist.
    • If the .m3u8 file contains full URLs for the .ts files, you can directly use wget or curl in a terminal.
    • If the .m3u8 file contains only relative paths (e.g., segment1.ts), prepend the base URL (e.g., https://example.com/video/) to each segment URL.
  • Combine the .ts Files:
    • Once all .ts files are downloaded, concatenate them into a single video file. This can be done using tools like FFmpeg: Here is the bash command
    • ffmpeg -i playlist.m3u8 -c copy output.mp4
    • If you downloaded the .ts files manually, you can combine them like this:
    • cat segment1.ts segment2.ts segment3.ts > combined.ts
      ffmpeg -i combined.ts -c copy output.mp4
    1. Verify the Final Video:
      • Play the output.mp4 file in a media player to ensure the reconstruction was successful.

    Alternative Tools for Automation

    If you prefer not to deal with codex downloads and reconstruction:

    • Use youtube-dl or its successor yt-dlp: Command: yt-dlp -o “output.mp4” “URL_to_m3u8”
  • These tools handle the .m3u8 file, download all segments, and merge them automatically into a single file.

download brightcove