sealedtx / java-youtube-downloader

Simple, almost zero-dependency java parser for retrieving youtube video metadata
Other
413 stars 115 forks source link

there is many duplicated resolutions and size of video, which one is correct one. #88

Closed hk200 closed 3 years ago

hk200 commented 3 years ago

Hi i make a test page of video download and get a lot of duplicated resolution. Which one is the correct one of the same resolution? the remote url is: https://www.youtube.com/watch?v=vDQwzkxwHTs issue20210629001

sealedtx commented 3 years ago

@hk200 I assume that those duplicates may be different extensions: mp4, wemb etc. Check it out

hk200 commented 3 years ago

@hk200 I assume that those duplicates may be different extensions: mp4, wemb etc. Check it out

ok, I check it out.

hk200 commented 3 years ago

I filtered duplicated format and found there is only 2 of format videos with audio(1 of 360p and 1 of 720p), many format without audio. Is the youtube play video steam without sound and audio steam at the same time at higher format like 1080p, 4k, etc?

sealedtx commented 3 years ago

@hk200 I am not aware of this, but I may assume that they are combining video and audio for higher quality formats. Formats VideoWithAudioFormat usually have not the best quality, you may retrieve them with:

// get videos formats only with audio
List<VideoWithAudioFormat> videoWithAudioFormats = videoInfo.videoWithAudioFormats();
hk200 commented 3 years ago

@hk200 I am not aware of this, but I may assume that they are combining video and audio for higher quality formats. Formats VideoWithAudioFormat usually have not the best quality, you may retrieve them with:

// get videos formats only with audio
List<VideoWithAudioFormat> videoWithAudioFormats = videoInfo.videoWithAudioFormats();

Though their all higher resolution without audio, their online higher resolution videos do have audio output. I assume their online player make a some combination presentation of the video stream and audio steam based on there is no higher steam with audio available. Do you have some hints to prove my assumption?

sealedtx commented 3 years ago

@hk200 I don't have any proves, but it may be the only way to do so

hk200 commented 3 years ago

@hk200 I don't have any proves, but it may be the only way to do so

I agree with you.

hk200 commented 3 years ago

@hk200 I don't have any proves, but it may be the only way to do so

I agree with you.

hk200 commented 3 years ago

Is there any merge tool available of video and audio stream by java?

sealedtx commented 3 years ago

@hk200 the only tool I have worked with - ffmpeg

xibr commented 3 years ago

@hk200 maybe something like https://github.com/sannies/mp4parser

Take a look at https://github.com/HaarigerHarald/android-youtubeExtractor/blob/master/advancedDownloader/src/main/java/at/huber/youtubeDownloader/DownloadFinishedReceiver.java

hk200 commented 3 years ago

@hk200 the only tool I have worked with - ffmpeg

@hk200 maybe something like https://github.com/sannies/mp4parser

Take a look at https://github.com/HaarigerHarald/android-youtubeExtractor/blob/master/advancedDownloader/src/main/java/at/huber/youtubeDownloader/DownloadFinishedReceiver.java

thanks, I ll check that out. seems ffmpeg accepts url input.