Правка профилей по высоте и документация по качеству
This commit is contained in:
@@ -87,7 +87,7 @@ export const DEFAULT_PROFILES: VideoProfile[] = [
|
||||
|
||||
/**
|
||||
* Select appropriate profiles based on input video resolution
|
||||
* Only creates profiles that are equal to or smaller than input resolution
|
||||
* Oriented by height: only profiles with height <= source height
|
||||
* Always generates 30 FPS profiles by default
|
||||
* For high FPS (>30), user must explicitly specify in customProfiles
|
||||
*/
|
||||
@@ -101,7 +101,7 @@ export function selectProfiles(
|
||||
|
||||
// Standard 30 FPS profiles (always created)
|
||||
const baseProfiles = DEFAULT_PROFILES.filter(profile => {
|
||||
return profile.width <= inputWidth && profile.height <= inputHeight;
|
||||
return profile.height <= inputHeight;
|
||||
});
|
||||
|
||||
// Add standard 30fps profiles with bitrate limit
|
||||
@@ -206,8 +206,8 @@ export function validateProfile(
|
||||
}
|
||||
|
||||
// Check if source supports this resolution
|
||||
if (profile.width > sourceWidth || profile.height > sourceHeight) {
|
||||
return { error: `Source resolution (${sourceWidth}x${sourceHeight}) is lower than ${profileStr} (${profile.width}x${profile.height})` };
|
||||
if (profile.height > sourceHeight) {
|
||||
return { error: `Source height (${sourceHeight}px) is lower than requested ${profileStr} height (${profile.height}px)` };
|
||||
}
|
||||
|
||||
// Check if requested FPS exceeds source FPS
|
||||
@@ -271,4 +271,3 @@ export function createProfilesFromStrings(
|
||||
|
||||
return { profiles, errors, warnings };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user