Page 1 of 1

YouTube CacheKey

PostPosted: Thu Aug 23, 2012 4:47 am
by jhb50
Youtube videos result in the creation of a cachekey for every played video.
YouTube however has established format codes that define the attributes of each variation of a file that apply to all Youtube Videos. It seems to me therefore that the cachekey for a youtube video can simply be its format code and in that way the cache will only need to hold the dozen or so format code cache keys rather than one cachekey for every played youtube video.
Does this make sense and will it work?

Re: YouTube CacheKey

PostPosted: Mon Aug 27, 2012 10:25 pm
by zip
that would work for codec combination, but probably not for resolution, bitrate, fps, etc. Those might be needed for transcoding detection etc.

Re: YouTube CacheKey

PostPosted: Mon Aug 27, 2012 10:31 pm
by jhb50
What do you actually cache. I don't see it documented. The format codes cover resolution as well, but I don't see fps or source bitrate used in your ffmpeg commands.

Re: YouTube CacheKey

PostPosted: Mon Aug 27, 2012 11:07 pm
by zip
basically a lot from ffmpeg -i. I think the formats cover max resolution, not the actual resolution, right?

Re: YouTube CacheKey

PostPosted: Mon Aug 27, 2012 11:28 pm
by jhb50
Good point, but again I don't see you providing ffmpeg with any of that detail in your generated commands. FFmpeg seems to "discover " what it needs.

Re: YouTube CacheKey

PostPosted: Tue Aug 28, 2012 10:57 pm
by zip
some of them are used for transcode matchers, eg maxHeight, profile, level, etc.