PDA

View Full Version : In-place search & replace (ipsr) linux program for Kiss player owners


subspawn
16th April 2007, 10:55
For anyone having troubles with the Kiss DVD-players with packed bitstreams in XViD (I believe it's now the default setting for new encodes).
The known & suggested solution from Kiss has always been to replace the "DivX503b1393p" header with "DivX999b000p" as this will force the player to play it.
So far one could change it using Moitah's MPEGModifier (great piece of software by the way), which even works fine under mono (1.2.3 required tho).
But all this full blown file rewriting isn't really needed if you'd only want to change a couple of headers, hence this easy to use attached linux program: In-place search & replace (ipsr).

Install:
DL the rar file & open a shell in the folder

# unrar e ipsr-1.0.rar
# make


Usage:
# ./ipsr <searchstring> <replacestring> <file>
In-place Search & Replace (ipsr)
searchstring, replacestring can be either normal strings or
hex encoded strings, beginning with 0x
When using replace, make sure search & replace strings are of exact the same length

Example search & replace:
# ./ipsr 0x000001b244697658353033623133393370 0x000001b244697658393939623030307000 videofile.avi
Found pattern at position 2086, need replacing !
Found pattern at position 866616, need replacing !
Found pattern at position 1257792, need replacing !
Found pattern at position 1584488, need replacing !
...


This will search for the prefix tags of a the DivX503b1393p header and replace it with DivX999b000p (and 00 padding at the end, to maintain file length & consistency).

The program can be used for other file in-place modifications as well. This is where hex-editors fail, most of them don't operate stream-based and buffering is not an option in large video files. Binmay (Sean Loaring) has similar functionalities but lacks the in-place working to save space.

Since it's a pure stream-oriented C-program it has a good speed and requires no extra disk space for file modification.

WARNING
Do use with care, this modifies the file in-place, thus your original file will be directly modified, there will be NO backup copy of it. So please copy a backup yourself if needed.

Enjoy !

r0lZ
17th April 2007, 09:00
Thanks!

I have a Kiss DP-450 (the first one!) but I use it now mainly as a regular DVD player. I am not anymore DivX oriented, and I don't understand the problem exactly. Can you describe the problem with the DivX503b1393p header, or provide a link to a technical explanation? Is it simply a new DivX variant?

subspawn
17th April 2007, 10:05
It concerns mainly the DP-150x and its predecessors, I doubt a recent versions have problems with it. The problem consists in the following:

To mark the type of "packed stream" XViD encoded files, XViD adds a compatible DivX header (the files remain however XViD encoded, most HW players are fine with that anyhow, as long as you don't utilize exotic options such as GMC or quarterpel).
Afaik nowadays XViD encodes files default with a packed stream (this results in a very small quality gain,someone correct me if I'm wrong about this), most XViD's you encode yourself or one gets from the internet all have this compatible DivX header set in the .avi files.

Some Kiss players however are not to keen on that particular header and won't play the file (or simply freeze), they do have a "force play" option, which is enabled by placing DivX999b000p in the headers. This will force the player to play it.. and guess what, it works :) I think Kiss could solve this with a nice and small firmware update, but insted they advice people to manually change the headers using MPEGModifier (or ipsr from now on :))

r0lZ
17th April 2007, 10:23
Thanks for the explanation.

Obviously, the guys at Kiss are still idle!
I don't know the recent models of Kiss players, but I don't recommend buying that crap!