1

Situation: I did encoded a h.264 input_original.mkv file to h.265 output_hevc.mkv

After long encoding process I realise there are wrong audio streams was choose.

I need to get new output_hevc_2.mkv which would based on copy of video stream from output_hevc.mkv and maped audio streams from input_original.mkv

Is that technically possible?

P.s. I've seen this link ffmpeg-adding-re-encoding-audio-stream-on-video-file

It's not the same question because it'll generate new output file with video stream from input_original.mkv.

2
  • 1
    Check FFmpeg map option. Syntax without re-encoding: ffmpeg -i input0.mkv -i input1.mkv -map 0:v -map 1:a -c copy output.mkv Commented Nov 27, 2024 at 20:05
  • Thank you, question is solved, ffmpeg even much more powerful than I imagined Commented Nov 30, 2024 at 11:10

1 Answer 1

0

In case of you need to specify a/v/s streams

ffmpeg -hide_banner \ -i "input_0.mkv" \ -i "input_1.mkv" \ -map 0:v:0 \ -map 1:a:0 \ -map 1:a:4 \ -map 0:s:0 \ -map 0:s:2 \ -c copy \ "result_output.mkv" 

This will merge video stream from input_0.mkv and selected audio and subtitle streams from input_1.mkv to result_output.mkv

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.