Giter VIP home page Giter VIP logo

Comments (5)

sealedtx avatar sealedtx commented on August 11, 2024

provide details:

  • version of java-youtube-downloader
  • some video links as examples
  • code snippet you use to pick formats

from java-youtube-downloader.

iexavl avatar iexavl commented on August 11, 2024
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.

iexavl avatar iexavl commented on August 11, 2024

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.
image

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.

iexavl avatar iexavl commented on August 11, 2024

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.

sealedtx avatar sealedtx commented on August 11, 2024

@iexavl

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.