0

I'm using FFmpeg to change a video container from mkv to mov with this code:

ffmpeg -find_stream_info -probesize 84M -i input_file.mkv 
-map 0:v -map 0:a -map -0:s -codec copy output_file.mov -loglevel error;

But all the audio streams get "SoundHandler" as name/handler after the conversion. Result How can I preserve the original names? This is what I'm trying to get

I tried adding this:

-metadata:s:a handler_name='' -empty_hdlr_name 1

It should tell FFmpeg to not use the default 'SoundHandler' name and use instead a empty string, which means it should take the original stream name I guess. But it only get the first audio stream correctly, the others get the same handler as if every stream was the first one... Is there any solution?

Franon
  • 1

1 Answers1

0

replacing all the audio stream names with SoundHandler?

It's not replacing the names – the text "SoundHandler" goes in a different metadata field than the title. The problem is really that the title metadata field is not being copied at all.

According to Using ffmpeg to copy metadata from one file to another, you will likely need to:

  1. Use -map_metadata 0 to copy global metadata;
  2. Use -map_metadata:s:v 0:s:v and -map_metadata:s:a 0:s:a to copy video and audio stream metadata;
  3. Use -movflags use_metadata_tags to force metadata to be written because your output is a MOV file.
grawity
  • 501,077