Log in

View Full Version : FastMKV2MP4 - Mkv to AppleTV MP4 converter with subs and ac3


nuclear bit
2nd January 2011, 19:36
New version v0.3 with queue support can now be downloaded @ http://nuclearbit.blogspot.com/2011/01/new-version-of-fastmkv2mp4-available-v0.html

--------
Just finished creating a frontend for mkv to appletv remuxing without reencoding the video stream. It works pretty fast. However there are still some limitations and it needs further testing. The nice thing is that it delivers an MP4 with softcoded subs and a working AC3 track!
It needs to be cleaned up and error checking needs to be added, but for those who are interested :
have a look at http://nuclearbit.blogspot.com/2011/01/new-version-of-fastmkv2mp4-available-v0.html

Selur
2nd January 2011, 20:13
got a question: How do you to the subtitle conversion for picture based subtitles?
srt to ttxt isn't that hard, but afaik none of the tools you use (mp4box, ac3filter, eac3to, mkvtoolnix, neroaac) can i.e. do a .idx/.sub to ttxt conversion.
Did you write a ocr engine or something similiar yourself, or is it a missing limitation?

As far as I see you wrote a small remuxer frontend with audio reencoding support. :)

Found a bug:
1. When I press the 'Browse'-button next to 'Import subs:' nothin happens,...
2. When I select a mkv file it crashes,.. with an unhandled exception,...

Cu Selur

nuclear bit
2nd January 2011, 20:45
Selur,

Indeed the soft coded subs are only for text-based subs (in the mkv or external), no support (yet) for pic based subs.
It is indeed a remuxer that gets the audio right for appleTV and it also has subtitle patching built in (after running mp4box), since MP4Box generates a 'non appletv compliant' mp4 with respect to the subs.

bugs:
1) I just found that one also
2) do you have mkvinfo.exe in the mkvtoolnix subfolder ?

ps: there is another one, the output mp4 is written in the source folder ...

cheers, nb

Selur
2nd January 2011, 21:14
2) do you have mkvinfo.exe in the mkvtoolnix subfolder ?
Nope. But it shouldn't crash with an exception,.. ;)

nuclear bit
2nd January 2011, 22:21
Nope. But it shouldn't crash with an exception,.. ;)
done :)

Olebrumm71
6th January 2011, 16:00
After selecting a MKV file the app "crashes" with an unhandled exception: 'Index was outside the bounds of the array".

If I choose to Continue, execution seems to go on running mkvextract.exe

lastly mp4box is executed for a short while, before execution ends abruptly and the output is just a small 25 KB .mp4 file.

nuclear bit
6th January 2011, 19:17
After selecting a MKV file the app "crashes" with an unhandled exception: 'Index was outside the bounds of the array".


Apparently it fails when parsing the mkvinfo output of that file.
I am very interested in the output of the cmd command:
installdir\mkvtoolnix\mkvinfo.exe "yourmkvfile.mkv"
Could you paste the output here? just to check the streams in there and see if we can fix the parsing for that kind of mkv.

thanks, nb

Olebrumm71
6th January 2011, 22:45
Output from mkvinfo.exe:

