News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Has anyone ever edited a MobiClip video file?  (Read 7980 times)

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Has anyone ever edited a MobiClip video file?
« on: October 31, 2010, 06:07:14 am »
Yeah, I know, DS hacking is sort of a touchy subject here, and if the mods have any issue with this topic, feel free to smite it. Anyways.

I'm thinking of taking a look at a project that might possibly require me to edit video files - add subtitles, English-language credits, that sort of thing. Decode the .mods into a suitable format, tweak them as needed, then reencode. The nice thing is that MobiClip is a standardized format, so I imagine there's probably been some work done in this respect already. I've done my research, but I haven't turned up much. Anybody know if there's been any headway in reverse-engineering the format, or obtaining appropriate tools?
In the event of a firestorm, the salad bar will remain open.

KaioShin

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 5697
    • View Profile
    • The Romhacking Aerie
Re: Has anyone ever edited a MobiClip video file?
« Reply #1 on: October 31, 2010, 06:16:02 am »
Discussions on the board about DS hacking have always been ok  :-\
All my posts are merely personal opinions and not statements of fact, even if they are not explicitly prefixed by "In my opinion", "IMO", "I believe", or similar modifiers. By reading this disclaimer you agree to reply in spirit of these conditions.

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Has anyone ever edited a MobiClip video file?
« Reply #2 on: October 31, 2010, 06:24:29 am »
Right, right - it's hosting DS translation patches that we don't do here. Sorry, got my wires crossed.

It looks like I'm not exactly the first to ask about this subject: my Google search turned up an old topic asking the same question. He's posted it elsewhere as well, but it doesn't seem like he found any answers.

EDIT: And I realized I posted it under Translation Hacking instead of General Romhacking like a doofus. ^_^;
« Last Edit: October 31, 2010, 06:29:58 am by Ryusui »
In the event of a firestorm, the salad bar will remain open.

Rhys

  • Hero Member
  • *****
  • Posts: 706
    • View Profile
    • CN
Re: Has anyone ever edited a MobiClip video file?
« Reply #3 on: October 31, 2010, 06:32:42 am »
You could always do what Tales of Innocence did - use soft subs rendered over the top of the video, guessing it'd be a lot harder than re-encoding the video, but you would get a much higher quality result.

KaioShin

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 5697
    • View Profile
    • The Romhacking Aerie
Re: Has anyone ever edited a MobiClip video file?
« Reply #4 on: October 31, 2010, 09:32:04 am »
Harder is relative, I'd say patching a few images is much easier than reverse engineering a video codec ;)
All my posts are merely personal opinions and not statements of fact, even if they are not explicitly prefixed by "In my opinion", "IMO", "I believe", or similar modifiers. By reading this disclaimer you agree to reply in spirit of these conditions.

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Has anyone ever edited a MobiClip video file?
« Reply #5 on: October 31, 2010, 05:19:30 pm »
Well, I'll be sure to get in touch with them when (if?) I reach that stage in the project. :3

For the time being, assuming I do (or rather, have need to) continue, my first order of duty is tackling the file compression. I was a bit surprised to see the whole thing was only 64MB, but I suppose in retrospect that should've been a warning sign. Fortunately, it appears to use standard DS LZ compression, though I'll still need to suss out the other details of the file format.
In the event of a firestorm, the salad bar will remain open.

KC

  • Full Member
  • ***
  • Posts: 209
    • View Profile
Re: Has anyone ever edited a MobiClip video file?
« Reply #6 on: October 31, 2010, 06:35:45 pm »
The video format is probably relatively simple. The rather slow CPU doesn't allow for much, but it's a hell of a lot of messy code.
Changing the image at runtime is a much easier approach. The framerate is usually around 30fps, I think. 15 if there are videos on both screens. The game sets the hardware to display VRam as a raw 16bpp 256*192 bitmap. It alternates between two banks, so it creates a totally fresh image every frame. You just have to hook your own code right after it finished decompressing the current frame. It usually increases the frame counter right there too, so it's easy to spot.

Rhys

  • Hero Member
  • *****
  • Posts: 706
    • View Profile
    • CN
Re: Has anyone ever edited a MobiClip video file?
« Reply #7 on: October 31, 2010, 06:41:55 pm »
If the videos are both using the same codec I'm sure you could even reuse code from Tales of Innocence if you ask Kingcom nicely enough

