I'm trying to merge a few video files through mkvmerge but I get the following error after running

mkvmerge -o '/home/videos/marged/new.mp4' '/home/videos/intro.mp4' \+ 'old.mp4' \+ '/home/videos/intro.mp4'

Error:

Error: The track number 1 from the file 'old.mp4' cannot be appended to the track number 1 from the file '/home/videos/intro.mp4'. The sample rate of the two audio tracks is different: 44100 and 22050

Is there a way to force this? If not how can I change the audio to the same rate as old.mp4 in ffmpeg for /home/videos/intro.mp4

To force to 44100 Hz, command template is

ffmpeg -i old.mp4 -map 0 -c:v copy -c:a aac -ar 44100 new.mp4
  • Is there a way to force the merge? – masterq Jul 11 at 12:57
  • Using mkvmerge, don't see a way. Playback speed would be wrong for 2nd file even if you could. – Gyan Jul 11 at 13:17

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.