Log in

View Full Version : MPEG4 Modifier Command Line Version (Updated 2007-Jan-13)


Pages : 1 [2]

jarr_d
2nd January 2011, 05:51
much thanks for the help

However, I get "%%I was unexpected at this time."

Running Win7 64-bit if that helps...

And it can write back to the exact same file - that's fine!

jarr_d
3rd January 2011, 21:53
aha

from command line use
FOR %I IN (*.avi) DO mmcl.exe --par 43ntsc "%I" "%I~n.avi"

from batch file use the double %%'s

much thanks,

jarr_d
3rd January 2011, 22:24
to change Display Aspect ratio use:

FOR %I IN (*.avi) DO mmcl.exe --dar custom 4:3 "%I" "%I.avi"

this will give you files with .avi.avi extensions

Aarone
29th January 2011, 20:48
Requires .NET Framework 2.0 or a recent version of Mono (http://www.mono-project.com/) (with the latter it should run fine in Linux, OS X, etc).

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).

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


Download: MPEG4 Modifier CL (http://www.moitah.net/download/latest/MPEG4ModifierCL.zip) 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.

I just want to thank you for sharing this and will try it as soon as possible.

Thanks
Aarone

_ck_
2nd July 2011, 06:57
Not sure if you are still working on this (and thanks for such a great tool)

two requests:

fourcc change support ie. --fourcc XVID and --fourcc-hint XVID (there seems to be a descriptor field)

and user data support like in the gui --user-data "Xvid0063"

fourcc support would be a biggie because I do not believe there is any other batch tool that can do bulk 4cc changes, only the old avicc gui tool one-at-a-time

- I have a modern standalone player that refuses to play media with DX50 code, probably for DIVX licensing reasons, but change it to XVID and bingo, same media works fine - same thing for weird user data for reasons I don't understand, probably bad coding on their part

Thingy
21st July 2011, 15:43
Here is another batch script that let's you drop one or multiple files onto an unpack.bat file in windows 7, not tested on other platforms.
Then they will be placed in E:\ as for this script, you can change that path to fit your needs...

@ECHO OFF
ECHO mmcl unpacker

:Loop
IF "%~1"=="" GOTO Endloop
ECHO Unpacking: %~n1
D:\Downloads\mmcl.exe --unpack "%~f1" "e:\%~n1%~x1"
SHIFT
GOTO Loop
:Endloop
PAUSE

nbarzgar
6th June 2012, 10:44
Thanks for a great tool!
I'd like to batch change the DAR of a number of .avi-files to 1.5.

Using the GUI I set DAR Custom to 3:2 and MediaInfo afterwards shows "1.500" as aspect ratio, which is exactly what I am aiming at.
Now what would I enter in the bat-file as par-value?
Entering '--par custom 3:2' results in "2.000" as aspect ratio.

So what should I do?
Thanks in advance for any help!

b66pak
6th June 2012, 14:16
9:8
_

nbarzgar
6th June 2012, 18:19
Thanks for the fast reply! Worked like a charm!
How would I calculate that...? Perhaps you know a place, were it's already explained, something I overlooked? Would be great.
:thanks:

ckeays
6th June 2012, 20:11
Great little program! Thank you !!!!!

I am trying to use the command line version to change the display AR to 16:9. (I have used the GUI to do this many times, but only one file at a time)

here is my bat file:
@ECHO OFF
md unpack
FOR %%I IN (*.avi) DO mmcl.exe --dar 169ntsc "%%~fI" "%%~dpIunpack\%%~nxI"
pause

doesn't work as the GUI does. (after using the GUI, media info shows the correct 16:9, the command line version shows 4.103)

anyone help?

EDIT:

Ok I got it now using this cmd in win XP:
@ECHO OFF
md unpack
FOR %%I IN (*.avi) DO mmcl.exe --dar custom 16:9 "%%~fI" "%%~dpIunpack\%%~nxI"
pause

thanks again for a great program!