deniscerri / ytdlnis

Android Video/Audio Downloader app using yt-dlp
GNU General Public License v3.0
4.02k stars 142 forks source link

Container/Format not respecting preferred video codec #314

Closed matt873 closed 1 year ago

matt873 commented 1 year ago

When the video container is set to mp4 in settings and the preferred video codec is VP9, the download card auto selects AV1 or AVC1 codec. Setting a container independent of video codec will give the ability to use an embedded thumbnail function by using mp4 with any codec type.

deniscerri commented 1 year ago

Lol i just released the new version. You couldnt have found a worse time. give me the link and ill look at it later

matt873 commented 1 year ago

Lol i just released the new version. You couldnt have found a worse time. give me the link and ill look at it later

Sorry for feeling bad about filing this issue. Honestly, I didn't even know if a new version had been released. I was using the latest beta. It's a coincidence! I appreciate and have so much respect for you for developing such a great app. I just filed this issue to be noticed but if you think it's not a major one, disregard it.

deniscerri commented 1 year ago

Does the video have any vp9 formats? Cuz av1 mightve been the best it could find

matt873 commented 1 year ago

I have now set format ID to 243 (VP9) and it's fixed. Previous set up was without Format ID. Previous setup was container= mp4, codec= VP9, quality=360p. And with this setup, the download card would select format ID 134 (AVC1) most of the time.

deniscerri commented 1 year ago

noted. it could mostly be the order of preference that takes over

deniscerri commented 1 year ago

image

  1. prefer the format id
  2. if u set container as mp4, prefer a mp4 format
  3. if u had set preferred quality for example in this case 360, prefer that
  4. find a format that matches the preferred video codec

It could be that the vcodec is the last thing that is checked

matt873 commented 1 year ago

Probably. With the container matching desired quality and codec, it's working fine for me now. I think the default quality option is causing confusion here.

matt873 commented 1 year ago

Which resorts to any type of codec with the desired quality.

deniscerri commented 1 year ago

well yeah, since the user hasnt preferred a codec, it gets the first it can find lol.

matt873 commented 1 year ago

I have now set format ID to 243 (VP9) and it's fixed. Previous set up was without Format ID. Previous setup was container= mp4, codec= VP9, quality=360p. And with this setup, the download card would select format ID 134 (AVC1) most of the time.

I had set the preferred codec.. but then in that case container was causing the issue. Leaving the container to default would got me VP9 codec.

deniscerri commented 1 year ago

yeah i gotchu. Its because of that 2nd requirement