Posts


UPDATE: 09/03/2011 Source code is now hosted at github: https://github.com/majorsilence/MPlayerControl

UPDATE: 04/03/2011 Uploaded new package with bug fixes.

I have written a small .NET wrapper library for MPlayer . This has been tested on Windows XP/7 and Ubuntu Linux 10.10. It should work fine on OS X and anywhere else that mono runs.

On windows it requires that there be a directory and file “backend\mplayer.exe” in it in the same folder as the dll. On all other system it requires that mplayer be installed and in the path. It may require some tweaks to getting working on some systems.

It can play both audio and video files. It includes a sample user interface.

It currently supports play, pause, stop. seek and some other basic functionality. I only add new features as I require them or people send in patches.


There is a bug in devede when using imgburn to create an ISO file; it would prompt you for the files system type.. I just committed a fix to my subversion repository to fix this. It was basically a typo. The code had /FILESYSTEM “ISO9960 + Joliet” when it should of been /FILESYSTEM “ISO9660 + Joliet”.

Once it has been built and tested I will be uploading a new build of devede for windows.


This is a short list of the steps necessary to build a DeVeDe release for Windows.

See also http://majorsilence.com/windows_devede_development_instructions for instructions on setting up DeVeDe environment on Windows.

  • Update Setup.py - version
  • Update version.txt
  • Upload version.txt to website
  • Run Build-Trunk.py to zip source code and create exe
  • Run devede-setup.warsetup - update version number - creates msi package
  • Upload source to website
  • Upload msi package to website
  • Create torrent of msi package an upload to website
  • Update website with link to torrent and date uploaded

I am releasing DeVeDe win32 3.16.9 build 6 as of this moment. Download from http://www.majorsilence.com/devede

With this release all deadlock issues while reading progress from the backend programs should be fixed on Windows.

I have re-enabled progress percent on the video conversion stage, mpg to vob stage and the mkisofs stage (for those that are using mkisofs instead of imgburn)

It has the same speed as the current devede with the progress percent turned off but about a 25% speed improvement from previous versions that displayed the percent finished.

I have also added a new program option so you can choose if you are using imgburn or mkisofs.

devede.exe -imgburn will use imgburn if present. If this option or if imgburn is not present devede will fall back to mkisofs. By default the -imgburn option is being set.

Also included is the newest version of imburn at the moment and a newer version of mencoder and mplayer.


A small IronPython script that I used to find files that names were to long to copy to my Windows XP computer.

import clr
import System
import System.IO

# A small IronPython script to copy files and check for filename length violations on windows xp.

def CheckFilesRecursively(target):
    """
    DirectoryInfo target
    """
    
    #directory info
    for x in target.GetDirectories():
        CheckFilesRecursively(x)
        if len(x.FullName) > 200:
            print x.FullName, "lenth:", len(x.FullName)
    
    #FileInfo
    for x in target.GetFiles():
        print x.FullName, "lenth:", len(x.FullName)
        if len(x.FullName) > 255:
            print x.FullName, "lenth:", len(x.FullName)
    

def CopyFilesRecursively(source, target):
    """
    DirectoryInfo source, DirectoryInfo target
    """
    for x in source.GetDirectories():
        print "Creatig Directory:", target.FullName + x.Name
        CopyFilesRecursively(x, target.CreateSubdirectory(x.Name));
    
    for x in source.GetFiles():
        print "Copying:", x.FullName
        try:
            x.CopyTo(System.IO.Path.Combine(target.FullName, x.Name), True); #overwrite
        except System.Exception as ex:
            WriteLine(ex)


def WriteLine(msg):
    filePath = System.IO.Path.Combine("MajorSilence-Debug.txt")
    
    System.IO.File.AppendAllText(filePath, System.DateTime.Now.ToLongDateString() + " " + System.DateTime.Now.ToLongTimeString() + System.Environment.NewLine)
    System.IO.File.AppendAllText(filePath, msg.Message + System.Environment.NewLine + msg.StackTrace + System.Environment.NewLine)
    System.IO.File.AppendAllText(filePath, System.Environment.NewLine + System.Environment.NewLine)


if __name__ == "__main__":
    help_msg="""
    -s source directory to copy files
    -t target directory to copy files
    -c if found it will copy the -s to the -t if not found -s and -t will have filename length check run
    -h Display Help
    """
    source_path=""
    target_path=""
    copy_source=False
    help=False
    for i, x in enumerate(System.Environment.GetCommandLineArgs()):
        if x == "-s": # source
            source_path = System.Environment.GetCommandLineArgs()[i+1]
        elif x == "-t": # target
            target_path = System.Environment.GetCommandLineArgs()[i+1]
        elif x == "-c": # Copy source to target
            copy_source = True
        elif x == "-h" or x == "--help":
            help=True


    e_length = len(System.Environment.GetCommandLineArgs())
    if help or System.Environment.GetCommandLineArgs()[e_length-1] == "check-filename-length.py":
        print help_msg
        System.Environment.Exit(0)

    print "source path:",source_path
    print "target path:",target_path
    
    if copy_source:
        CopyFilesRecursively(System.IO.DirectoryInfo(source_path), System.IO.DirectoryInfo(target_path))
    else:
        if source_path != "":
            CheckFilesRecursively(System.IO.DirectoryInfo(source_path))
        if target_path != "":
            CheckFilesRecursively(System.IO.DirectoryInfo(target_path))