* Get appropriate audio codec for output format
(format: string)
| 262 | * Get appropriate audio codec for output format |
| 263 | */ |
| 264 | function 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 |
no outgoing calls
no test coverage detected