mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-22 06:27:42 +00:00
feat(metadata): add video_codec field and verbose codec name resolution
This commit is contained in:
@@ -43,9 +43,13 @@ describe('TranscodeService', () => {
|
||||
streams: [
|
||||
{
|
||||
codec_type: 'video',
|
||||
codec_name: 'h264',
|
||||
width: 1920,
|
||||
height: 1080,
|
||||
r_frame_rate: '30/1',
|
||||
tags: {
|
||||
mime_codec_string: 'avc1.4d401e',
|
||||
},
|
||||
},
|
||||
{
|
||||
codec_type: 'audio',
|
||||
@@ -53,6 +57,9 @@ describe('TranscodeService', () => {
|
||||
channels: 2,
|
||||
sample_rate: '48000',
|
||||
bits_per_raw_sample: '16',
|
||||
tags: {
|
||||
mime_codec_string: 'mp4a.40.2',
|
||||
},
|
||||
},
|
||||
],
|
||||
})
|
||||
@@ -70,7 +77,8 @@ describe('TranscodeService', () => {
|
||||
expect(info.duration).toBe(10.5)
|
||||
expect(info.frameRate).toBe(30)
|
||||
expect(info.hasAudio).toBe(true)
|
||||
expect(info.audioCodec).toBe('aac')
|
||||
expect(info.videoCodec).toBe('Advanced Video Coding')
|
||||
expect(info.audioCodec).toBe('MPEG-4 Audio')
|
||||
expect(info.audioChannels).toBe(2)
|
||||
expect(info.audioSampleRate).toBe(48000)
|
||||
expect(info.audioBitDepth).toBe(16)
|
||||
|
||||
Reference in New Issue
Block a user