0

I have many MKVs made from DVDs and BRs by MakeMKV that I converting to MP4 so I can play/stream on my iPad Air. I now use this command for converting my MKVs to MP4:

    ffmpeg -i input.mkv -strict experimental -map 0:0 -map 0:1 -map 0:2 -map 0:3 -c:v copy -c:a aac -b:a 384k -c:s copy output.mp4

I have video, 2 soundtracks and 1 subtitle. I want as little loss as possible, both in picture and sound. I also need all the subtiteles and soundtracks in the MKV (usually 2 soundtracks and 1 subtitle).

I have downloaded the 32-bit static ffmpeg build from zeranoe. I'm new to ffmpeg, so I don't know how to get libfdk_aac, which I don't believe is in the zeranoe build? I have read that libfdk_aac is the highest quality.

I'm also going to stream this to the iPad Air, so keep that in mind. It has worked good so far :)

Any ideas to make this better?


Current ffmpeg log

C:\Film>ffmpeg -i abc.mkv -strict experimental -map 0:0 -map 0:1 -map 0:2 -map 0:3 -c:v copy -c:a aa
c -b:a 384K -c:s copy film02.mp4
ffmpeg version N-63378-g1d36def Copyright (c) 2000-2014 the FFmpeg developers
  built on May 22 2014 22:01:44 with gcc 4.8.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzli
b --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libblu
ray --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-
libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libope
njpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex
--enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrw
benc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enab
le-libx265 --enable-libxavs --enable-libxvid --enable-decklink --enable-zlib
  libavutil      52. 86.100 / 52. 86.100
  libavcodec     55. 63.100 / 55. 63.100
  libavformat    55. 40.100 / 55. 40.100
  libavdevice    55. 13.101 / 55. 13.101
  libavfilter     4.  5.100 /  4.  5.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100
  libpostproc    52.  3.100 / 52.  3.100
Input #0, matroska,webm, from 'abc.mkv':
  Metadata:
    encoder         : libmakemkv v1.8.10 (1.3.0/1.4.1) win(x86-release)
    creation_time   : 2014-05-11 07:39:29
  Duration: 01:24:07.80, start: 0.000000, bitrate: 7505 kb/s
    Chapter #0.0: start 0.000000, end 135.760000
    Metadata:
      title           : Chapter 01
    Chapter #0.1: start 135.760000, end 361.200000
    Metadata:
      title           : Chapter 02
    Chapter #0.2: start 361.200000, end 665.120000
    Metadata:
      title           : Chapter 03
    Chapter #0.3: start 665.120000, end 888.760000
    Metadata:
      title           : Chapter 04
    Chapter #0.4: start 888.760000, end 1077.720000
    Metadata:
      title           : Chapter 05
    Chapter #0.5: start 1077.720000, end 1240.800000
    Metadata:
      title           : Chapter 06
    Chapter #0.6: start 1240.800000, end 1552.120000
    Metadata:
      title           : Chapter 07
    Chapter #0.7: start 1552.120000, end 1657.360000
    Metadata:
      title           : Chapter 08
    Chapter #0.8: start 1657.360000, end 1769.920000
    Metadata:
      title           : Chapter 09
    Chapter #0.9: start 1769.920000, end 2102.680000
    Metadata:
      title           : Chapter 10
    Chapter #0.10: start 2102.680000, end 2355.760000
    Metadata:
      title           : Chapter 11
    Chapter #0.11: start 2355.760000, end 2747.320000
    Metadata:
      title           : Chapter 12
    Chapter #0.12: start 2747.320000, end 2908.440000
    Metadata:
      title           : Chapter 13
    Chapter #0.13: start 2908.440000, end 3056.200000
    Metadata:
      title           : Chapter 14
    Chapter #0.14: start 3056.200000, end 3285.640000
    Metadata:
      title           : Chapter 15
    Chapter #0.15: start 3285.640000, end 3383.360000
    Metadata:
      title           : Chapter 16
    Chapter #0.16: start 3383.360000, end 3689.360000
    Metadata:
      title           : Chapter 17
    Chapter #0.17: start 3689.360000, end 3828.320000
    Metadata:
      title           : Chapter 18
    Chapter #0.18: start 3828.320000, end 3979.000000
    Metadata:
      title           : Chapter 19
    Chapter #0.19: start 3979.000000, end 4308.240000
    Metadata:
      title           : Chapter 20
    Chapter #0.20: start 4308.240000, end 4432.040000
    Metadata:
      title           : Chapter 21
    Chapter #0.21: start 4432.040000, end 4611.560000
    Metadata:
      title           : Chapter 22
    Chapter #0.22: start 4611.560000, end 4861.960000
    Metadata:
      title           : Chapter 23
    Chapter #0.23: start 4861.960000, end 5047.800000
    Metadata:
      title           : Chapter 24
    Stream #0:0(eng): Video: mpeg2video (Main), yuv420p(tv), 720x576 [SAR 16:15 DAR 4:3], max. 9800
kb/s, 25 fps, 25 tbr, 1k tbn, 50 tbc
    Stream #0:1(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s (default)
    Metadata:
      title           : Surround 5.1
    Stream #0:2(nor): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
    Metadata:
      title           : Surround 5.1
    Stream #0:3(nor): Subtitle: dvd_subtitle, 720x576 (default)
