Sunday, August 3, 2014

Notes: Thinking About Codinalte Youtube Video Quality Issues

Quick personal note: I'm feeling much better these days but the long break has caused me to loose my development "mojo". I'm doing research as to how to get it back; apparently there was someone named Stella who lost her groove and she got that back. Then there is also Austin Powers; I guess someone took his mojo and he got it back as well... so need to watch/rewatch those I guess.

In the mean time, I've been thinking about a particular problem with Codinalte AKA: Galaxy Exhibit or Galaxy Ace2e. Well, this problem seems to exist across all codina/Galaxy S3 mini variants. In the official YouTube app, video quality is quite poor. No matter how you set the settings the quality settings the video just looks bad...

Now, Codinalte can play video in other contexts just fine. Video's look great in mx player and I think you can even use the browser and get better quality on the YouTube website so it does not seem to be a question of the device not being able to render good quality video; it obviously can and that leads me to believe that this is simply a misconfiguration somewhere.

Looking at the logs I found this:

E/YouTube (32655): Could not select a stream, defaulting to itag 36

Many of you may not know this but I worked on a video app a couple(?) years ago and at that time I was very familiar with how YouTube video's work. So when I saw the term "itag" I remembered that YouTube's web clients use to request a manifest of available qualities and encodings before selecting one to stream and each one had an "itag" number. Basically it's like this: The YouTube client would figure out what types of video's could be played i.e ( mp4, webm, mpeg, avi...). Then it would download a list of available encodings for a particular video. Then compare the list until there was a match and basically go with that. So, if the client could play mp4's and there is an mp4 available then we play that one. It was a little more sophisticated than that but you get the idea.

The above error seems to indicate that the YouTube app could not find a compatible stream in the list so it's defaulting to some "lowest common denominator"

ATM: I haven't found the spot where the android frameworks provide information to apps about what types of video can be decoded... Perhaps another dev will see this and get some insight...

EDIT: I have already tried to force Codinalte to use different decoders. With the recent inclusion of FFMPEG decoders, I thought this would be a good idea. I was able to verify that I was using different decoders but the result was still bad quality video. In all actuality no notice able change what so ever.

Comments welcome...

No comments:

Post a Comment