[INFO] Transcoding MKV to MP4 quick and easy way.

Search This thread

racheal56

New member
Aug 2, 2011
1
0
It seems a good page, but I have another converter from the webpage of ojosoft, it is fast and simple.:D
 

bahathir

Senior Member
Feb 14, 2010
301
161
55
Here is my today's post in my Google Buzz and Google+
Since I am a command line and GNU/Linux+FOSS lover, here is my way to trancdode MKV to MP4 and make the TF101 flawlessly played in HW decoding mode.

Last few weeks ago, I tried to trancode a 1920x1080p H264 encoded movie in MKV container to 1280x720p H264 mkv format which I wanted to play it back in Asus Transformer TF101. As usual, I used FFMPEG (latest svn), and I had few problems handling streams' mapping. The original mkv has a H264 video, a 5.1 DTS audio, a 5.1 Dolby Digital audio and a subtitle. FFMPEG complained that tke output mkv must have matching numbers of streams. This can be solved by using -an, -sn and -map options.

After transcoding a short clip of couple of minutes, and uploaded to the tablet for a test playback, The video 720p playback was smooth, due to the hardware decoding, but, I found that, the audio was cut off after 20 or 30 seconds. I start and rewind few seconds back, and the audio resumed, and it cuts off again after several seconds. I tried several audio codecs, such as, AAC, MP3 and MP2, I also tried Baseline and High profile H264 video encoding... but, the results were same.

I still can played the mkv file with third party players using software (sw) decoding mode, which make the video playback was choppy and with out of synced audio but no cut off.

Then I tried, to converted it to mpeg4 in .avi format. It runs well, but the stock player in the tablet cannot play .avi. I used MoboPlayer but, the quality is not as good as H264 hardware decoding. Then, I looked up in Internet, and there were many problems related to mkv playback in the tablet. The solution is, to use MP4 container.


Code:
$ ffmpeg  -i /path/to/IN.1080p.X264.AC3.DTS.mkv -b 800k -ac 2 -ab 160k  -aspect 16:9 -s hd720 -threads 0  OUT.mp4 -map 0.0 -map 0.2

Here I transcoding /path/to/IN.1080p.X264.MKV.AC3.DTS.mkv to OUT.mp4 using video bitrate at 800kbps, and 2 channels audio biterate at 160kbps. Here I did not put the video and audio codecs type, because FFMPEG will automatically choose a proper audio and video codecs based on the container's format/type. For MP4 container, FFMPEG chosed High profiled H264 video codecs and mp4a or AAC audio codecs. Result..... it played both audo and video beautifully on the tablet, in hardware decoding mode. :)

You can increase the video bitrate if you want a better video quality, but, it also produced bigger file. If you have less than 720p H264 encoded file, you can use -vcodec copy, to copy the video content without any encoding, which will be produce the exact video quality as the original.

I hope, Asus can resolve the MKV playback issue in the next update.

Thank you.

Reference,
Here is the original source...

Code:
$ ffprobe /path/to/IN.1080p.X264.AC3.DTS.mkv 
ffprobe version N-32077-g5f5e37e, Copyright (c) 2007-2011 the FFmpeg developers
  built on Sep  2 2011 11:29:35 with gcc 4.4.4
  configuration: --prefix=/usr --libdir=/usr/lib64 --enable-vdpau --enable-gpl --enable-pthreads --enable-nonfree --enable-postproc --enable-x11grab --enable-libx264 --enable-libfaac --enable-libvpx --enable-libmp3lame --enable-libdc1394
  libavutil    51. 13. 0 / 51. 13. 0
  libavcodec   53. 12. 0 / 53. 12. 0
  libavformat  53.  9. 0 / 53.  9. 0
  libavdevice  53.  3. 0 / 53.  3. 0
  libavfilter   2. 34. 2 /  2. 34. 2
  libswscale    2.  0. 0 /  2.  0. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[matroska,webm @ 0x1ce8460] Estimating duration from bitrate, this may be inaccurate
Input #0, matroska,webm, from '/path/to/IN.1080p.X264.AC3.DTS.mkv':
  Duration: 01:42:33.37, start: 0.000000, bitrate: 2176 kb/s
    Stream #0.0(eng): Video: h264 (High), yuv420p, 1920x1080, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Stream #0.1: Audio: ac3, 48000 Hz, 5.1, s16, 640 kb/s (default)
    Metadata:
      title           : AC3
    Stream #0.2: Audio: dts (DTS), 48000 Hz, 5.1, s16, 1536 kb/s
    Metadata:
      title           : DTS
    Stream #0.3(dut): Subtitle: text (default)
    Metadata:
      title           : Nederlands
Unsupported codec with id 94210 for input stream 3

