To extract MP4 content from an MKV file without re-encoding, you can use the following command in the terminal:
ffmpeg -i input.mkv -c copy output.mp4
However, the error [mp4@0x13a704400] truehd MP4 support indicates that the MKV file contains TrueHD audio, which is not natively supported by MP4 format. To resolve this issue, you can either re-encode the audio or extract the video and audio separately and then combine them.
Here's an example of how to extract video and audio separately:
# Extract video
ffmpeg -i input.mkv -vcodec copy -an output_video.mp4
# Extract audio (AC3 or TrueHD)
ffmpeg -i input.mkv -acodec copy -vn output_audio.ac3
Then, you can use another tool like ffmpeg or mp4box to combine the video and audio files:
# Combine video and audio (AC3)
ffmpeg -i output_video.mp4 -i output_audio.ac3 -codec copy output.mp4
If the MKV file contains TrueHD audio, you may need to convert it to AAC or another MP4-compatible audio codec:
# Convert TrueHD audio to AAC
ffmpeg -i input.mkv -c:a aac output.mp4
Please note that converting the audio may result in some loss of audio quality.
Here's a summary of the references:
- Book: The FFmpeg Book
- Article: How to Extract Video and Audio from an MKV File
- Online Resource: FFmpeg Documentation