Output #0, mp4, to 'film02.mp4':
  Metadata:
    encoder         : Lavf55.40.100
    Chapter #0.0: start 0.000000, end 135.760000
    Metadata:
      title           : Chapter 01
    Chapter #0.1: start 135.760000, end 361.200000
    Metadata:
      title           : Chapter 02
    Chapter #0.2: start 361.200000, end 665.120000
    Metadata:
      title           : Chapter 03
    Chapter #0.3: start 665.120000, end 888.760000
    Metadata:
      title           : Chapter 04
    Chapter #0.4: start 888.760000, end 1077.720000
    Metadata:
      title           : Chapter 05
    Chapter #0.5: start 1077.720000, end 1240.800000
    Metadata:
      title           : Chapter 06
    Chapter #0.6: start 1240.800000, end 1552.120000
    Metadata:
      title           : Chapter 07
    Chapter #0.7: start 1552.120000, end 1657.360000
    Metadata:
      title           : Chapter 08
    Chapter #0.8: start 1657.360000, end 1769.920000
    Metadata:
      title           : Chapter 09
    Chapter #0.9: start 1769.920000, end 2102.680000
    Metadata:
      title           : Chapter 10
    Chapter #0.10: start 2102.680000, end 2355.760000
    Metadata:
      title           : Chapter 11
    Chapter #0.11: start 2355.760000, end 2747.320000
    Metadata:
      title           : Chapter 12
    Chapter #0.12: start 2747.320000, end 2908.440000
    Metadata:
      title           : Chapter 13
    Chapter #0.13: start 2908.440000, end 3056.200000
    Metadata:
      title           : Chapter 14
    Chapter #0.14: start 3056.200000, end 3285.640000
    Metadata:
      title           : Chapter 15
    Chapter #0.15: start 3285.640000, end 3383.360000
    Metadata:
      title           : Chapter 16
    Chapter #0.16: start 3383.360000, end 3689.360000
    Metadata:
      title           : Chapter 17
    Chapter #0.17: start 3689.360000, end 3828.320000
    Metadata:
      title           : Chapter 18
    Chapter #0.18: start 3828.320000, end 3979.000000
    Metadata:
      title           : Chapter 19
    Chapter #0.19: start 3979.000000, end 4308.240000
    Metadata:
      title           : Chapter 20
    Chapter #0.20: start 4308.240000, end 4432.040000
    Metadata:
      title           : Chapter 21
    Chapter #0.21: start 4432.040000, end 4611.560000
    Metadata:
      title           : Chapter 22
    Chapter #0.22: start 4611.560000, end 4861.960000
    Metadata:
      title           : Chapter 23
    Chapter #0.23: start 4861.960000, end 5047.800000
    Metadata:
      title           : Chapter 24
    Stream #0:0(eng): Video: mpeg2video (a[0][0][0] / 0x0061), yuv420p, 720x576 [SAR 16:15 DAR 4:3],
 q=2-31, max. 9800 kb/s, 25 fps, 16k tbn, 1k tbc
    Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, 5.1(side), fltp, 384 kb/s (defa
ult)
    Metadata:
      title           : Surround 5.1
      encoder         : Lavc55.63.100 aac
    Stream #0:2(nor): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, 5.1(side), fltp, 384 kb/s
    Metadata:
      title           : Surround 5.1
      encoder         : Lavc55.63.100 aac
    Stream #0:3(nor): Subtitle: dvd_subtitle ([224][0][0][0] / 0x00E0), 720x576 (default)
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (ac3 -> aac)
  Stream #0:2 -> #0:2 (ac3 -> aac)
  Stream #0:3 -> #0:3 (copy)
Press [q] to stop, [?] for help
frame=126195 fps= 52 q=-1.0 Lsize= 4538620kB time=01:24:07.78 bitrate=7365.7kbits/s
video:4066633kB audio:461409kB subtitle:2539kB other streams:0kB global headers:1kB muxing overhead:
> 0.177437%
>
>C:\Film
Striky
  • 103
  • 1
  • 1
  • 7
  • Size of the file does not matter by the way... – Striky May 25 '14 at 20:17
  • How is this question different than [ffmpeg: Converting MKV to MP4 lossless](http://superuser.com/q/758080/110524)? Also, you should always provide the complete console output that results from your `ffmpeg` command. – llogan May 25 '14 at 22:36
  • @LordNeckbeard The diffrence is that the last question was about getting a command the works. I have found a command that works, but there is probably improvements to be made in my command :) Sorry, but I don't know what complete console output means, and how I get it. – Striky May 26 '14 at 07:59
  • When you run your ffmpeg command it will output a bunch of text in your console. That's what I'm looking for. – llogan May 26 '14 at 16:48
  • @LordNeckbeard Posted the output in a new answer down on the page. Don't know how to make it look good, just copied and pasted it. – Striky May 26 '14 at 18:20

1 Answers1

0

If you use copy mode for audio and video codecs (-c:v/-c:a copy) there will be no quality loss, so you cant improve it, it will be the same. Also you can't use other codecs like aac if input is not aac (it's all about copy mode).

ptQa
  • 2,079
  • 15
  • 14
  • I can't copy audio, as Apple does not support DTS. – Striky May 25 '14 at 21:44
  • I know if I just copy and chang container, there will be no loss. However, I need to change the container to mp4, and soundtracks from DTS because Apple don't work with those containers and codecs. And as I say, i'm not looking for lossless (since I need to decode the soundtracks), but I want as little loss as possible :) With ffmpeg I converted ac-3 (MKV) to acc (MP4). – Striky May 26 '14 at 09:23