@@ -231,6 +231,7 @@ class AudioConverterRepositoryImpl
231
231
" -i" , inputPath,
232
232
" -map" , " 0:a" , // Only map audio streams
233
233
" -vn" , // Disable video streams
234
+ " -map_metadata" , " 0" , // Preserve input metadata
234
235
" -ar" , " 16000" ,
235
236
" -ac" , " 1" ,
236
237
" -c:a" , AudioCodec .fromFormat(outputFormat).codec,
@@ -247,6 +248,7 @@ class AudioConverterRepositoryImpl
247
248
" -i" , inputPath,
248
249
" -map" , " 0:a" ,
249
250
" -vn" ,
251
+ " -map_metadata" , " 0" , // Preserve input metadata
250
252
" -c:a" , AudioCodec .fromFormat(outputFormat).codec,
251
253
" -b:a" , bitrate.bitrate,
252
254
" -application" , " voip" ,
@@ -260,6 +262,7 @@ class AudioConverterRepositoryImpl
260
262
" -i" , inputPath,
261
263
" -map" , " 0:a" ,
262
264
" -vn" ,
265
+ " -map_metadata" , " 0" , // Preserve input metadata
263
266
" -c:a" , AudioCodec .fromFormat(outputFormat).codec,
264
267
" -b:a" , bitrate.bitrate,
265
268
" -filter:a" , " atempo=$playbackSpeed " ,
@@ -273,6 +276,7 @@ class AudioConverterRepositoryImpl
273
276
" -i" , inputPath,
274
277
" -map" , " 0:a" ,
275
278
" -vn" ,
279
+ " -map_metadata" , " 0" , // Preserve input metadata
276
280
" -c:a" , AudioCodec .fromFormat(outputFormat).codec,
277
281
" -b:a" , bitrate.bitrate,
278
282
" -filter:a" , " atempo=$playbackSpeed " ,
@@ -467,6 +471,9 @@ class AudioConverterRepositoryImpl
467
471
468
472
args.addAll(arrayOf(" -map" , " 0:a" , " -vn" ))
469
473
474
+ // Preserve input metadata on the output
475
+ args.addAll(arrayOf(" -map_metadata" , " 0" ))
476
+
470
477
args.addAll(arrayOf(" -ss" , CueParser .formatSecondsForFFmpeg(track.startTimeSeconds)))
471
478
472
479
0 commit comments