Adaptive transcoding of profile ladder for videos
In some embodiments, a method generates a representation for a video that represents a relationship of a bitrate to a quality measurement for the video and selects candidate transcoding points on the representation. A plurality of candidate profile ladders are generated based on the candidate transcoding points. Each of the plurality of candidate profile ladders includes a different combination of profiles and a profile is associated with at least one of a bitrate and a quality measurement. The method selects a profile ladder from the plurality of candidate profile ladders based on analyzing the bitrate or the quality of the profile ladder and uses the profile ladder for the video.
1. A method comprising:
generating, by a computing device, a representation for a video that represents a relationship of a bitrate to a quality measurement for the video;
selecting, by the computing device, candidate transcoding points on the representation;
generating, by the computing device, a plurality of candidate profile ladders based on the candidate transcoding points, wherein the plurality of candidate profile ladders include a different combination of profiles, and wherein the different combination of profiles include a plurality of profiles with different values of at least one of the bitrate and the quality measurement;
analyzing, by the computing device, each profile in the different combination of profiles for the plurality of candidate profile ladders to generate a first value for the bitrate or the quality measurement for each profile;
determining, by the computing device, a second value for each profile ladder based on the first value for each of the profiles in each respective combination of profiles for each profile ladder;
selecting, by the computing device, a profile ladder from the plurality of candidate profile ladders based on the respective second value for each of the plurality of profile ladders; and
using, by the computing device, the profile ladder for the video.
2. The method of claim 1 , wherein using the profile ladder for the video comprises:
transcoding the video into a plurality of video streams based on profiles in the profile ladder.
3. The method of claim 2 , wherein transcoding the video into the plurality of video streams comprises:
transcoding each video stream based on at least one of the bitrate and the quality measurement associated with a respective profile.
4. The method of claim 1 , wherein using the profile ladder for the video comprises:
selecting profiles from a standard profile ladder based on the profiles of the selected profile ladder.
5. The method of claim 4 , wherein selecting profiles from the standard profile ladder based on the profiles of the selected profile ladder comprises:
selecting a profile from the standard profile that has at least one of the bitrate and the quality measurement closest to a profile in the selected profile ladder.
6. The method of claim 1 , wherein generating the representation for the video comprises:
generating a curve that represents the relationship of the bitrate to the quality measurement.
7. The method of claim 1 , wherein selecting the candidate transcoding points comprises:
selecting points on the representation when a current point includes a higher quality than a last point.
8. The method of claim 7 , wherein selecting points on the representation when the point includes the higher quality than the last point comprises:
applying a threshold to a change in quality between the last point and the current point; and
adding the current point to the candidate transcoding points when the change in quality meets the threshold.
9. The method of claim 7 , wherein selecting points on the representation when the point includes the higher quality than the last point comprises:
determining a lower boundary on the representation;
determining an upper boundary on the representation; and
selecting points on the representation based on the lower boundary and the upper boundary.
10. The method of claim 9 , wherein selecting the lower boundary or selecting the upper boundary comprises:
using a probability distribution of bitrates that were played back to determine the lower boundary or the upper boundary.
11. The method of claim 1 , wherein generating the plurality of candidate profile ladders based on the candidate transcoding points comprises:
generating a plurality of combinations from the candidate transcoding points to form the plurality of candidate profile ladders.
12. The method of claim 1 , wherein selecting the profile ladder from the plurality of candidate profile ladders comprises:
calculating a bitrate representation that is based on bitrates for the first value for the plurality of profiles in a current profile ladder from the plurality of candidate profile ladders; and
determining whether to select the current profile ladder based on the bitrate representation.
13. The method of claim 12 , wherein the bitrate representation comprises a weighted bitrate that is based on bitrates associated with the first value of the plurality of profiles of the current profile ladder and a probability of playback of the respective profiles.
14. The method of claim 1 , wherein selecting the profile ladder from the plurality of candidate profile ladders comprises:
calculating a quality measurement representation for a current profile ladder in the plurality of candidate profile ladders, wherein the quality measurement is based on the first value for the plurality of profiles in a current profile ladder; and
determining whether to select the current profile ladder based on the quality measurement representation.
15. The method of claim 14 , wherein the quality measurement representation comprises a weighted quality measurement that is based on the first value associated with the plurality of profiles of the current profile ladder and a probability of playback of the respective profiles.
16. A non-transitory computer-readable storage medium containing instructions, that when executed, control a computer system to be operable for:
generating a representation for a video that represents a relationship of a bitrate to a quality measurement for the video;
selecting candidate transcoding points on the representation;
generating a plurality of candidate profile ladders based on the candidate transcoding points, wherein the plurality of candidate profile ladders include a different combination of profiles, and wherein the different combination of profiles include a plurality of profiles with different values of at least one of the bitrate and the quality measurement;
analyzing each profile in the different combination of profiles for the plurality of candidate profile ladders to generate a first value for the bitrate or the quality measurement for each profile;
determining a second value for each profile ladder based on the first value for each of the profiles in each respective combination of profiles for each profile ladder;
selecting a profile ladder from the plurality of candidate profile ladders based on the respective second value for each of the plurality of profile ladders; and
using the profile ladder for the video.
17. The non-transitory computer-readable storage medium of claim 16 , wherein using the profile ladder for the video comprises:
transcoding the video into a plurality of video streams based on profiles in the profile ladder.
18. The non-transitory computer-readable storage medium of claim 17 , wherein transcoding the video into the plurality of video streams comprises:
transcoding each video stream based on at least one of the bitrate and the quality measurement associated with a respective profile.
19. The non-transitory computer-readable storage medium of claim 16 , wherein using the profile ladder for the video comprises:
selecting profiles from a standard profile ladder based on the profiles of the selected profile ladder.
20. An apparatus comprising:
one or more computer processors; and
a non-transitory computer-readable storage medium comprising instructions, that when executed, control the one or more computer processors to be operable for:
generating a representation for a video that represents a relationship of a bitrate to a quality measurement for the video;
selecting candidate transcoding points on the representation;
generating a plurality of candidate profile ladders based on the candidate transcoding points, wherein the plurality of candidate profile ladders include a different combination of profiles, and wherein the different combination of profiles include a plurality of profiles with different values of at least one of the bitrate and the quality measurement;
analyzing each profile in the different combination of profiles for the plurality of candidate profile ladders to generate a first value for the bitrate or the quality measurement for each profile;
determining a second value for each profile ladder based on the first value for each of the profiles in each respective combination of profiles for each profile ladder;
selecting a profile ladder from the plurality of candidate profile ladders based on the respective second value for each of the plurality of profile ladders; and
using the profile ladder for the video.