VideoHelp Forum
+ Reply to Thread
Results 1 to 9 of 9
Thread
  1. Member
    Join Date: Feb 2014
    Location: Israel
    Search PM
    MKV-to-MP4 PHP script...

    So why I made it ? This is simple alternative to MkvToMp4 (which is a great utility) But the script is more faster, less error, modifiable by anyone, after Installation and setting up it's really easy to use it ...

    So ... What is it do ...

    Version 0.1 beta:
    1. Extract subtitles from MKV support SRT and SSA
    2. Convert subtitles to TTXT TX3G (iTunes compatible) include Hebrew,,.. (Convert extracted subtitles and external subtitles with same pattern, for example: "[same as video file].eng.srt").
    3. Extract video track and Re-encode audio tracks (all tracks) to AAC format (iTunes compatible).
    4. Getting information about the movie from iMDb and writing metadata (tags): Title, Description, Year, etc...
    5. Remuxing Audio, Video and Subtitles.
    6. Choose subtitles languages that you accept in new file, Edit mkv-to-mp4.php, line 11 remove or add language.

    Version 0.3 beta:
    1- Extract subtitles from MKV was fixed.

    Version 0.4 beta:
    1- Download poster from iMDb and add it to MP4 container (as Artwork).

    Version 0.5 beta:
    1- "GSConv.exe" utility removed and replaced by "Subtitle Edit"
    2- SRT Conversion now by SubtitleEdit command line
    3- Issue hebrew conversion bug fixed
    4- Remove temporary file when done (.TTXT, .TXT and etc...)

    Version 0.7 beta:
    1- Issue mkvextrack subtitles fixed.
    2- Script now convert all MKV include sub directories

    Installation:
    1. Download last version of PHP for windows (http://windows.php.net/download/)
    2. Extract the files into C:\PHP
    3. Open with notepad "php.ini-production" remove the char ";" before the line "extension=php_curl.dll" and save as php.ini in same folder.
    4. Copy MKV files into MKV-to-MP4.php's folder.
    5. You can right click on MKV-to-MP4.php then go to Open with->Choose default program->Browse and then choose PHP.EXE that locat at C:\PHP

    NOTE: You can put Tools' folder where ever you want and just copy the script file to video source folder and run it from there. But you must edit with Notepad the script (MKV-to-MP4.php) and set full path of all tools (it's easy on the top of the file).

    On work:
    1- Option to choose from where to get the movie info (iMDb or XBMC's nfo file).
    2- Option to choose audio tracks by languages that you accept.
    3. Easy option to choose subtitles languages that you accept.

    I will be happy to get more ideas, comments, modified version and etc,,...

    BTW- This is not re-encoding the video stream, maybe some movies will not work if the video encoded not well, The iTunes and iDevices is less forgiving...
    Attached Files
    Last edited by zivtal; 10th Feb 2014 at 17:22.
    Quote Quote  
  2. Member
    Join Date: Feb 2014
    Location: Israel
    Search PM
    Originally Posted by Baldrick View Post
    The problem it's was with one of the tools that I used GSConv.exe (I found it in MkvToMp4 package) this tool has been removed from my package and replaced by "Subtitle Edit".
    Last edited by zivtal; 8th Feb 2014 at 09:11.
    Quote Quote  
  3. Member
    Join Date: Feb 2014
    Location: Israel
    Search PM
    Version beta 0.3: Extract subtitles from MKV was fixed.
    Version beta 0.4: Download poster from iMDb and add it to MP4 container (as Artwork).
    Last edited by zivtal; 9th Feb 2014 at 19:44.
    Quote Quote  
  4. Member
    Join Date: Feb 2014
    Location: Israel
    Search PM
    Version 0.5 beta:
    1- "GSConv.exe" utility removed and replaced by "Subtitle Edit"
    2- SRT Conversion now by SubtitleEdit command line
    3- Issue hebrew conversion bug fixed
    4- Remove temporary file when done (.TTXT, .TXT and etc...)
    Quote Quote  
  5. Member
    Join Date: Feb 2014
    Location: Israel
    Search PM
    Version 0.7 beta:
    1- Issue mkvextrack subtitles fixed.
    2- Script now convert all MKV include sub directories.
    Quote Quote  
  6. How do you specify which subtitle tracks to include?
    Quote Quote  
  7. Member
    Join Date: Jan 2014
    Location: Calgary, Canada
    Search Comp PM
    Hi Zivtal,

    I'm having issues trying to get this installed properly, let alone working. I have multiple questions about your instructions:

    1. Download last version of PHP for windows (http://windows.php.net/download/)
    Which version do I download? There are "Thread Safe" and "Non Thread Safe" versions, plus x86 and x64 versions. If I'm running Win 7 x64, should I download a x64 version, even though the website says it's experimental?

    2. Extract the files into C:\PHP
    Does this really have to be installed off the root of C:\? Can it be installed under one of the "Program Files" directories? Installing it directly under C:\ is not a very clean way of doing things.

    3. Open with notepad "php.ini-production" remove the char ";" before the line "extension=php_curl.dll" and save as php.ini in same folder.
    The PHP program complains that the php_curl.dll can't be found in the main PHP folder. Do I need to move the php_curl.dll file from the "ext" folder and into the main PHP folder?

    4. Copy MKV files into MKV-to-MP4.php's folder.
    Can the MKV-to-MP4 folder be extracted anywhere, or does it need to be somewhere specific, like within the PHP folder?

    5. You can right click on MKV-to-MP4.php then go to Open with->Choose default program->Browse and then choose PHP.EXE that locat at C:\PHP
    This originally worked when I attempted to install PHP to C:\Program Files (x86). However, when I moved the PHP folder to the C:\ root folder, I couldn't get the .php file to recognize the php.exe file in the new C:\PHP location. Not sure why this is, and I may have to run a System Restore to fix it.

    So after all this is installed properly, what should I expect to see when I double-click the MKV-to-MP4.php file? Does a window come up with all the conversion options, or are the files are immediately converted in a DOS window?

    Thanks,
    Visor
    Quote Quote  
  8. @zivtal
    php (i wud say pre html processor) does required to be hooked-up with a file-server like IIS, Apache or lighttpd.
    Does your package contain any file-server?

    Using MKV-to-MP4.php instead of MKVtoMP4 (binaries like hybrid, handbrake, pazera's or something else) is something like converting PC into low-end web server.
    Last edited by enim; 5th Jun 2014 at 19:41.
    Quote Quote  



Similar Threads