Transcoded file using the above ffmpeg options. Here I chose to use DTS audio stream. (source's stream 0.2)
Code:
$ ffprobe OUT.mp4 
ffprobe version N-32077-g5f5e37e, Copyright (c) 2007-2011 the FFmpeg developers
  built on Sep  2 2011 11:29:35 with gcc 4.4.4
  configuration: --prefix=/usr --libdir=/usr/lib64 --enable-vdpau --enable-gpl --enable-pthreads --enable-nonfree --enable-postproc --enable-x11grab --enable-libx264 --enable-libfaac --enable-libvpx --enable-libmp3lame --enable-libdc1394
  libavutil    51. 13. 0 / 51. 13. 0
  libavcodec   53. 12. 0 / 53. 12. 0
  libavformat  53.  9. 0 / 53.  9. 0
  libavdevice  53.  3. 0 / 53.  3. 0
  libavfilter   2. 34. 2 /  2. 34. 2
  libswscale    2.  0. 0 /  2.  0. 0
  libpostproc  51.  2. 0 / 51.  2. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'OUT.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : 1970-01-01 00:00:00
    encoder         : Lavf53.9.0
  Duration: 01:42:33.32, start: 0.000000, bitrate: 956 kb/s
    Stream #0.0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 790 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc
    Metadata:
      creation_time   : 1970-01-01 00:00:00
    Stream #0.1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 159 kb/s
    Metadata:
      creation_time   : 1970-01-01 00:00:00
 

CrazyPeter

Senior Member
Sep 1, 2010
1,256
466
Wow so much movie piracy talk...

I mean if you actually own the movie, why not rip it in the correct format in the first place.

Clearly anyone wanting to convert from MKV to MP4 is a pirate that's downloaded movies from the internet..

Sigh, the freetard world we live in.
 

Aelyus

Senior Member
Jul 10, 2011
91
18
Wow so much movie piracy talk...

I mean if you actually own the movie, why not rip it in the correct format in the first place.

Clearly anyone wanting to convert from MKV to MP4 is a pirate that's downloaded movies from the internet..

Sigh, the freetard world we live in.

>implying morals

Picture%2031.png
 

AlexTheStampede

Senior Member
Jan 16, 2011
323
25
Wow so much movie piracy talk...

I mean if you actually own the movie, why not rip it in the correct format in the first place.

Clearly anyone wanting to convert from MKV to MP4 is a pirate that's downloaded movies from the internet..

Sigh, the freetard world we live in.

Bull****. Every person with enough knowledge (read: Handbrake instaled) would rip straight in the right format, and that's mkv... If then your gadget don't like it there is the bother to convert to something less practical.

Not that I think most conversions are from personal backup copies, mind you.

Sent from my GT-P1000 using Tapatalk
 

bahathir

Senior Member
Feb 14, 2010
301
161
55
Piracy?

What if, I already owned a MKV files which I ripped some years ago, and my PC and laptop can play it without any problems.Since TF101 cannot play MKV format as well as my laptop/PC, then, transcoding it to MP4 is much easier, compared to rerip the source media again, hint: media drive's I/O speed. or hassle to use 'BDVM'....

MKV container also has capability to store several audio, video and subtitle streams in one .mkv file. Using proper ffmpeg options, you can SELECT which streams to be stored in MP4 file's format, as what I demonstrated in earlier post.

Thank you.
 
Last edited:

CrazyPeter

Senior Member
Sep 1, 2010
1,256
466
Piracy?

What if, I already owned a MKV files which I ripped some years ago, and my PC and laptop can play it without any problems.Since TF101 cannot play MKV format as well as my laptop/PC, then, transcoding it to MP4 is much easier, compared to rerip the source media again, hint: media drive's I/O speed. or hassle to use 'BDVM'....

MKV container also has capability to store several audio, video and subtitle streams in one .mkv file. Using proper ffmpeg options, you can SELECT which streams to be stored in MP4 file's format, as what I demonstrated in earlier post.

Thank you.

Sure there is potential for some obscure reason to use MKV, but it's a container and offers no real advantage over MP4, so why encode using it in the first place.

99.9999% of people wanting MKV tools are movie pirates. You know that, I know that, everyone knows that.
 

lrissman

Member
Oct 3, 2010
34
4
Sure there is potential for some obscure reason to use MKV, but it's a container and offers no real advantage over MP4, so why encode using it in the first place.

99.9999% of people wanting MKV tools are movie pirates. You know that, I know that, everyone knows that.

i use mkv from my own owned video sources because i find options are far more flexable and the transformer is not my only playback source (eg, i also have been using a popcorn hour for years). eg, ac3/dts audio, chapters, more subtitle options, etc.

I would guess pirates use mkv because it is a more flexable format, same reason i use it.

Now, back to the op. I use mediacoder and you can choose copy for the video.

Sent from my Transformer TF101 using Tapatalk
 

bahathir

Senior Member
Feb 14, 2010
301
161
55
In certain cases ,it is remux. But, if we change video or audio bitrate/codecs or resolution , then we called it transcoding.

Sent from my Nexus One using XDA App
 

dgcruzing

Senior Member
Nov 21, 2010
1,173
322
Mermaid Beach QLD
Who cares what it is called..
as long as we can play want we want when we want..

I am playing with a few..

XviD4PSP 5 -- seems nice and quick
Format factory - also seems to do the trick
Ojosoft Total video convert
Storm or in Chinese.. 暴风转码 1.2(正式版) - yet to install just downloading now..

Will come back with settings and results over the next week..
As its trial and error at this stage..
I am converting work video's and promo video's to see which format is going to be best for the sales teams to use..
 

AlexTheStampede

Senior Member
Jan 16, 2011
323
25
On Windows you might want to try Media Coder. If you have a relatively recent Nvidia card it can use that to encode, and results can be very fast! I have a not so new dual core Athlon X2 at 2.9 ghz and a Geforce gtx 560: with the video card I can encode 1080p video in real time or a little faster depending on the source file. Starting from a dvd rip in XviD I got impressive over 400 frames per second...
All this while encoding in h264, clearly.


Or you could use the awesome and multi platform Handbrake, no video card support but it's quality stuff anyway.

Sent from my GT-P1000 using Tapatalk
 

dburckh

Senior Member
Jan 26, 2011
260
91
Sure there is potential for some obscure reason to use MKV, but it's a container and offers no real advantage over MP4, so why encode using it in the first place.

99.9999% of people wanting MKV tools are movie pirates. You know that, I know that, everyone knows that.

I have to chime in as well. I use mkv on my media center PC because it allows me to keep the original quality of the movie without audio/video conversion. MP4 basically forces you to use H264 and AAC. Very few receivers support AAC decoding, but most support AC3/DTS passthrough. The only reason I see to use .mp4 is low power devices. MKV also has chapter support, which mp4 has, but only spotty support.

FYI: I rip my kids movies so they don't trash the discs and they can access them from a central point. For DVD I just rip them to a folder, but for Blu-Ray I use MKV. There are reason other than piracy for MKV!

So on a portable devices, mp4 is king. On media center mkv rules the roost.

Anyway, I just suck it up and use handbrake. It does an excellent job and takes a little less than the time of the movie to transcode. (H264 Main+cabac+3BF-BP-WP-8x8, 160mbps 2 channel AAC). I still get a little stutter, but with those settings it's hardly noticeable.
 

Shirley1990

New member
Feb 17, 2014
1
0
MKV to MP4, DTS to Mp4

TTo convert MKV to MP4, DTS MKV to MP4 with subtitles, DTS MKV to AC3 with 5.1 channels, Aunsoft Blu-ay Video Converter Ultimate is best to keep subtitiles and video quality. With the support ofTrueHD, Eac3, DTS, DTS-HD in BD movie, you can select the subtitle and audio stream with the exact language you want.
 

casimonego

New member
Aug 13, 2014
1
0
Today, converting MKV to MP4 becomes simpler and simpler, since there are many available MKV to MP4 Converters online. But most of them only can either convert MKV to MP4 with low output quality or doesn't support converting MKV to MP4 with subtitles. Even the converted MP4 files are incompatible with the desire devices like iPhone, iPod, iPad, etc.

There are so many converters available online but before going to download or purchase, find out the best MKV to MP4 converter - Faasoft Video Converter which can easily batch convert MKV to MP4 without quality loss and with subtitles.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    With Honeycomb 3.1 update, 720p High Profile H.264 is natively supported. But with lack of native support on mkv container and AC3 format, many of us are still re-encoding mkv's to MP4. While re-encoding insures full hardware playback with transformer, it is time consuming. I was looking for ways to transcode video while converting AC3/DTS to natively supported AAC format.

    Enter GOTSent. Originally created for converting files to supported format for PS3 and Xbox360, this little program does a wonderful job of transcoding mkv files to natively supported MP4/AAC format in minutes.

    I've tested high@L3.1 720p 4.3GB file and with my Q9400 CPU, it took about 15 minutes to transcode video and convert DTS audio to MP4! Resulting size was 3.6GB.

    gotsent_1053.jpg

    Not much to explain as most of it is self explanatory. Select your source file and choose xbox360 as target. Make sure you have Haali Media Splitter and AC3 Filter installed if having issues.

    Note: Since you are not encoding video with GOTSent, if the source file has profile/resolution settings that are beyond the capabilities of TF101/HC3.1, it will not playback. You will still have to encode these files using Handbrake.
    1
    In certain cases ,it is remux. But, if we change video or audio bitrate/codecs or resolution , then we called it transcoding.

    Sent from my Nexus One using XDA App


    TRANSCODING is on the fly stream conversion to suit target devices. This isn't.