Body: <p>I have some old DVD that I already converted using MakeMKV, they seems to have the original mpeg stream, so I want to do this:</p>
  
  <ul>
  <li><p>Reencode the video stream to the more recommended settings for old-DVD using h264.</p></li>
  <li><p>Reencode the audio streams (some mkv have 1 or 2 audio tracks) to aac or some other 5channel/stereo more compatible codec.</p></li>
  <li><p>I already set the default language for audio and subtitles using mkvtoolnix but in my old TV it plays the first track of audio and the first track of subtitles no matter if other was set as default or not (yes, some of it have 2 subtitle tracks too, VLC loads the defaults ones with no problem).</p></li>
  <li><p>Some videos have some interlaced tipical from the old-DVD's so I want to be able to turn on a deinterlace filter too if it is possible.</p></li>
  </ul>
  
  <p>How can I do this ? Thanks.</p>
  
  <pre><code>    ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
    built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
    configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.3_1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
    libavutil      56. 22.100 / 56. 22.100
    libavcodec     58. 35.100 / 58. 35.100
    libavformat    58. 20.100 / 58. 20.100
    libavdevice    58.  5.100 / 58.  5.100
    libavfilter     7. 40.101 /  7. 40.101
    libavresample   4.  0.  0 /  4.  0.  0
    libswscale      5.  3.100 /  5.  3.100
    libswresample   3.  3.100 /  3.  3.100
    libpostproc    55.  3.100 / 55.  3.100
  Input #0, matroska,webm, from '/Volumes/Data/Peliculas-Infantiles/pitufos.mkv':
    Metadata:
      encoder         : libmakemkv v1.14.3 (1.3.5/1.4.7) win(x64-release)
      creation_time   : 2019-04-05T17:34:38.000000Z
    Duration: 01:30:34.76, start: 0.000000, bitrate: 6261 kb/s
      Chapter #0:0: start 0.083417, end 378.378000
      Metadata:
        title           : Chapter 01
      Chapter #0:1: start 378.378000, end 461.661200
      Metadata:
        title           : Chapter 02
      Chapter #0:2: start 461.661200, end 644.477167
      Metadata:
        title           : Chapter 03
      Chapter #0:3: start 644.477167, end 922.288033
      Metadata:
        title           : Chapter 04
      Chapter #0:4: start 922.288033, end 1061.927533
      Metadata:
        title           : Chapter 05
      Chapter #0:5: start 1061.927533, end 1162.194367
      Metadata:
        title           : Chapter 06
      Chapter #0:6: start 1162.194367, end 1299.965333
      Metadata:
        title           : Chapter 07
      Chapter #0:7: start 1299.965333, end 1393.258533
      Metadata:
        title           : Chapter 08
      Chapter #0:8: start 1393.258533, end 1630.829200
      Metadata:
        title           : Chapter 09
      Chapter #0:9: start 1630.829200, end 1831.329500
      Metadata:
        title           : Chapter 10
      Chapter #0:10: start 1831.329500, end 2143.841700
      Metadata:
        title           : Chapter 11
      Chapter #0:11: start 2143.841700, end 2327.692033
      Metadata:
        title           : Chapter 12
      Chapter #0:12: start 2327.692033, end 2545.743200
      Metadata:
        title           : Chapter 13
      Chapter #0:13: start 2545.743200, end 2748.746000
      Metadata:
        title           : Chapter 14
      Chapter #0:14: start 2748.746000, end 2863.694167
      Metadata:
        title           : Chapter 15
      Chapter #0:15: start 2863.694167, end 3016.680333
      Metadata:
        title           : Chapter 16
      Chapter #0:16: start 3016.680333, end 3243.573667
      Metadata:
        title           : Chapter 17
      Chapter #0:17: start 3243.573667, end 3538.368167
      Metadata:
        title           : Chapter 18
      Chapter #0:18: start 3538.368167, end 3665.828833
      Metadata:
        title           : Chapter 19
      Chapter #0:19: start 3665.828833, end 3910.106200
      Metadata:
        title           : Chapter 20
      Chapter #0:20: start 3910.106200, end 4237.066167
      Metadata:
        title           : Chapter 21
      Chapter #0:21: start 4237.066167, end 4854.850000
      Metadata:
        title           : Chapter 22
      Chapter #0:22: start 4854.850000, end 5013.708700
      Metadata:
        title           : Chapter 23
      Chapter #0:23: start 5013.708700, end 5434.762667
      Metadata:
        title           : Chapter 24
      Stream #0:0(eng): Video: mpeg2video (Main), yuv420p(tv, progressive), 720x480 [SAR 32:27 DAR 16:9], SAR 186:157 DAR 279:157, 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc
      Metadata:
        BPS-eng         : 5484482
        DURATION-eng    : 01:30:34.762666666
        NUMBER_OF_FRAMES-eng: 130304
        NUMBER_OF_BYTES-eng: 3725857328
        SOURCE_ID-eng   : 0100E0
        _STATISTICS_WRITING_APP-eng: MakeMKV v1.14.3 win(x64-release)
        _STATISTICS_WRITING_DATE_UTC-eng: 2019-04-05 17:34:38
        _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
      Stream #0:1(por): Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s
      Metadata:
        title           : Surround 5.1
        BPS-eng         : 384000
        DURATION-eng    : 01:30:34.720000000
        NUMBER_OF_FRAMES-eng: 169835
        NUMBER_OF_BYTES-eng: 260866560
        SOURCE_ID-eng   : 0180BD
        _STATISTICS_WRITING_APP-eng: MakeMKV v1.14.3 win(x64-release)
        _STATISTICS_WRITING_DATE_UTC-eng: 2019-04-05 17:34:38
        _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
      Stream #0:2(spa): Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s (default)
      Metadata:
        title           : Surround 5.1
        BPS-eng         : 384000
        DURATION-eng    : 01:30:34.752000000
        NUMBER_OF_FRAMES-eng: 169836
        NUMBER_OF_BYTES-eng: 260868096
        SOURCE_ID-eng   : 0181BD
        _STATISTICS_WRITING_APP-eng: MakeMKV v1.14.3 win(x64-release)
        _STATISTICS_WRITING_DATE_UTC-eng: 2019-04-05 17:34:38
        _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
      Stream #0:3(por): Subtitle: dvd_subtitle, 720x480
      Metadata:
        BPS-eng         : 1772
        DURATION-eng    : 01:27:22.759977777
        NUMBER_OF_FRAMES-eng: 660
        NUMBER_OF_BYTES-eng: 1161324
        SOURCE_ID-eng   : 0120BD
        _STATISTICS_WRITING_APP-eng: MakeMKV v1.14.3 win(x64-release)
        _STATISTICS_WRITING_DATE_UTC-eng: 2019-04-05 17:34:38
        _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
      Stream #0:4(spa): Subtitle: dvd_subtitle, 720x480
      Metadata:
        BPS-eng         : 1767
        DURATION-eng    : 01:27:22.759977777
        NUMBER_OF_FRAMES-eng: 660
        NUMBER_OF_BYTES-eng: 1158568
        SOURCE_ID-eng   : 0122BD
        _STATISTICS_WRITING_APP-eng: MakeMKV v1.14.3 win(x64-release)
        _STATISTICS_WRITING_DATE_UTC-eng: 2019-04-05 17:34:38
        _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  At least one output file must be specified
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-03T18:01:21.970Z
Comments.Text: Show info from file and your ffmpeg version. The complete output of `ffmpeg -i input.mkv` will suffice.
Comments.UserDisplayName: llogan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-06T04:53:21.190Z
Comments.Text: I added the `ffmpeg -i input.mkv` info
Comments.UserDisplayName: Braian
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-09-25T12:50:21.013Z
Comments.Text: Hi, there is some way to do it ? Thanks.
Comments.UserDisplayName: Braian
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-09-25T18:38:55.640Z
Comments.Text: Try `ffmpeg -i input.mkv -map 0 -c copy -c:v libx264 -vf yadif -c:a aac -disposition:a:1 default -disposition:s:1 default output.mkv`. If it doesn't work try again with `-profile:v main` output option.
Comments.UserDisplayName: llogan
Tags: <ffmpeg><h.264><mkv><dvd>
Title: Reencode MKV (from DVD - Mpeg2) to h264
UserDisplayName: Braian
ThreadText: # Reencode MKV (from DVD - Mpeg2) to h264
  
  (Asked by: username_0 on 2019-05-02)
  
  I have some old DVD that I already converted using MakeMKV, they seems to have the original mpeg stream, so I want to do this:
  
  * Reencode the video stream to the more recommended settings for old-DVD using h264.
  * Reencode the audio streams (some mkv have 1 or 2 audio tracks) to aac or some other 5channel/stereo more compatible codec.
  * I already set the default language for audio and subtitles using mkvtoolnix but in my old TV it plays the first track of audio and the first track of subtitles no matter if other was set as default or not (yes, some of it have 2 subtitle tracks too, VLC loads the defaults ones with no problem).
  * Some videos have some interlaced tipical from the old-DVD's so I want to be able to turn on a deinterlace filter too if it is possible.
  
  How can I do this ? Thanks.
  
  ```
      ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
    built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
    configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.3_1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
    libavutil      56. 22.100 / 56. 22.100
    libavcodec     58. 35.100 / 58. 35.100
    libavformat    58. 20.100 / 58. 20.100
    libavdevice    58.  5.100 / 58.  5.100
    libavfilter     7. 40.101 /  7. 40.101
    libavresample   4.  0.  0 /  4.  0.  0
    libswscale      5.  3.100 /  5.  3.100
    libswresample   3.  3.100 /  3.  3.100
    libpostproc    55.  3.100 / 55.  3.100
  Input #0, matroska,webm, from '/Volumes/Data/Peliculas-Infantiles/pitufos.mkv':
    Metadata:
      encoder         : libmakemkv v1.14.3 (1.3.5/1.4.7) win(x64-release)
      creation_time   : 2019-04-05T17:34:38.000000Z
    Duration: 01:30:34.76, start: 0.000000, bitrate: 6261 kb/s
      Chapter #0:0: start 0.083417, end 378.378000
      Metadata:
        title           : Chapter 01
      Chapter #0:1: start 378.378000, end 461.661200
      Metadata:
        title           : Chapter 02
      Chapter #0:2: start 461.661200, end 644.477167
      Metadata:
        title           : Chapter 03
      Chapter #0:3: start 644.477167, end 922.288033
      Metadata:
        title           : Chapter 04
      Chapter #0:4: start 922.288033, end 1061.927533
      Metadata:
        title           : Chapter 05
      Chapter #0:5: start 1061.927533, end 1162.194367
      Metadata:
        title           : Chapter 06
      Chapter #0:6: start 1162.194367, end 1299.965333
      Metadata:
        title           : Chapter 07
      Chapter #0:7: start 1299.965333, end 1393.258533
      Metadata:
        title           : Chapter 08
      Chapter #0:8: start 1393.258533, end 1630.829200
      Metadata:
        title           : Chapter 09
      Chapter #0:9: start 1630.829200, end 1831.329500
      Metadata:
        title           : Chapter 10
      Chapter #0:10: start 1831.329500, end 2143.841700
      Metadata:
        title           : Chapter 11
      Chapter #0:11: start 2143.841700, end 2327.692033
      Metadata:
        title           : Chapter 12
      Chapter #0:12: start 2327.692033, end 2545.743200
      Metadata:
        title           : Chapter 13
      Chapter #0:13: start 2545.743200, end 2748.746000
      Metadata:
        title           : Chapter 14
      Chapter #0:14: start 2748.746000, end 2863.694167
      Metadata:
        title           : Chapter 15
      Chapter #0:15: start 2863.694167, end 3016.680333
      Metadata:
        title           : Chapter 16
      Chapter #0:16: start 3016.680333, end 3243.573667
      Metadata:
        title           : Chapter 17
      Chapter #0:17: start 3243.573667, end 3538.368167
      Metadata:
        title           : Chapter 18
      Chapter #0:18: start 3538.368167, end 3665.828833
      Metadata:
        title           : Chapter 19
      Chapter #0:19: start 3665.828833, end 3910.106200
      Metadata:
        title           : Chapter 20
      Chapter #0:20: start 3910.106200, end 4237.066167
      Metadata:
        title           : Chapter 21
      Chapter #0:21: start 4237.066167, end 4854.850000
      Metadata:
        title           : Chapter 22
      Chapter #0:22: start 4854.850000, end 5013.708700
      Metadata:
        title           : Chapter 23
      Chapter #0:23: start 5013.708700, end 5434.762667
      Metadata:
        title           : Chapter 24
      Stream #0:0(eng): Video: mpeg2video (Main), yuv420p(tv, progressive), 720x480 [SAR 32:27 DAR 16:9], SAR 186:157 DAR 279:157, 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc
      Metadata:
        BPS-eng         : 5484482
        DURATION-eng    : 01:30:34.762666666
        NUMBER_OF_FRAMES-eng: 130304
        NUMBER_OF_BYTES-eng: 3725857328
        SOURCE_ID-eng   : 0100E0
        _STATISTICS_WRITING_APP-eng: MakeMKV v1.14.3 win(x64-release)
        _STATISTICS_WRITING_DATE_UTC-eng: 2019-04-05 17:34:38
        _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
      Stream #0:1(por): Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s
      Metadata:
        title           : Surround 5.1
        BPS-eng         : 384000
        DURATION-eng    : 01:30:34.720000000
        NUMBER_OF_FRAMES-eng: 169835
        NUMBER_OF_BYTES-eng: 260866560
        SOURCE_ID-eng   : 0180BD
        _STATISTICS_WRITING_APP-eng: MakeMKV v1.14.3 win(x64-release)
        _STATISTICS_WRITING_DATE_UTC-eng: 2019-04-05 17:34:38
        _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
      Stream #0:2(spa): Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s (default)
      Metadata:
        title           : Surround 5.1
        BPS-eng         : 384000
        DURATION-eng    : 01:30:34.752000000
        NUMBER_OF_FRAMES-eng: 169836
        NUMBER_OF_BYTES-eng: 260868096
        SOURCE_ID-eng   : 0181BD
        _STATISTICS_WRITING_APP-eng: MakeMKV v1.14.3 win(x64-release)
        _STATISTICS_WRITING_DATE_UTC-eng: 2019-04-05 17:34:38
        _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
      Stream #0:3(por): Subtitle: dvd_subtitle, 720x480
      Metadata:
        BPS-eng         : 1772
        DURATION-eng    : 01:27:22.759977777
        NUMBER_OF_FRAMES-eng: 660
        NUMBER_OF_BYTES-eng: 1161324
        SOURCE_ID-eng   : 0120BD
        _STATISTICS_WRITING_APP-eng: MakeMKV v1.14.3 win(x64-release)
        _STATISTICS_WRITING_DATE_UTC-eng: 2019-04-05 17:34:38
        _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
      Stream #0:4(spa): Subtitle: dvd_subtitle, 720x480
      Metadata:
        BPS-eng         : 1767
        DURATION-eng    : 01:27:22.759977777
        NUMBER_OF_FRAMES-eng: 660
        NUMBER_OF_BYTES-eng: 1158568
        SOURCE_ID-eng   : 0122BD
        _STATISTICS_WRITING_APP-eng: MakeMKV v1.14.3 win(x64-release)
        _STATISTICS_WRITING_DATE_UTC-eng: 2019-04-05 17:34:38
        _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  At least one output file must be specified
  
  ```
  
  **Tags:** ffmpeg, h.264, mkv, dvd
  
  > **Comments:**
  > **username_1**: Show info from file and your ffmpeg version. The complete output of `ffmpeg -i input.mkv` will suffice.  
  > **username_0**: I added the `ffmpeg -i input.mkv` info  
  > **username_0**: Hi, there is some way to do it ? Thanks.  
  > **username_1**: Try `ffmpeg -i input.mkv -map 0 -c copy -c:v libx264 -vf yadif -c:a aac -disposition:a:1 default -disposition:s:1 default output.mkv`. If it doesn't work try again with `-profile:v main` output option.  
  
  ---
  
  ## 0 answers
  
  