Comments (5)
provide details:
- version of java-youtube-downloader
- some video links as examples
- code snippet you use to pick formats
from java-youtube-downloader.
RequestVideoInfo request = new RequestVideoInfo(videoId);
Response<VideoInfo> response = downloader.getVideoInfo(request);
VideoInfo video;
if((video = response.data())==null){
throw new Exception("No internet connection");
}
Format playbackFormat=video.bestVideoWithAudioFormat();
this is basically the code I use.
https://www.youtube.com/watch?v=ZRtdQ81jPUQ
Here is a link to the video. The max quality there is 4k but the best audio with video format available is 720p. I look through the list of formats available and its not the bestVideoWithAudioFormat() not being able to detect a better format, it simply isn't on the list. I was wondering if perhaps an itag is missing but that does not seem to be the case.
from java-youtube-downloader.
I looked around and in the function "populateFormats" in class ParserImpl where the list of formats is, well ,populated I checked the itags and indeed the higher qualities are with itags no audio but that does not make sense as in youtube they should have audio.
here is a picture while I am debugging and this one and the one below it are 2160p and they are both no audio.
from java-youtube-downloader.
Okay.. the problem isn't in the program. It finds all the itags just fine but the thing is that the youtube video player (when quality is higher than say something like 720p) it seems to split up video and audio data. Basically to download a video with higher quality and audio with higher quality at the same time you have to make separate requests to the urls of each player (audio and video) and splice them together. When I have time I can try implementing a fix.
from java-youtube-downloader.
it seems to split up video and audio data
absolutely right, this is the way youtube works - it combines video and audio, only some formats have both audio and video
from java-youtube-downloader.
Related Issues (20)
- How to Know The Size Of Video ? HOT 2
- response.data() returns null HOT 12
- Format.contentLength() returns null HOT 6
- Download completed immediately without having the full video HOT 5
- i have implement with your doc, using async..why cant get more info about video? HOT 2
- It seems like maven artifacts are gone causing dependency issues. HOT 2
- NumberFormatException HOT 3
- streamingData not found HOT 11
- Downloading files is too slow and sometimes fails. HOT 7
- some time can not get video info
- The downloader returns a null response. HOT 4
- No subtitles anymore HOT 3
- Not working anymore HOT 1
- Can not download video at any ratio.
- Playlist detail problem HOT 3
- not working anymore HOT 2
- Option to name video files when downloading HOT 1
- tiktok support
- Some weird console outputs while requesting video info HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from java-youtube-downloader.