Auryn

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Has anyone ever edited a MobiClip video file?
« Reply #8 on: November 07, 2010, 10:59:38 pm »
First of all i didn't tried and I'm not an expert on this matter but i was googleling around and found this things:
Maybe another format of video but who know, try it put:
http://www.bestshareware.net/videoguide/dpgconverter.htm

Another converter/player to try out "MAX DS Video Converter"
http://us.codejunkies.com/mpds/support.htm

Some technical information about Video formats of the ds demo send by the wii and MobiClip (i didn't read all):
http://code.google.com/p/wmb-asm/wiki/NintendoChannel

And maybe the solution to your problem, if that codec work for de- enconding, u can probably use it with VirtualDub to convert it to avi, with Subtitle Workshop (or by hand) create your .srt file (the subtitles) and reencode+hard subtitle with VirtualDub again.
http://gbatemp.net/t189538-extractor-and-editor-video?st=0&p=2566087&

Like i said, nothing tested, it's 5am and i will go sleep :p maybe on the late evening i will give it a try.


November 12, 2010, 10:30:11 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Hi People,
it was a boring evening at work so i had time to play around with Tales Of Innoncence (or to be more precise op.mods)
and some of the tools found on the net for symbian.
I try to point some facts and maybe give inspiration to somebody to create a tool that really works.
My first tries go to the coded found in that page in my other post and virtual dub...created a file from a little clip i had on the pc and sostitued the op.mods but no good luck: ToI just skip that clip (at least the game didn't crashed).
My next try was a converter with simulator for Nokia 6600 where i found out  that the conversion to .mo need 2 pass:
-first with the codec and virtualdub
-second a right click on the outputted file from virtualdub and "convert to .mo"
when inserting this file to ToI, it just skipped it again.
Next is to check the files with a hex editor, they have some similarity but complete different header so i tried to switch the headers (op.mods header to the .mo file i created) and now ToI freeze (with top black screen) at the moment where it should start the video but at least it shows the pic on the bottom screen.
I checked again the header of op.mods and found the values x0001 and xC000 (256 and 192 dec) that should be the dimentions of the video/screen NDS. Just by changing one of this 2 values, ToI freeze with black top screen again.

Taking a look at the manual of the symbian version i found out that there are limitation that probably have been changed for the NDS version:
-6 to 10 fps can be used to produce very small files
-12 fps is sufficient for animation movies
-15 fps is generally a good balance
-24 fps should be used only for fast moving videos or when the best quality is required
Somebody in another forum suggested that it should play at 30fps for one screen movies and 15fps if both screens.

For the final compression step:
1- Use the Mobiclip Video Codec. Only AVI files compressed with this codec can then be converted into MO files
2- Resize the video to fit the screen of your target phones. When resizing, remember that:
-Final image width must be multiple of 8 and at most 240
-Final image height must be multiple of 8
-Try to keep the original aspect ratio of the video
3- The audio track is mandatory and must be in uncompressed, 16000 Hz, 16bits, mono

1) Is this still so in the new NDS version?? what happen in this step?? is maybe a native compression applied to the file for the NDS version??
2) this limit is probably not valid anymore because of the screens of the NDS but i belive that the multiple of 8  is still valid
3) this limit is probably not valid anymore because of the audio capability of the NDS

There seem to be like a pointer table at the end of the op.mods file...the first (from the end) is pointing almost at the end of the file, the next 2 are pointing in 2 different points of the file and are alternated.
Just above this part are small "sectors" (just like when u are looking at an image file and see the xFFFFFF of the sector limit.

Now for the conclusion...i know it's a long stretch to try to modify the symbian player /converter /codec (like look at a child and ask somebody to draw how he will look 20 years later) but maybe somebody is capable of this but what wonders me is that because Mobiclip is not integrated on the bios (it's not native of the NDS) , each game should have like a codec somewhere (in the arm files??).
Is it not possible to track that part on a game and create a windows pendant??
« Last Edit: November 12, 2010, 10:30:11 pm by Auryn »

henke37

  • Hero Member
  • *****
  • Posts: 643
    • View Profile
Re: Has anyone ever edited a MobiClip video file?
« Reply #9 on: April 15, 2011, 03:24:10 am »
Wait, "*.mod" files? The files I've seen have had the file extension "*.vx". Is it the same format with a different extension or is it different? VX files have a header that does contain the string VX.