diff --git a/setup.cfg b/setup.cfg index ce5f41f..d097611 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = surround-to-eac3 -version = 0.3.0 +version = 0.3.1 author = Jonathan Rampersad author_email = jonathan@jono-rams.work description = A CLI tool to transcode 5.1 audio in video files to E-AC3. diff --git a/src/surround_to_eac3/main.py b/src/surround_to_eac3/main.py index 531c4e7..598c086 100644 --- a/src/surround_to_eac3/main.py +++ b/src/surround_to_eac3/main.py @@ -107,6 +107,12 @@ def process_file_with_ffmpeg( output_audio_stream_ffmpeg_idx += 1 ffmpeg_cmd.extend(map_operations) + + if final_output_filepath.lower().endswith('.mkv'): + ffmpeg_cmd.extend(['-f', 'matroska']) + elif final_output_filepath.lower().endswith('.mp4'): + ffmpeg_cmd.extend(['-f', 'mp4']) + ffmpeg_cmd.extend(["-y", temp_output_filepath]) logs.append(f" ⚙️ Processing: '{base_filename}' -> '{output_filename}'")