+ EBML head
|+ Doc type: matroska
|+ Doc type version: 1
|+ Doc type read version: 1
+ Segment, size 576860307
|+ Seek head (subentries will be skipped)
|+ EbmlVoid (size: 4027)
|+ Segment information
| + Timecode scale: 1000000
| + Muxing application: libebml v0.7.7 + libmatroska v0.8.1
| + Writing application: mkvmerge v2.0.2 ('You're My Flame') built on Sep 20 2007 09:25:45
| + Duration: 1208.640s (00:20:08.640)
| + Date: Tue Mar 25 01:20:26 2008 UTC
| + Segment UID: 0xda 0x71 0x99 0xba 0x46 0x80 0xe4 0xf8 0x89 0xcc 0x77 0xc1 0xbb 0x8c 0x12 0xbe
|+ Segment tracks
| + A track
| + Track number: 1
| + Track UID: 3068705342
| + Track type: audio
| + Enabled: 1
| + Default flag: 1
| + Forced flag: 0
| + Lacing flag: 1
| + MinCache: 0
| + Timecode scale: 1
| + Max BlockAddition ID: 0
| + Codec ID: A_AC3
| + Codec decode all: 1
| + Default duration: 32.000ms (31.250 fps for a video track)
| + Language: und
| + Audio track
| + Sampling frequency: 48000
| + Channels: 6
| + A track
| + Track number: 2
| + Track UID: 1
| + Track type: video
| + Enabled: 1
| + Default flag: 1
| + Forced flag: 0
| + Lacing flag: 0
| + MinCache: 1
| + Timecode scale: 1
| + Max BlockAddition ID: 0
| + Codec ID: V_MPEG4/ISO/AVC
| + Codec decode all: 1
| + CodecPrivate, length 39 (h.264 profile: High @L5.1)
| + Default duration: 41.708ms (23.976 fps for a video track)
| + Language: eng
| + Video track
| + Pixel width: 1280
| + Pixel height: 720
| + Interlaced: 0
| + Display width: 16
| + Display height: 9
|+ EbmlVoid (size: 1024)
|+ Cluster

nuclear bit
7th January 2011, 01:09
thanks I could easily reproduce the problem.
Seems my parser was rather mkvinfo version sensitive,
that should be fixed now, redownload the exe

cheers, nb

Olebrumm71
7th January 2011, 13:28
New version works much better!

Thank you very much for making this utility which is exactly what I have been looking for.

(the only major feaure I am missing is the ability to queue a list of input files for remuxing )

nuclear bit
7th January 2011, 14:08
(the only major feaure I am missing is the ability to queue a list of input files for remuxing )

Well I was also searching for a similar tool, turned out that something exists for MacOSX, but not for windows.
I will add queues by next week, check this thread for an update

cheers,
nb

nuclear bit
15th January 2011, 15:05
New version with queue support now available at : http://nuclearbit.blogspot.com/2011/01/new-version-of-fastmkv2mp4-available-v0.html

ekoshyun
16th January 2011, 04:43
Subtitles have been a big issue and it appears this software may eventually be even better than Handbrake and XMedia Recode... with a few adjustments, of course.

First, if there's a way to not force people to download the .NET framework, that would be great. A quick installer package like Erika's Airplay (http://ericasadun.com/ftp/AirPlay/) and removing the unnecessary steps of installing all of those other free software packages (even though I already have most of them) - would make the barrier of entry much lower for people who want to simply convert their movies quickly and get it in their iTunes collections.

I'm a user experience designer in case you need any further testing/feedback. Keep up the great work! This certainly has potential (and I'll be featuring your software on Monday's Apple TV hacking article on Unplggd.com, where I'm a writer for!) =)

nuclear bit
16th January 2011, 13:51
thanks! working on your remarks
I will also include aac encoding (by default) using libfaac which is free and can be distributed under the gpl license. Making the nero aac encoding optional would allow me to distribute a package under gpl that works out of the box

