Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Linux, Mac OS X, & Co

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th October 2006, 08:04   #1  |  Link
Moitah
Registered User
 
Join Date: Feb 2004
Location: Virginia, USA
Posts: 334
MPEG4 Modifier Command Line Version (Updated 2007-Jan-13)

Requires .NET Framework 2.0 or a recent version of Mono (with the latter it should run fine in Linux, OS X, etc).

Code:
Arguments: [switches] source_path [dest_path]
  dest_path is only optional with --info or --frame-list

Switches:
  --unpack             Remove packed bitstream.
  --pack               Add packed bitstream.
  --par <val>          Set the pixel aspect ratio, <val> is:
                         square - Square Pixel Shape
                         43pal - 4:3 PAL Pixel Shape
                         43ntsc - 4:3 NTSC Pixel Shape
                         169pal - 16:9 PAL Pixel Shape
                         169ntsc - 16:9 NTSC Pixel Shape
                         custom <width:height> - Custom Pixel Shape
  --field-order <val>  Change the interlaced field order, <val> is:
                         tff - Top Field First
                         bff - Bottom Field First
  --info               Display detailed information about the video.
  --frame-list <path>  Write a text file containing each frame's type,
                       timestamp, and size to the location specified.
  --always-write       Write a new file even if the video format isn't being
                       changed (useful for converting OpenDML AVIs < 2GB to
                       standard AVIs).
