6

How can I convert a .mkv video file to .mp4?

I already tried VLC, it did not work for me.

My OS: Ubuntu Live USB, 14.04LTS, Intel® Celeron(R) CPU J1800 @ 2.41GHz × 2

Thank you,

RCline7

10

This is what I used:

Convert MKV to MP4:

avconv -i input.mkv -codec copy output.mp4

Thanks for your help, everyone.

  • I needed to add -strict experimental for some reason, then it worked. – Rodrigo Aug 29 '17 at 3:21
0

This is what I used on Ubuntu 14.04 I tried the avconv in the above thread but it didn't work with me. Here is what worked for me.

ffmpeg -i input.mkv -acodec copy -vcodec copy output.mp4

and it shows the following output

ffmpeg version 3.3.3 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
  configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libfreetype --enable-gnutls --disable-ffserver --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libtheora --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvidstab --enable-libwavpack --enable-nvenc --enable-libzimg
  libavutil      55. 58.100 / 55. 58.100
  libavcodec     57. 89.100 / 57. 89.100
  libavformat    57. 71.100 / 57. 71.100
  libavdevice    57.  6.100 / 57.  6.100
  libavfilter     6. 82.100 /  6. 82.100
  libavresample   3.  5.  0 /  3.  5.  0
  libswscale      4.  6.100 /  4.  6.100
  libswresample   2.  7.100 /  2.  7.100
  libpostproc    54.  5.100 / 54.  5.100
Input #0, matroska,webm, from 'input.mkv':
  Metadata:
    ENCODER         : Lavf57.71.100
  Duration: 00:34:48.80, start: 0.800000, bitrate: 519 kb/s
    Stream #0:0: Video: hevc (Main), yuv420p(tv), 1440x768, SAR 1:1 DAR 15:8, 5 fps, 5 tbr, 1k tbn, 5 tbc (default)
    Metadata:
      DURATION        : 00:34:48.800000000
    Stream #0:1(unknown): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
    Metadata:
      DURATION        : 00:34:48.415000000
File 'output.mp4' already exists. Overwrite ? [y/N] y
Output #0, mp4, to 'output.mp4':
  Metadata:
    encoder         : Lavf57.71.100
    Stream #0:0: Video: hevc (Main) ([35][0][0][0] / 0x0023), yuv420p(tv), 1440x768 [SAR 1:1 DAR 15:8], q=2-31, 5 fps, 5 tbr, 16k tbn, 1k tbc (default)
    Metadata:
      DURATION        : 00:34:48.800000000
    Stream #0:1(unknown): Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp (default)
    Metadata:
      DURATION        : 00:34:48.415000000
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=10439 fps=10024 q=-1.0 Lsize=  132315kB time=00:34:47.59 bitrate= 519.2kbits/s speed=2e+03x      
video:50757kB audio:80879kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.516122%

It works for me and I hope it will work for you.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

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