meeb / tubesync

Syncs YouTube channels and playlists to a locally hosted media server
GNU Affero General Public License v3.0
1.96k stars 125 forks source link

Video Codec (H.264) Not Being Converted Properly #163

Closed zpz5HAU-tgc3fgw2xwr closed 3 months ago

zpz5HAU-tgc3fgw2xwr commented 3 years ago

I have all my sources set for Video Codec AVC1 (H.264) and Audio Codec MP4A. The audio is being converted properly, but I'm still getting VP9 videos from all of my recent downloads.

I want to say that at one point the videos were converting properly, but looking through all of the videos I've downloaded in the past week and it's VP9 video, AAC Stereo audio. This causes issues with Plex transcoding for some 1080p and most 4k videos.

meeb commented 3 years ago

Interesting, can you paste the codec match output from the media page to show which formats have been selected and share the video URL please?

zpz5HAU-tgc3fgw2xwr commented 3 years ago

Sure, here's one that just downloaded

https://www.youtube.com/watch?v=qXdBYPTN_5Y

Desired format

4320p (video:AVC1, audio:MP4A) 60FPS HDR

Downloaded codecs

audio:MP4A, video:VP9

Available formats

ID: 139 , audio:mp4a.40.5 @48.788k / 22050Hz
ID: 249 , audio:opus @50.904k / 48000Hz
ID: 250 , audio:opus @64.57k / 48000Hz
ID: 140 , audio:mp4a.40.2 @129.476k / 44100Hz (matched)
ID: 251 , audio:opus @119.506k / 48000Hz
ID: 17 , 144p (176x144), fps:8, video:mp4v.20.3 @80.99k , audio:mp4a.40.2 @0.0k / 22050Hz
ID: 160 , 144p (256x144), fps:30, video:avc1.4d400c @79.859k
ID: 278 , 144p (256x144), fps:30, video:vp9 @84.132k
ID: 133 , 240p (426x240), fps:30, video:avc1.4d4015 @179.456k
ID: 242 , 240p (426x240), fps:30, video:vp9 @165.503k
ID: 134 , 360p (640x360), fps:30, video:avc1.4d401e @341.703k
ID: 18 , 360p (640x360), fps:30, video:avc1.42001E @403.044k , audio:mp4a.40.2 @0.0k / 44100Hz
ID: 243 , 360p (640x360), fps:30, video:vp9 @295.768k
ID: 135 , 480p (854x480), fps:30, video:avc1.4d401f @671.693k
ID: 244 , 480p (854x480), fps:30, video:vp9 @496.533k
ID: 22 , 720p (1280x720), fps:30, video:avc1.64001F @1439.357k , audio:mp4a.40.2 @0.0k / 44100Hz
ID: 136 , 720p (maybe throttled) (1280x720), fps:30, video:avc1.64001f @1311.123k
ID: 247 , 720p (maybe throttled) (1280x720), fps:30, video:vp9 @886.976k
ID: 298 , 720p60 (1280x720), fps:60, video:avc1.640020 @1721.122k
ID: 302 , 720p60 (1280x720), fps:60, video:vp9 @1371.109k
ID: 299 , 1080p60 (1920x1080), fps:60, video:avc1.64002a @3243.063k
ID: 303 , 1080p60 (1920x1080), fps:60, video:vp9 @2377.356k (matched)

Matched formats

Combined: no match
Audio: 140 (exact match)
Video: 303 (fallback)
zpz5HAU-tgc3fgw2xwr commented 3 years ago

I think this was the last major bug I was running into - and changing the DB hasn't affected this. Still falling back to VP9 video on everything

meeb commented 3 years ago

Yeah this probably requires an actual patch in the fallback logic.

meeb commented 3 months ago

This should have been fixed for some time. Please open a new issue if you still experience this.