It has return values to aid scripting:
  • 0 = Everything was successful.
  • 1 = Some type of error (invalid arguments, couldn't open file, file was corrupt, etc).
  • 2 = Aborted because output file was already in the desired format (e.g. --unpack was used on a file that didn't have packed bitstream).

Example usage: mono mmcl.exe --unpack /home/jdp/Desktop/test.avi /home/jdp/Desktop/test-new.avi


.bat file for batch unpacking in Windows. Paste this into Notepad, correct the path to mmcl.exe, and save it as a .bat file in the same folder as your AVI files. Open the folder in Explorer and double-click the .bat file. The unpacked AVIs will be written in a new folder (only the ones that needed to be unpacked).

Code:
@ECHO OFF
md unpack
FOR %%I IN (*.avi) DO "C:\Program Files\MPEG4 Modifier\mmcl.exe" --unpack "%%~fI" "%%~dpIunpack\%%~nxI"

Download: MPEG4 Modifier CL v1.4.4 (Binary and Source)

Update: It's now possible to run MPEG4 Modifier GUI version in Mono since Mono 1.2.3 was released.
__________________
moitah.net

Last edited by Moitah; 13th February 2007 at 14:03.
Moitah is offline   Reply With Quote
Old 27th October 2006, 09:14   #2  |  Link
mod
keep manzo
 
mod's Avatar
 
Join Date: Sep 2005
Location: Florence, IT
Posts: 528
Thanks a lot. I'm going to try it this weekend
__________________
10 categories of persons exist : those who know the binary system and those who do not know it
mod is offline   Reply With Quote
Old 2nd November 2006, 15:26   #3  |  Link
int10h
Registered User
 
Join Date: Aug 2006
Location: France
Posts: 49
Works fine, thank you !

Debian users should install the libmono-system2.0-cil manually to get it work.
int10h is offline   Reply With Quote
Old 4th November 2006, 18:32   #4  |  Link
p4t0z3u
Registered User
 
Join Date: May 2003
Location: France
Posts: 17
Works fine for me on Mac OS X.4.8, as usual !

Using Mono 1.1.18_0 for PPC
__________________
Sic gorgiamus allos subjectos nunc
p4t0z3u is offline   Reply With Quote
Old 6th November 2006, 07:51   #5  |  Link
Moitah
Registered User
 
Join Date: Feb 2004
Location: Virginia, USA
Posts: 334
Released version 1.4.3. Fixes a bug that can cause synch problems with some (rare) files, adds the ability to pack files containing drop frames, and removes the --user-data switch (it's shown in the --info text now).
__________________
moitah.net
Moitah is offline   Reply With Quote
Old 11th November 2006, 05:50   #6  |  Link
Moitah
Registered User
 
Join Date: Feb 2004
Location: Virginia, USA
Posts: 334
I figured out that there's only one thing keeping MPEG4 Modifier 1.4.3 from running on Mono, it's the "Shown" event added in WinForms 2.0. I worked around this and made a compile that runs mostly fine in Mono. Screenshot of MPEG4 Modifier 1.4.3 running on Mono 1.2 in Ubuntu:



Opening a file via the file dialog didn't work so well, it seems the file type filtering is broken and it doesn't show any files at all, but you can navigate to the folder and type in the filename manually. Or don't use the file dialog at all, just drag your file onto the "AVI Source" textbox.

It's here if anyone wants to try it.

EDIT: Compiled a new version, increased the size of some controls to fix the text being cut off.

EDIT2: I think the file dialog issue is fixed in Mono SVN as of 2006-11-17, the file dialog filtering should be fine in the next Mono release.
__________________
moitah.net

Last edited by Moitah; 18th November 2006 at 00:12.
Moitah is offline   Reply With Quote
Old 14th November 2006, 01:53   #7  |  Link
plugh
A hollow voice says
 
Join Date: Sep 2006
Posts: 269
Just tried the CL tool out.

Is there is a way to get the "frame list"?
If not, feature request: "--list filename" option

Also, would it be possible to include frame size in the output? (I'm trying to track down an encoding problem, and frame size would be very helpful)

Thanks!

Last edited by plugh; 14th November 2006 at 02:02.
plugh is offline   Reply With Quote
Old 14th November 2006, 03:16   #8  |  Link
Moitah
Registered User
 
Join Date: Feb 2004
Location: Virginia, USA
Posts: 334
@plugh: Done. The byte size written in the list refers to the size of the VOP plus any headers that go with it (there should only be headers before I-VOPs, such as the VOL and user data). For videos with packed bitstream, if you want to know the size of a packed frame, just add up the size of both VOPs contained in that frame.
__________________
moitah.net
Moitah is offline   Reply With Quote
Old 14th November 2006, 06:37   #9  |  Link
plugh
A hollow voice says
 
Join Date: Sep 2006
Posts: 269
Wow you're fast! I was about to edit my earlier post and ask for quant as well, if available (would be additional support for my xvid bug inquiry), but size should be enough...

thanks!
plugh is offline   Reply With Quote
Old 14th November 2006, 07:03   #10  |  Link
Moitah
Registered User
 
Join Date: Feb 2004
Location: Virginia, USA
Posts: 334
Per-frame quant info would be useful, I might look into it.
__________________
moitah.net
Moitah is offline   Reply With Quote
Old 14th November 2006, 07:09   #11  |  Link
Moitah
Registered User
 
Join Date: Feb 2004
Location: Virginia, USA
Posts: 334
Reuploaded to fix something I forgot to change in the usage text.
__________________
moitah.net
Moitah is offline   Reply With Quote
Old 14th November 2006, 19:45   #12  |  Link
plugh
A hollow voice says
 
Join Date: Sep 2006
Posts: 269
Thanks again - it did/showed exactly what I needed.
plugh is offline   Reply With Quote
Old 21st November 2006, 13:03   #13  |  Link
likeatim
Registered User
 
Join Date: May 2004
Posts: 10
Hi, I tried to add this to the right click menu in Windows XP, but I'm not a real talent in this...
I tried this, but to no avail:
Anyone point me in the right direction?
Code:
Windows Registry Editor Version 5.00 

[HKEY_CLASSES_ROOT\Directory\shell\Mpeg4Unpack] 
@="Mpeg4 Unpack" 

[HKEY_CLASSES_ROOT\Directory\shell\Mpeg4Unpack\command] 
@="e:\\_standalone\\video\\mpeg4modifier\\mmcl.exe --unpack \"%1"\"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\Mpeg4Unpack] 
@="Mpeg4 Unpack" 

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\Mpeg4Unpack\command] 
@="e:\\_standalone\\video\\mpeg4modifier\\mmcl.exe --unpack \"%1"\"

[HKEY_CLASSES_ROOT\Drive\shell\Mpeg4Unpack] 
@="Mpeg4 Unpack" 

[HKEY_CLASSES_ROOT\Drive\shell\Mpeg4Unpack\command] 
@="e:\\_standalone\\video\\mpeg4modifier\\mmcl.exe --unpack \"%1"\"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Drive\shell\Mpeg4Unpack] 
@="Mpeg4 Unpack" 

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Drive\shell\Mpeg4Unpack\command] 
@="e:\\_standalone\\video\\mpeg4modifier\\mmcl.exe --
unpack \"%1"\"
I have to more suggestions:
  1. Add an option to search through subfolders - is that possible?
  2. Add an option to delete the original file once it has been repaired...

likeatim is offline   Reply With Quote
Old 24th November 2006, 10:28   #14  |  Link
Guepard58
Registered User
 
Join Date: Nov 2006
Posts: 2
hi,

Sorry for my english. I have a little prb with mp4Modifier and mono. Why when i select .avi file mp4m down? , drag'n'drop also. (Linux Mandriva 2007) , it is a librairie??? please help me if possible. thanks you
Guepard58 is offline   Reply With Quote
Old 24th November 2006, 12:24   #15  |  Link
Guepard58
Registered User
 
Join Date: Nov 2006
Posts: 2
Oups, sorry, bad librairy of gnome. It's ok . Very good job .ty

A++++

Guepard58 is offline   Reply With Quote
Old 14th January 2007, 00:52   #16  |  Link
Moitah
Registered User
 
Join Date: Feb 2004
Location: Virginia, USA
Posts: 334
1.4.4 released, fixes problem where DivX subtitles were broken after being run through MPEG4 Modifier.
__________________
moitah.net
Moitah is offline   Reply With Quote
Old 14th January 2007, 13:06   #17  |  Link
likeatim
Registered User
 
Join Date: May 2004
Posts: 10
is it also possible to change the video header with this command line tool like with the GUI-Version?
likeatim is offline   Reply With Quote
Old 18th January 2007, 08:09   #18  |  Link
likeatim
Registered User
 
Join Date: May 2004
Posts: 10
Quote:
Originally Posted by likeatim View Post
is it also possible to change the video header with this command line tool like with the GUI-Version?
I meant userdata, sorry.
likeatim is offline   Reply With Quote
Old 18th January 2007, 08:14   #19  |  Link
Moitah
Registered User
 
Join Date: Feb 2004
Location: Virginia, USA
Posts: 334
@likeatim: When unpacking or packing, the command line version updates the user data automatically. But there isn't any way right now to manually edit the user data.
__________________
moitah.net
Moitah is offline   Reply With Quote
Old 18th January 2007, 21:22   #20  |  Link
likeatim
Registered User
 
Join Date: May 2004
Posts: 10
Quote:
Originally Posted by Moitah View Post
@likeatim: When unpacking or packing, the command line version updates the user data automatically. But there isn't any way right now to manually edit the user data.
maybe you could make that an option?
cause for some weird reason, my standalone player plays everything (even packed bitstream) if the userdata is set to "DivX999b000p"

also, an option to delete or overwrite the original file would be tha bomb...

thanks for the great tool!
likeatim is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:02.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.