VideoHelp Forum




+ Reply to Thread
Results 1 to 12 of 12
  1. Member
    Join Date
    Dec 2003
    Location
    United States
    Search Comp PM
    I've been lurking in the background here for a few years now taking in a lot of useful information. I thought it might be time to give a little back.

    I play a lot of AVI files on my home DVD player, and one problem I've encountered is a jerkiness in some videos that is especially noticeable in panning shots. I found the solution (probably from this forum) to be to unpack the bitstreams in the video, which could be done relatively quickly using the command line program called Mpeg4Modifier. I finally got sick of using the command line and decided to brush up on my applescript to streamline the process. To make a long story short, I caught the programming bug and ended up putting together an applescript studio application (Batch Unpacker with an icon even) that in essence is a GUI front end for the unpack bitstreams command of Mpeg4Modifier. Now, if I download a number of AVI's from the web, I just drop them on Batch Unpacker before I play them on my DVD player and jerky videos are a thing of the past.

    If you're interested, here is a link to the file: http://www.geocities.com/emmgunn@pacbell.net/apps/batchunpacker.sit

    I've only tested it on a few computers using Mac OS X 10.4 but it should work on 10.2 and higher. Then again, I'm not Joe Programmer, so, though I doubt it'll trash your system, your mileage may vary. Let me know how it goes.

    Note, if you've never used Mpeg4Modifier on a Mac, you'll need to download and install the stable version of the Mono framework from here: http://www.mono-project.com/Downloads. The details are in the read me file.

    I hope you find this application helpful. Let me know if you have any questions or comments.
    Quote Quote  
  2. Member
    Join Date
    Mar 2007
    Location
    France
    Search Comp PM
    I just registered here to say thanks for this!

    I stumbled across it while searching for info on how to do this myself, I too got tired of using the command line to unpack files for my KiSS player - this is just the ticket.

    Thanks very much!

    glypht
    Quote Quote  
  3. Member
    Join Date
    Jun 2003
    Location
    United States
    Search Comp PM
    Thanks very much. I'll try it when I encounter the issue.
    Quote Quote  
  4. do you also have to install the Mpeg4Modifier, or just the mono framework? thanks.
    Quote Quote  
  5. Originally Posted by redrocklobster
    do you also have to install the Mpeg4Modifier, or just the mono framework? thanks.
    You have to install the mono framework first : there is nothing special to do, just double-click the standard Mac OS X installation package in the Disk Image and follow instructions.
    Then you can download mpeg4modifier and put it anywhere on your hard drive. Note that the binary file looks like a windows executable as it is named "mmcl.exe".

    Usage :
    - open a terminal window
    - type "mono " (don't forget the space)
    - drag and drop mmlcl.exe on this window (a space is automatically added at the end)
    - type "--info " which is the command to obtain informations about a file (don't forget the space)
    - drag and drop the movie file you want informations about
    - hit the return key

    Thi should like this if mpeg4modifier is in the Appplications folder, and the movie is on your desktop
    Code:
    mono /Applications/mmcl.exe --info /Users/jpschuck/Desktop/movie.mp4
    Note that avidemux has a nice GUI and can also give you advanced informations such as qpel, frame packing and GMC. Though mpeg4modifier is still useful if you want to modify the screen aspect ratio.
    Quote Quote  
  6. thanks for this -- looks easy enough. however you neglected to mention you need X11 installed also it seems for both mpegmodifier and avidemux. (edit: whoops, sorry, you did mention that in the other thread from which I pointed fair readers here.)

    i tried avidemux with x11 and it opens and works but i have no idea how to just get the basic video info. (also note that the mac download is not obvious: it's listed as PPC with a .dmg extension but not as Mac). (edit: i see the basic info can be seen using the wrench/tool icon now)

    i tried the method you explain here for mpegmodifier, and even with x11 already running, i get this error:

    Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.XplatUI ---> System.ArgumentNullException: Could not open display (X-Server required. Check you DISPLAY environment variable)

    The command I actually typed was:

    mono /Binaries/Video/MPEG4Modifier.exe --info /Volumes/Rakus/Caches/Encoded/old/Divine.avi

    Note that the binary was actually named "MPEG4Modifier.exe" and not "mmlc.exe" from the link you provided. Renaming it did the same thing.
    Quote Quote  
  7. Originally Posted by redrocklobster
    thanks for this -- looks easy enough. however you neglected to mention you need X11 installed also it seems for both mpegmodifier and avidemux. (edit: whoops, sorry, you did mention that in the other thread from which I pointed fair readers here.)

    i tried avidemux with x11 and it opens and works but i have no idea how to just get the basic video info. (also note that the mac download is not obvious: it's listed as PPC with a .dmg extension but not as Mac). (edit: i see the basic info can be seen using the wrench/tool icon now)
    You can also just go in the menu bar (the one in avidemux, not the one in the Finder) and use the command "File">"Properties" ; or type ALT+Return.

    i tried the method you explain here for mpegmodifier, and even with x11 already running, i get this error:
    X11 is not needed for mpeg4modifier.

    Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.XplatUI ---> System.ArgumentNullException: Could not open display (X-Server required. Check you DISPLAY environment variable)

    The command I actually typed was:

    mono /Binaries/Video/MPEG4Modifier.exe --info /Volumes/Rakus/Caches/Encoded/old/Divine.avi

    Note that the binary was actually named "MPEG4Modifier.exe" and not "mmlc.exe" from the link you provided. Renaming it did the same thing.
    I didn't include any link in my post (actually I thought you already had downloaded mpeg4modifier), this is a feature of the forum that automatically add a so-called-appropriate link to any program name.
    So I assume that this link took you to the mpeg4modifier main page where almost every link gets you to the GUI version (hence the mpeg4modifier.exe name) which is Windows only. You have to download the command line interface version here, this is the only version working with Mono :
    http://www.moitah.net/download/latest/MPEG4ModifierCL.zip
    Quote Quote  
  8. Ok, thanks for your patience. I now downloaded the CL version you mentioned. I got an error message with the precompiled version, and also the same message when I tried compiling it:

    G5-Dual:/Binaries/Video/MPEG4ModifierCL rrl$ mono /Binaries/Video/mmlc.exe --info /Volumes/Rakus/Caches/Encoded/old/Divine.avi
    Cannot open assembly /Binaries/Video/mmlc.exe.
    G5-Dual:/Binaries/Video/MPEG4ModifierCL rrl$ cd /Binaries/Video/
    G5-Dual:/Binaries/Video rrl$ gmcs -out:mmcl.exe -unsafe Main.cs General.cs AVIFile.cs AVIModifier.cs MPEG4FrameModifier.cs
    G5-Dual:/Binaries/Video rrl$ mono /Binaries/Video/mmlc.exe --info /Volumes/Rakus/Caches/Encoded/old/Divine.avi
    Cannot open assembly /Binaries/Video/mmlc.exe.
    G5-Dual:/Binaries/Video rrl$ ls -l
    total 496
    -rwxr-xr-x 1 rrl admin 37708 Jan 13 18:10 AVIFile.cs
    -rwxr-xr-x 1 rrl admin 6535 Jan 13 18:10 AVIModifier.cs
    -rwxr-xr-x 1 rrl admin 18349 Jan 11 2004 GPL.txt
    -rwxr-xr-x 1 rrl admin 8320 Jan 13 18:10 General.cs
    -rwxr-xr-x 1 rrl admin 95 Oct 27 01:35 HowToCompile.txt
    -rwxr-xr-x 1 rrl admin 37339 Jan 13 18:10 MPEG4FrameModifier.cs
    drwxr-xr-x 2 rrl admin 68 Mar 21 19:07 MPEG4ModifierCL
    -rwxr-xr-x 1 rrl admin 8931 Jan 13 18:45 Main.cs
    -rwxr-xr-x 1 rrl admin 51712 Mar 21 19:08 mmcl.exe
    -rwxr-xr-x 1 rrl wheel 13780 Mar 21 19:02 mpeg4_info.app
    G5-Dual:/Binaries/Video rrl$
    Quote Quote  
  9. Originally Posted by redrocklobster
    Ok, thanks for your patience. I now downloaded the CL version you mentioned. I got an error message with the precompiled version, and also the same message when I tried compiling it:
    [...]
    Sorry, I'm a tee-totaler when it comes to compilation.

    What do you get if you just type "mono" under the terminal and hit the return key ?
    Same question if you type "mono /Binaries/Video/mmlc.exe" then return ?
    Quote Quote  
  10. mono works as you expect, giving usage info.

    mono /Binaries/Video/mmlc.exe

    gives the same error as before:

    Cannot open assembly /Binaries/Video/mmlc.exe.
    Quote Quote  
  11. Member
    Join Date
    Mar 2007
    Location
    United States
    Search Comp PM
    Originally Posted by redrocklobster
    do you also have to install the Mpeg4Modifier, or just the mono framework? thanks.
    Just to clarify - if you want to use Batch Unpacker, you do not need to install mpeg4modifier. It's a resource within the Batch Unpacker package. Note that, currently, Batch Unpacker does only one thing - check for, and if necessary unpack bitstreams on video files dragged to the application. If you want to access the other functionality of mpeg4modifier, like getting info about a file, then you do have to use the command line. If interested, the newest version of Batch Unpacker can now be found at http://emmgunn.awardspace.com/ .

    You could try to run Batch Unpacker to see if the mpeg4modifier contained in it's package (mmcl.exe) will work for you. That might help you track down your problem. Also, I seem to remember there being both a ppc and a universal binary version of mono. Maybe, for whatever reason, the version you installed doesn't like mpeg4modifier and/or your system. Perhaps the other version would work better for you.
    Quote Quote  
  12. ok... I'm not sure what I did exactly but I got it to work. I think doing this might have helped:

    mono --aot mmcl.exe

    which mono says: "Compiles the assembly to native code"

    But not sure there.

    Now then, seeing as I got it to work, I made a drag & drop applescript, which should work if either:

    a) you have installed mono and also batch unpacker (which has the mmcl.exe binary in the package)
    or
    b) you have installed mono and can specify the mmcl.exe path in the script properties

    Copy & paste this into script editor and save as application:

    Code:
    (*
    mpeg4_info
    by redrocklobster, 03/2007
    depends on installation of:
    mono
    ftp://www.go-mono.com/archive/1.2.3/macos-10-universal/1/MonoFramework-1.2.3_1.macos10....universal.dmg
    -- AND --
    Mpeg4Modifier (CL) 
    http://www.moitah.net/download/latest/MPEG4ModifierCL.zip
    -- or -- 
    batch unpacker
    http://emmgunn.awardspace.com/batchunpacker.html
    (which contains Mpeg4Modifier)
    *)
    
    --use default if Batch Unpacker is already installed, which has the mmcl.exe binary
    property use_batch_unpacker_binary : true
    -- otherwise specify your own hard path
    property mpeg4modpath : "/Binaries/Video/mmcl.exe"
    
    on run
    	display dialog "Please drop a video file onto the icon"
    end run
    on open thefile
    	if use_batch_unpacker_binary then
    		set bu to POSIX path of (path to application "Batch Unpacker")
    		set mm to quoted form of (bu & "Contents/Resources/mmcl.exe")
    	else
    		set mm to quoted form of mpeg4modpath
    	end if
    	display dialog "Inspecting file, please wait..." giving up after 2
    	set p to quoted form of POSIX path of thefile
    	set r to do shell script "mono " & mm & " --info " & p
    	set output to ""
    	set copyflag to false
    	repeat with apar in (every paragraph of r)
    		if apar contains "--" and apar does not contain "Video Info" then set copyflag to false
    		if copyflag then set output to output & apar & return
    		if apar contains "Video Info" then set copyflag to true
    	end repeat
    	
    	set theanswer to button returned of (display dialog output buttons {"OK", "Clipboard"} default button "Clipboard")
    	if theanswer is "Clipboard" then set the clipboard to output
    end open
    Ultimately, perhaps you want to expand "Batch Uncoder" to be a more full fledged GUI for MPEG4Modifier. It seems it wouldn't be too hard to do with AS Studio. You're welcome of course to use this info code. Thanks!

    on an side note, this mokgvm2dvd app looks useful, but the following web page does not display correctly in Safari and I had to go to the page source to get the URL.

    http://emmgunn.awardspace.com/mokgvm2dvd.html

    Thanks.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!