Konversi mkv ke avi: Difference between revisions

From OnnoCenterWiki
Jump to navigationJump to search
Onnowpurbo (talk | contribs)
New page: Sumber: http://www.larsen-b.com/Article/261.html How to convert matroska MKV to AVI on Linux ? Today, I discover that my M3100 player doesn’t know how to play Mastroka files. Mastrok...
 
Onnowpurbo (talk | contribs)
No edit summary
Line 1: Line 1:
Sumber: http://www.larsen-b.com/Article/261.html
Sumber: http://www.larsen-b.com/Article/261.html
How to convert matroska MKV to AVI on Linux ?


Today, I discover that my M3100 player doesn’t know how to play Mastroka files. Mastroka files are really kool since the subtitles are embeded in .. but that’s it, my player refuse to play open it.
Today, I discover that my M3100 player doesn’t know how to play Mastroka files. Mastroka files are really kool since the subtitles are embeded in .. but that’s it, my player refuse to play open it.

Revision as of 10:58, 23 March 2011

Sumber: http://www.larsen-b.com/Article/261.html

Today, I discover that my M3100 player doesn’t know how to play Mastroka files. Mastroka files are really kool since the subtitles are embeded in .. but that’s it, my player refuse to play open it.

This stuff can be repack in a AVI (xivd..) file with some open source tools. Here, a little script to do the hard stuff ;)

You can find the script here : http://svn.pythonfr.org/public/pythonfr/utils/video/mkv2avi.py

#!/usr/bin/python
# Little script to depack Matroska file, and repack them
# in a AVI + subtitle format.

import sys
import os

def message(msg):
    print "=" * 78
    print "= %s" % msg
    print "=" * 78

def usage():
    print "Mastroka repacker script"
    print "  Usage: "+sys.argv[0]+ " filename"

if __name__ == "__main__":
    if len(sys.argv) < 2:
       usage()
    else:
       filename = sys.argv[1]
       basename = filename[:-4]
       message("Unpacking file: %s" % filename)
       os.system("mkvextract tracks %s 1:temp_video.avi 2:temp_audio.ogg 3:%s.srt" % (filename,basename) ) 

       message("Repacking file: %s.avi" % basename)
       os.system("ffmpeg -i temp_audio.ogg  -i temp_video.avi  -vcodec copy  %s.avi" % (basename) ) 

       message("Cleaning files")
       os.system("rm temp_video.avi temp_audio.ogg")


Referensi


Pranala Menarik