Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to execute youtube-dl from Java

I've tried executing youtube-dl from Java using Runtime.getRuntime().exec("youtube.dl url") but I've quickly realised its a lot more complicated! There are several programs on github where coders are developing programs to execute youtube-dl from Java, which would be the best for me to go with? Any help or advice would be useful. Thanks.

like image 557
Hywel Griffiths Avatar asked Mar 08 '26 04:03

Hywel Griffiths


1 Answers

The youtubedl-java Github project might work for you. As of Dec 2021, it looks abandoned, but the lastest version works for me.

<dependency>
    <groupId>com.github.sapher</groupId>
    <artifactId>youtubedl-java</artifactId>
    <!-- latests release version -->
    <!-- version>1.1</version -->
    <version>2cbe41f</version> <!-- i use latest commit to get callback interface class -->
</dependency>
like image 105
devdanke Avatar answered Mar 10 '26 17:03

devdanke



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!