Betsy25
16th January 2011, 18:40
It gives me the same problems as with using other tools to do this (MeGUI, Starxrip). the audio is out-of-sync in the produced .mp4
(it's correct in the original .mkv)

ekoshyun
16th January 2011, 19:48
Sent it over to some of my friends to test. About 70% them can't even get it to work since they're on Windows 7 x64 and cannot get the .NET 4.0 Framework to install correctly for the life of them. I think axing that requirement altogether will help alot.

nuclear bit
16th January 2011, 20:43
It gives me the same problems as with using other tools to do this (MeGUI, Starxrip). the audio is out-of-sync in the produced .mp4
(it's correct in the original .mkv)
I assume this is not on all mkv's?
MeGUI also uses mp4box for muxing an mp4, so it doesn't surprise me that both would suffer from the same issues on particular mkv's. Strange though, are you using an appletv for playback?
just trying to eliminate the chance that it is mp4-player related...

nuclear bit
16th January 2011, 20:46
cannot get the .NET 4.0 Framework to install correctly for the life of them. I think axing that requirement altogether will help alot.
the runtime will be needed somehow, I have a look if it can be packaged with the app in another way

Selur
16th January 2011, 20:49
wild guess: the mkv is vfr and the tools don't extract the timecodes and converts them to nhml timecodes,... (or if they do, which I doubt, if it's a hardware player it might not handle the timecodes correctly)

Betsy25
16th January 2011, 21:28
I assume this is not on all mkv's?
MeGUI also uses mp4box for muxing an mp4, so it doesn't surprise me that both would suffer from the same issues on particular mkv's. Strange though, are you using an appletv for playback?
just trying to eliminate the chance that it is mp4-player related...

Playing directly on PC (Media Player Classic - HC latest version) and Playstation3 shows the same out-of-sync on the .mp4

Playing the original .mkv is perfectly fine on PC.

nuclear bit
16th January 2011, 21:56
wild guess: the mkv is vfr

So I could add an optional tc2mp4 step to adjust the vfr.
feature for a next release.
have to figure out if there is an easy detection for vfr or if i have to scan all the timecodes

Selur
16th January 2011, 22:26
have to figure out if there is an easy detection for vfr or if i have to scan all the timecodes
1st possibility: use MediaInfo to detect vfr
2nd possibility: always extract the timecodes ...

Betsy25
17th January 2011, 00:12
MediaInfo from the original .mkv
(don't see anything related to timescodes or vfr AFAIK)
General
Unique ID : 306517885181158239279710313009226463752
(0xE6993285ED51139B0A34804C0DA43A08)
Complete name : C:\TV episodes\Basta\BastaE1.mkv
Format : Matroska
File size : 482 MiB
Duration : 47mn 24s
Overall bit rate : 1 420 Kbps
Writing application : HandBrake 0.9.5
Writing library : libmkv 0.6.4.1

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L3.0
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 47mn 24s
Nominal bit rate : 1 272 Kbps
Width : 716 pixels
Height : 574 pixels
Display aspect ratio : 16:9
Frame rate mode : Variable
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.124
Writing library : x264 core 112
Encoding settings : cabac=1 / ref=2 / deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=6
/psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 /
deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=3 / sliced_threads=0 / nr=0 / decimate=1
/ interlaced=0 / constrained_intra=0 / bframes=2 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 /
weightb=0 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 /
rc_lookahead=40 / rc=abr / mbtree=1 / bitrate=1272 / ratetol=1.0 / qcomp=0.60 / qpmin=3 / qpmax=51 /
qpstep=4 / ip_ratio=1.40 / aq=1:1.00

Language : English
Color primaries : BT.601-6 525, BT.1358 525, BT.1700 NTSC, SMPTE 170M
Transfer characteristics : BT.709-5, BT.1361
Matrix coefficients : BT.601-6 525, BT.1358 525, BT.1700 NTSC, SMPTE 170M

Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : A_AAC
Duration : 47mn 24s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Compression mode : Lossy

Selur
17th January 2011, 09:37
don't see anything related to timescodes or vfr AFAIK
hmmm,....
Frame rate mode : Variable
looks like variable frame rate (vfr) to me ;)

nuclear bit
17th January 2011, 11:03
hmmm,....

looks like variable frame rate (vfr) to me ;)

ok, I am going to add this, as we have a test case

TECK
2nd August 2011, 22:16
I cannot download your application.

deekey777
2nd January 2012, 13:27
Is this project dead? Is there an aquivalent software to FastMKV2MP4?

foobaz
18th March 2012, 18:51
This sounds like a good tool. I was going to try it for my new iPad. Google docs has lost the file and I find no other sources on the net. Please make this available again!

Vize99
21st March 2012, 02:11
This sounds like a good tool. I was going to try it for my new iPad. Google docs has lost the file and I find no other sources on the net. Please make this available again!

You don't have to look far - excellent tool in this forum:
http://forum.doom9.org/showthread.php?t=163050



---