Skip to content

Video file downloader utility. Applicable for downloading TS videos from websites

License

Notifications You must be signed in to change notification settings

Jet-C/java-video-downloader-util

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

java-video-downloader-util

Transport Stream (TS) video downloader utility. Applicable for downloading *.ts video files from websites.

Detail Article

https://jet-cabral.medium.com/java-ts-video-downloader-a0fcf23ab84a

System Requirements

  1. Java version 8+ --> https://www.oracle.com/java/technologies/javase-downloads.html
  2. Maven --> https://maven.apache.org/install.html
  3. Install FFmpeg --> https://ffmpeg.org/download.html

Usage:

* The downloaded output video can be found under: /<_your-system_>/java-video-downloader-util/VideoOutputDirectory/Full_Video.ts

* The website's HAR log file can be found under: /<_your-system_>/java-video-downloader-util/HttpArchiveOutput/trace-website-http-requests.har

IDE:

  1. Run as mvn project
  2. Pass the website url as the 1st and only cmd line args https://website-with-video.com

Command Line Maven:

  1. mvn clean compile exec:java -Dexec.cleanupDaemonThreads=false -Dexec.mainClass="com.video.downloader.MainVideoDownloader" -Dexec.args="https://website-with-video.com"

EXAMPLE USAGE

Utility Execution steps

  1. Search and find m3u8 file http requests in Website (Uses Selenium and Browsermob proxy to run Chrome and capture http requests. Http Archive HAR file is created in /<your-system>/java-video-downloader-util/HttpArchiveOutput/trace-website-http-requests.har
  2. Identify M3U8 master playlist file and pick out the best quality bit rate variant m3u8
  3. Download/Read m3u8 text file which contains all path references for video *.ts file urls
  4. Multi-thread video *.ts file downloads
    • Utility implements retry logic for any unsuccessful *.ts file downloads
  5. Download and write each individual *.ts file to /<your-system>/java-video-downloader-util/VideoOutputDirectory/.
  6. Run/Execute ffmpeg command to concat all *.ts files into a single output Full_Video.ts file under /<your-system>/java-video-downloader-util/VideoOutputDirectory/Full_Video.ts

References

Considerations

  • This utility has only been tested on a Windows 10 OS machine. Functionality is not guaranteed on another platform

About

Video file downloader utility. Applicable for downloading TS videos from websites

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages