Skip to content

shishantbiswas/hls_download_cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HLS/M3U8 Download CLI

A cli written in java to download m3u8 manifest based video and combine them in a mp4 video

Compilation (javac)

    # compile the src code
    # the compilation requires the
    # org.json.JSONObject package
    
    javac -cp json-20240303.jar src/*.java

Running (java)

    # running the class file
    java -cp json-20240303.jar:./src Main https://bitdash-a.akamaihd.net/content/sintel/hls/video/500kbit.m3u8 yourDesiredFileName 

An alternative way to compile it would be to use Graalvm or scala-native

Compilation (graalvm)

    # compile the src code
    javac -cp json-20240303.jar src/*.java
    
    # installing graalvm gives you the native-image command 
    native-image -cp . json-20240303.jar:./src Main --enable-sbom -march=native --strict-image-heap --no-fallback

lastly, you'll need a statically compiled binary of ffmpeg or else the video merge would fail until ffmpeg successfully merges it together, extract it and add the ffmpeg binary to the root directory where your code is executing or wherever you decide to run the graalvm binary at

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages