MCPcopy Index your code
hub / github.com/simstudioai/sim / getAudioCodec

Function getAudioCodec

apps/sim/lib/audio/extractor.ts:264–276  ·  view source on GitHub ↗

* Get appropriate audio codec for output format

(format: string)

Source from the content-addressed store, hash-verified

262 * Get appropriate audio codec for output format
263 */
264function getAudioCodec(format: string): string {
265 const codecMap: Record<string, string> = {
266 mp3: 'libmp3lame',
267 wav: 'pcm_s16le',
268 flac: 'flac',
269 m4a: 'aac',
270 aac: 'aac',
271 ogg: 'libvorbis',
272 opus: 'libopus',
273 }
274
275 return codecMap[format] || 'libmp3lame'
276}
277
278/**
279 * Check if a file is a video file

Callers 1

convertAudioWithFFmpegFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected