mirror of
https://github.com/samsonjs/media.git
synced 2026-04-09 11:55:46 +00:00
`Info` header is used for CBR files, but in some cases not **every** frame in these files is the same size. This change stops using the single frame after the `Info` frame as the 'template' (and assuming all subsequent frames are the same size/bitrate), and instead derives the bitrate from fields in the `Info` header. This works for files which are 'almost' constant bitrate, like the one in Issue: androidx/media#1376 where every frame is either 1044 or 1045 bytes except the one immediately after the `Info` frame which is 104 bytes (32kbps), resulting in a wildly incorrect duration calculation. PiperOrigin-RevId: 636151605 |
||
|---|---|---|
| .. | ||
| amr | ||
| avi | ||
| avif | ||
| bmp | ||
| flac | ||
| flv | ||
| heif | ||
| jpeg | ||
| midi | ||
| mkv | ||
| mkv_subtitle_transcoding | ||
| mp3 | ||
| mp4 | ||
| ogg | ||
| png | ||
| ts | ||
| wav | ||
| webp | ||
| webvtt | ||