Skip to content

Commit

Permalink
删除crf等参数 并固定码率已经buffersize
Browse files Browse the repository at this point in the history
  • Loading branch information
张禹 committed Nov 23, 2020
1 parent 710db57 commit 3782aa0
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions tool/vapxTool/VapxTool/controllers/VapxMP4Decoder.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ - (NSString *)encode {
}
NSMutableArray *arguments = nil;

// high 3.0 main 4.0
if (isH265) {
arguments = [@[@"-r", [NSString stringWithFormat:@"%@", @(MAX(self.fps, 1))],
@"-pattern_type", @"glob",
Expand All @@ -75,26 +76,28 @@ - (NSString *)encode {
@"-level",@"4.0",
@"-b:v", self.bitRate?: @"2000k",
/*@"-bf", @"0",*/
@"-crf", @"29",
@"-tag:v", @"hvc1", output] mutableCopy];
/*@"-crf", @"28",*/
@"-tag:v", @"hvc1",
@"-bufsize", @"2000k", output] mutableCopy];
} else if (isVp9) {
arguments = [@[@"-framerate", [NSString stringWithFormat:@"%@", @(MAX(self.fps, 1))],
@"-pattern_type", @"glob",
@"-i", inputPath,
@"-c:v", @"libvpx-vp9",
@"-pix_fmt", self.yuvFormat?:@"yuv420p",
@"-b:v", self.bitRate?: @"2000k", output] mutableCopy];
@"-b:v", self.bitRate?: @"2000k",
@"-bufsize", @"2000k", output] mutableCopy];
} else {
arguments = [@[@"-r", [NSString stringWithFormat:@"%@", @(MAX(self.fps, 1))],
@"-pattern_type", @"glob",
@"-i", inputPath,
@"-c:v", @"libx264",
@"-pix_fmt", self.yuvFormat?:@"yuv420p",
@"-profile:v", self.profile?:@"high",
@"-profile:v", self.profile?:@"main",
@"-level",@"4.0",
@"-b:v", self.bitRate?: @"2000k",
@"-bf", @"0",
/*@"-crf", @"29",*/
/*@"-crf", @"28",*/
@"-bufsize", @"2000k", output] mutableCopy];
}

Expand Down

0 comments on commit 3782aa0

Please sign in to comment.