View Full Version : Tool to unpack MPEG4 ASP AVIs
Moitah
2nd January 2005, 01:05
UPDATE: This has been replaced by MPEG4 Modifier CL (http://forum.doom9.org/showthread.php?t=117553)
I made a command line tool based on MPEG4 Modifier to remove packed bitstream from MPEG4 ASP AVIs (i.e. XviD, DivX). It is written in C#, but it compiles and runs fine with Mono (http://www.mono-project.com/). A few people have tested it in Linux, with no problems reported (it will run in other OSes as long as you have Mono, even big endian systems such as Mac).
Usage should look something like:
mono UnpackCL.exe [-i] source_file [dest_file]
You may omit dest_file just to see whether or not packed bitstream was used (you don't have to check before unpacking, though, if the video isn't packed it will simply stop after this is determined). Use the '-i' switch for detailed info about the video.
Download: v1.2.1 (Binary and Source) (http://www.moitah.net/download/latest/UnpackCL.zip)
thop
5th January 2005, 03:20
Thanks, works great in linux. You have to install 58MB additional stuff to make it run, but it's worth it :)
albertgasset
5th January 2005, 19:52
It works well with Mono 1.0 in Debian, great work!
I've also tried with DotGNU Portable.NET (http://www.dotgnu.org/pnet.html) 0.6.10 (1/3 the size of Mono). The source compiles fine but I get an "index of string is out of range" error when running the program:
$ ilrun UnpackCL.exe ss.avi
UnpackCL v1.0.0 by Moitah
Based on MPEG4 Modifier v1.3.0
http://www.moitah.net/
Error: L'índex de la cadena està fora del rang
I'm not sure, but I suppose it's fault of DotGNU.
Moitah
6th January 2005, 02:16
@albertgasset: I just tested with cscc and ilrun (DotGNU Portable.NET 0.6.10) in Windows, seems to compile/run here. Is that the same AVI you used to test while running with Mono?
albertgasset
6th January 2005, 13:42
Originally posted by Moitah
@albertgasset: I just tested with cscc and ilrun (DotGNU Portable.NET 0.6.10) in Windows, seems to compile/run here. Is that the same AVI you used to test while running with Mono?
Yes. I've also tried packed and unpacked MPEG4, and even non-MPEG4 AVIs, and it always gives the same error; these files work as expected with MONO. The error message appears before starting the loading of the AVI file, so I think it has nothing to do with the file used.
I am using the irlun binary from Debian, I'll compile it myself and I'll let you know how it works.
albertgasset
7th January 2005, 13:43
I'll compile it myself and I'll let you know how it works.
Same error.
Pulver
6th March 2005, 11:38
Thanks for this great tool!
It works perfect on my Mandrake-machine.
Any plans to include some features from the GUI (Windows) version ?
I would love to see some information about the file, such as Qpel, GMC etc.
Am I right when I assume that it is impossible to get the GUI version to work under Linux (with mono and gtk-sharp) ?
Moitah
7th March 2005, 13:51
Originally posted by Pulver
Thanks for this great tool!
It works perfect on my Mandrake-machine.
Any plans to include some features from the GUI (Windows) version ?
I would love to see some information about the file, such as Qpel, GMC etc.
Am I right when I assume that it is impossible to get the GUI version to work under Linux (with mono and gtk-sharp) ?
You're welcome.
I didn't plan on adding more features to the command line version. The GUI version may run in Mono soon, as they are working on their WinForms support. Of course the GUI wouldn't run as-is with GTK#, but I suppose someone could rewrite the GUI.
karellen
7th March 2005, 14:16
Many thanks.
Just switched to mac OS X and was plodding along using Virtual PC to run MPEG4Modifier - took a lifetime.
Installed the command line tool, got it running first time without any problems - saved my life!
Moitah
7th March 2005, 14:48
Originally posted by karellen
Many thanks.
Just switched to mac OS X and was plodding along using Virtual PC to run MPEG4Modifier - took a lifetime.
Installed the command line tool, got it running first time without any problems - saved my life!
Mac is big endian, right? Have you checked to make sure the output works okay?
karellen
7th March 2005, 16:25
Just watched a corrected xvid on my xvid dvd player and it worked fine - the only minor issue was that it wouldn't fast-forward.
Moitah
8th March 2005, 00:41
@karellen: Could you run this command line program (http://www.moitah.net/EndianTestCL.zip) in Mono on OS X, please? It's a little program I just wrote to test the behavior of BitConverter/BinaryReader/BinaryWriter on big endian systems. Please paste the output in this thread, and you may delete the "endiantest.bin" file it creates. Thank you.
EDIT: I looked at Mono's source code, it looks like BinaryReader/BinaryWriter are always Little Endian, but BitConverter depends on your system. This could be why you are unable to fast-forward, as the code to update the AVI index uses BitConverter. I would still like to see the output from the program above, if you don't mind.
karellen
8th March 2005, 07:47
Here you go -
Powerbook-G4:~ james$ mono endiantestcl.exe
BitConverter.IsLittleEndian: False
BitConverter.GetBytes: Big Endian
BitConverter.ToUInt32: Big Endian
BinaryWriter.Write: Little Endian
BinaryReader.ReadUInt32: Little Endian
Moitah
8th March 2005, 15:15
Thanks,
This means the output file will have an invalid index. I will fix this soon.
Moitah
8th March 2005, 20:26
@karellen: I put up a new version of UnpackCL. Next time you try it, please let me know if fast-forwarding works. Thanks.
tvdpoll
10th March 2005, 23:16
Works fine with win2k. Thx for this nice tool!
karellen
11th March 2005, 00:10
Originally posted by Moitah
@karellen: I put up a new version of UnpackCL. Next time you try it, please let me know if fast-forwarding works. Thanks.
Just tested and fast-forwarding is now working.
Thank you, you are a true gentleman. :D
Moitah
11th March 2005, 01:10
Originally posted by karellen
Just tested and fast-forwarding is now working.
Thank you, you are a true gentleman. :D
No problem. I'm glad it works now :).
Infirmus
14th March 2005, 09:39
Any posibility of adding a display of how many consec B-VOP's there are?
Tah.
Moitah
14th March 2005, 16:05
Well, it should be pretty easy to add the "Video Info" feature, I'll do it tonight if I get a chance.
Pulver
15th March 2005, 18:53
Sounds great - the 'Video Info' function is one of the few things that is missing in my Linuxmachine (still using Windows to check that).
I would be really happy to see that function :)
Moitah
16th March 2005, 07:43
I have uploaded version 1.1.0, see first post for download link. I actually finished it last night but I was too tired to upload it :). Enjoy...
Pulver
16th March 2005, 10:22
Great! - works perfectly!
Now my Linuxmachine is 'complete' ;)
Thanks again.
Infirmus
26th March 2005, 07:39
THankz heaps! Nice work Moitah.
kawayama
26th March 2005, 15:54
thanks, it works great with mac OS X 10.3.8.
i'm a total newbie with the command line/the terminal, so i was wondering if there is a way to process several files - a batch tool?
ideally, it would work something like this: "take each relevant file in Folder A, unpack and save in Folder B"
that would be so useful.
edit: found the answer. use this line of code:
for i in `ls`; do mono UnpackCL.exe $i converted_$i; done
(after changing the directory to a folder with files you want to unpack. also put in the whole address to UnpackCL, usually /Applications/UnpackCL/UnpackCL.exe )
m99
27th March 2005, 20:32
Is there any other Windows-program to remove packed bitstream for those that don't have .NET installed?
Sorry, didn't notice that this was a Linux-forum.
filledin
18th April 2005, 05:42
Thanks for the great tool! Works like a charm on SUSE 9.2!
You saved me a great deal of trouble.
Oedipax
25th July 2005, 04:01
Working well here on Mac OSX 10.4.2. Thanks for writing this tool. Will you be supporting OpenDML anytime soon? That's the one thing I miss, as some of the files I get have this still.
scarer
5th September 2005, 18:23
Hi there, I am on OS x 10.3.9 and a bit lost on this one.......
Apologies beforehand but i have never attempted anything like this before and I kind of need my hand holding through this whole process!
I have installed mono and downloaded UnpackCL Folder to my Desktop. I'm presuming that I open Terminal and start typing in commands but what do I type exactly? I'm not sure how to get Terminal to navigate to the file I want to unpack which is currently on my Desktop. The destination file would be a folder on my desktop called "Unpacked"
You guys are way ahead on this one, can anyone guide me through this process so I can upack avi's to wach on my divx player?
Regards
S.
scarer
7th September 2005, 19:21
This is what I get when I try;
"cannot open assembly UnpackCL.exe"
This is after I type "mono UnpackCL.exe" in terminal.
Do I need to download something else other than Mono to make it work?
Cheers
scarer
7th September 2005, 19:39
I think I'm typing it wrong........would really appreciate help.
Thanks
anaxamander
8th September 2005, 01:48
open a Terminal.app window. type "mono" and a space. Switch to the finder and drag-n-drop the UnpackCL.exe on the Terminal.app window. You do this because the UnpackCL.exe program is not in your $PATH (type echo $PATH) where programs are automatically discovered. After that drag-n-drop your avi file on the Terminal.app window. Switch back to Terminal.app and hit the return key. Like:
mono /Users/aUser/Desktop/UnpackCL/UnpackCL.exe /Users/aUser/Desktop/Some.avi
UnpackCL v1.1.0 by Moitah
Based on MPEG4 Modifier v1.3.2
http://www.moitah.net/
Loading: 100.0%
Packed bitstream: No
scarer
8th September 2005, 09:47
Thait's great, thank you. I'll give it a try :D
scarer
8th September 2005, 09:51
That works! Thanks a lot. I didn't know about the whole drag and drop thing
Cheers
scarer
8th September 2005, 19:52
The next stage is having the program unpack the avi for me, and I've tried dragging and dropping my destination file into terminal after all of the above which is simply a folder on my desktop called "Unpacked" but I get "Error: Access to the path '/Users/me/Desktop/Unpacked' is denied.'
I've checked the info on the folder and it is set for read and write, I've tried a different folder i.e my movies folder but get the same error.
Any suggestions??
Thanks in advance
S. :confused:
scarer
8th September 2005, 20:02
Maybe it wants my system password? If so, what's the command line for that, and does it go before the dest file?
Cheers
scarer
8th September 2005, 22:18
Is it something to do with the sudo command? Or am I completely barking up the wrong tree.
S.
anaxamander
8th September 2005, 23:08
move the exe onto the desktop (surely you must have sufficient permissions to access that). Then do:
mono ~/Desktop/UnpackCL.exe /path/to/some.avi
and some.avi must be on writeable media (meaning not on CD, but on your hard drive). It really isn't this difficult, I don't know what happened.
Do your permissions of the exe match this pattern of rw-x's with "ls -Al ~/Desktop/UnpackCL.exe"?
-rwxr-xr-x 1 aUser aUser 29696 Mar 16 00:37 /Users/aUser/Desktop/UnpackCL.exe
You did install mono too, right?
And [dest_file] is not a folder, but is the specific filepath (with that exact name you want - you can rename it to whatever you want after unpacking).
mone UnpackCL.exe -i /path/to/some/INPUT.avi ~/Desktop/OUTPUT.avi
scarer
9th September 2005, 00:02
Thanks, it works now.
It looks like I was doing everything correct up to the output destination. I just wasn't including the original avi filename at the end of the command.
Its working great!
Many Thanks.
S.
intellimoo
19th September 2005, 23:00
Here is a handy GUI shell I made for using UnpackCL on Windows. Makes it easy to process avi's individually, in a selected group, in multiple folders, and even by right-clicking in Windows Explorer. I hope folks find it useful. :)
The very latest download is from:
http://home.comcast.net/~scree/public/UnpackCL.Shell.zip
robertastbury
24th September 2005, 19:48
i would like to try out this file :>
intellimoo
3rd October 2005, 07:36
Updated message with download now. :)
robertastbury
3rd October 2005, 17:31
Thank you ever so much intellimoo, i found i can unpck an entire folder on my harddrive containing over 200 files, so they can all work on my stand alone DivX player.
also when it unpacks a file it overwrites the existing file, meaning you dont need to spare lots of free space to make duplicates. :>
a great GUI based program for n00b's like me :P Thanks again, i will be donating.
you're a Star!
Many Regards
Robert Astbury
intellimoo
4th October 2005, 02:53
Very welcome, and thanks much!
Moitah
12th December 2005, 19:58
UnpackCL 1.1.1 released, based on MPEG4 Modifier 1.3.3.
Moitah
15th December 2005, 04:29
UnpackCL 1.1.2 released, based on MPEG4 Modifier 1.3.4.
ReinerSchweinlin
18th April 2006, 20:01
Thanx for these great tools!!
Moitah
5th August 2006, 04:58
UnpackCL 1.2.0 released, based on MPEG4 Modifier 1.4.1. Requires .NET Framework 2.0 or Mono with support for C# 2.0 features (since Mono 1.1.10, I think).
This adds support for OpenDML AVIs, and should run much faster because of some optimizations.
I tried to make sure that the new AVIReader/AVIWriter classes would function on big endian systems, but I don't have any way to test it. If someone on a non-Intel Mac tries the new version, please tell me if it runs (and if the output file plays :)).
Oedipax
5th August 2006, 05:53
Just tried it on my PowerPC iMac. I had to upgrade Mono but after that everything works fine, and the file came out okay. It's a lot faster, too! Thanks for the great tool.
intellimoo
25th August 2006, 09:04
I updated UnpackCL Shell to support UnpackCL 1.2.0, also with an option to continue using the old UnpackCL 1.1.2 if you absolutely refuse to install .net 2.0 (noone would blame you). :p But I recommend it now, as 1.2.0 is substantially faster! :o
Latest Download:
ftp://64.34.164.24:2122/public/UnpackCL%20Shell.zip
Cheers!
(Seinfeld!)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.