I found similar questions in stack overflow, and I tried few of solutions. All are outdates. So I am rising a new issue. Please provide me latest solutions if you tried recently please.
I fallow and tried:
How to download videos from youtube on java?
I gone through the youtube-api, it not providing anything to download as I understand the samples provided in Github.
https://developers.google.com/youtube/v3/code_samples/java
It tried with latest VGet API, it working well but it downloading video(mp4) and audia(webm) seperately.
Do you have solution how to combile both.
import com.github.axet.vget.VGet;
public class YoutubeDownloadTool {
public static void main(String[] args) {
try {
String url = "https://www.youtube.com/watch?v=7lFhwXeSidQ";
String path = "D:\\videos";
VGet v = new VGet(new URL(url), new File(path));
v.download();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}