mirror of
https://github.com/samsonjs/media.git
synced 2026-03-25 09:25:53 +00:00
Set Format.frameRate for single-frame MP4 tracks
Issue: androidx/media#1051
PiperOrigin-RevId: 613516802
(cherry picked from commit afacf2cdb7)
This commit is contained in:
parent
71bfdd1bce
commit
41771d7fa3
9 changed files with 9 additions and 1 deletions
|
|
@ -618,7 +618,7 @@ public final class Mp4Extractor implements Extractor, SeekMap {
|
|||
? C.ROLE_FLAG_MAIN
|
||||
: C.ROLE_FLAG_ALTERNATE));
|
||||
}
|
||||
if (trackDurationUs > 0 && trackSampleTable.sampleCount > 1) {
|
||||
if (trackDurationUs > 0 && trackSampleTable.sampleCount > 0) {
|
||||
float frameRate = trackSampleTable.sampleCount / (trackDurationUs / 1000000f);
|
||||
formatBuilder.setFrameRate(frameRate);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -270,6 +270,7 @@ track 1:
|
|||
maxInputSize = 151345
|
||||
width = 2048
|
||||
height = 1536
|
||||
frameRate = 2.142245
|
||||
rotationDegrees = 90
|
||||
colorInfo:
|
||||
colorSpace = 1
|
||||
|
|
|
|||
|
|
@ -214,6 +214,7 @@ track 1:
|
|||
maxInputSize = 151345
|
||||
width = 2048
|
||||
height = 1536
|
||||
frameRate = 2.142245
|
||||
rotationDegrees = 90
|
||||
colorInfo:
|
||||
colorSpace = 1
|
||||
|
|
|
|||
|
|
@ -130,6 +130,7 @@ track 1:
|
|||
maxInputSize = 151345
|
||||
width = 2048
|
||||
height = 1536
|
||||
frameRate = 2.142245
|
||||
rotationDegrees = 90
|
||||
colorInfo:
|
||||
colorSpace = 1
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ track 1:
|
|||
maxInputSize = 151345
|
||||
width = 2048
|
||||
height = 1536
|
||||
frameRate = 2.142245
|
||||
rotationDegrees = 90
|
||||
colorInfo:
|
||||
colorSpace = 1
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ track 0:
|
|||
maxInputSize = 3895
|
||||
width = 180
|
||||
height = 120
|
||||
frameRate = 1.1534026
|
||||
pixelWidthHeightRatio = 0.5
|
||||
colorInfo:
|
||||
lumaBitdepth = 8
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ track 0:
|
|||
maxInputSize = 3895
|
||||
width = 180
|
||||
height = 120
|
||||
frameRate = 1.1534026
|
||||
pixelWidthHeightRatio = 0.5
|
||||
colorInfo:
|
||||
lumaBitdepth = 8
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ track 0:
|
|||
maxInputSize = 3895
|
||||
width = 180
|
||||
height = 120
|
||||
frameRate = 1.1534026
|
||||
pixelWidthHeightRatio = 0.5
|
||||
colorInfo:
|
||||
lumaBitdepth = 8
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ track 0:
|
|||
maxInputSize = 3895
|
||||
width = 180
|
||||
height = 120
|
||||
frameRate = 1.1534026
|
||||
pixelWidthHeightRatio = 0.5
|
||||
colorInfo:
|
||||
lumaBitdepth = 8
|
||||
|
|
|
|||
Loading…
Reference in a new issue