Witch Comparisons

Comparitron 3000, a users guide


Fig 1. What you'll likely spend most of your time looking at.

Description

  1. Comparitron 3000 is a program of very singular function and purpose. After doing a few pages on this site, I realised that doing it all by hand SUCKED. Thus this thing was born.

Prerequisites

  1. The Comparitron3000 software. Possibly works in Wine, but is untested.
  2. ffmpeg, used for extracting video frames. I recommend putting this in a folder on your PATH, if you haven't already. If you can't/don't do that, copy ffmpeg.exe to your project folder root.
  3. A tool to rename hundreds/thousands of files at once. I use Bulk Rename Utility.
  4. Imagemagick, for image analysis. Download and install that. It should be automatically assigned to your PATH.
  5. a few spare GB of disk space to hold the project folder
  6. Somewhere to host the damn thing.

Preparation

  1. In lieu of this step, feel free to follow the guide on Jojo Comparisons up to step 4ish where he details the script used to compare the frames. We have the same methodologies and project structure. Once he starts talking about image viewers and actually looking at the frames, come back here!

  2. First, you need 2 video sources to compare. You should know where to get these, so i'll leave this step up to you.
  3. Make a new directory and place the two videos in, like so;
  4. Make 2 new directories inside. They can be any name you wish, but I prefer, and the comparitron software defaults, to "new", "old". These will contain your dumped frames.
  5. From your command prompt, navigate to the project folder (tip : type "cmd" into the windows explorer location bar) and run this line, change the inputs as appropriate;
  6. ffmpeg.exe -i oldvideo.mkv -q:v 10 -vf fps=23.976215 "old\tv-%05d.jpg"
  7. ffmpeg.exe -i newvideo.mkv -q:v 10 -vf fps=23.976215 "new\bd-%05d.jpg"
  8. Once that's done, inspect the old and new folders, you should see all the newly dumped frames. a 25 minute video should have somewhere around 34000 frames. While you're here, take a moment to marvel at the huge amount of disk space it takes up. Sorry.
  9. You have your frames ready now, but they might not match up. The frames must match up perfectly in time for this to work correctly.
  10. An easy way to check sync is to skip to random points in the video and compare the two folders. Keep the folder windows at the same size next to each other and pay attention to scene cuts.

    Note how the scene changes at frame 79 in this image.
  11. Delete pictures as needed to keep the sync, use the position in the window as a guide. Do not rename any files yet. Some usual places where frames drift out are at the start of an episode (black frames, generally) and around the advert break point.
  12. Open up Bulk Rename Utility (Or your prefered tool) and point it at the video folders. It might need a minute to load. Select everything in the folder and look at the settings panel. With bulk rename utility, my usual settings are;
    Remove last n: 5. (Removes the number from the file name)
    Numbering mode : Suffix, Pad : 5
  13. In the utilities folder window you'll see the new filename highlighted in green. If it looks good, press rename and let it do it's job. Then do the same thing with the other video folder. Both sets of files should now be compared, you can check if you've doen it correctly by going back to your folders and seeing if the numbers are equivalent (frame cut at 14042 on both folders... looks good)
  14. Save this script somewhere handy (I put it in my path as framecompare.bat) and run it. It may take a few hours.
    mkdir mix
    setlocal enabledelayedexpansion
    for %%g in (%cd%\new\*.jpg) do (
    set numonly=%%~nxg
    set imgnum=!numonly:~3,11!
    magick composite "%%g" "%cd%\old\tv-!imgnum!" -compose difference "%cd%\mix\mx-!imgnum!
    echo 'Frame !imgnum! compared.'
    )
    echo "done"

    Adapted from the script on Jojo comparisons
  15. If it fails, check that imagemagick is installed correctly.

The bit that takes all day (aka, using Comparitron3000)

  1. This step genuinely takes multiple hours. I recomend putting on some music while working.
  2. Unzip comparitron if you haven't already, and launch it. The main interface should pop up looking like this;
  3. If you decided to change your file paths from what I suggested, go to the Settings and change the defaults to your liking.
  4. From the file menu, select the project folder and it'll load the folder up. Hit save and you might notice a project.xml file pop up in that folder. Cute!
  5. Now it's loaded, you can use the bar at the bottom of the window to scroll through the frames. To change view mode, use the dropdown at the top left, and the slider immediately right of that moves the slider in Split mode.
  6. Once you're on a frame, hit the Add Frame button below the right panel to add it to the list.
  7. Go to the start of the episode and start scrolling.
  8. Differences show up as a coloured shadow in the black frame of Difference view mode. When you've spotted something, add the frame.

    Look, a striker unit! Better write that down.

The other bit that takes all day

  1. To pepper your article with witty commentary, enter words into the Text field alongside the frame number. To see the frame, press Goto Frame And the preview window will immediately jump to that position.
  2. After a few hours, you should have a nice long page of words and images all ready to publish. Your comparitron view probably looks something like this*;

    *Minna not guaranteed.

Exporting and setting up a page

  1. Visit the Project Menu at the top of the program window and take note of the settings presented.
  2. ProjectID Is the internal name the page will be assigned. This affects the output.php filename and the storage file for the final set of images
  3. Project Title Is the page heading. Appears at the top of tabs and in your bookmarks and stuff, you know the thing.
  4. Previous and Next URL are the local URL of the previous/next pages in the sequence. These are inserted into the final webpage php as variables and are there to assist in building lists of pages in a sequence. As you've probably noticed on this site, I'm using them to link episode pages together in a tidy way.
  5. Set those to your preference, hit Okey and you will be returned to the main screen.
  6. To export, press the Engage button at the top of the page. You will be presented with a window so simple it needs no screenshot.
  7. Reconsider closes the window with no action taken and no fanfare.
  8. Run activates the exporter.
  9. Press Run to begin. The log window on the exporter will start scrolling messages. If something goes wrong, it'll pause on a message to let you know where the problem lies, currently it will only do that for missing images.
  10. Once it's complete, you will be informed Export complete, go home in the log window.
  11. Check your project folder and you'll see a new folder named "output". Inside will be contained a .php file with YOUR NAME ON IT and a /images/YOURNAMEHERE subdirectory with all the selected images inside.
  12. The PHP file has a fairly simple layout, it has a few friendly metadata variables up top to make pagination and ordering stuff easier, and then a link to your selected Header file, a big pile of linked comparison frames, then a link to your selected Footer file.
  13. If the folder is not to your satisfaction, delete and export again.
  14. Do as you wish with these files. Edit them, burn them, boil them, roast them, etc. The world is your lobster.

Annotated buttons

  1. Command And Control

  2. File has a few self explanatory commands. Reload Folder empties the current memory and reloads the project. Handy if you've changed a file externally. YOU GET NOTHING if you figure out what Load and Save do. Exit closes the program. Remember to save often!
  3. Settings Opens the settings panel.
  4. Project Opens the project config panel.
  5. Engage! Opens the exporter.
  6. View Controls

  7. The dropdown box Selects the view mode. You have options of the spooky difference highlighting Difference mode and the splitty looky Split mode for actually seeing what's going on. More available on request!
  8. The big long trackbar guy next to it controls the split location in Split mode.
  9. The main view screen itself dominates the program. You'll spend a lot of time looking at it. Double click to pop out a duplicated copy of it that you can place anywhere you wish.
  10. Tracking controls

  11. The main control buttons should look or act familiar to anyone that's ever touched a VCR or Laserdisk player. You have; Start which skips you all the way to the start of the file, Back Which backs up 1 frame, for if you skipped past something. FrameLets you plug in a frame number to jump to manually. Next Moves you to the next frame. You'll likely press this one the most. End Ends the list, it moves you to the end of the frame sequence.
  12. Below that lies the Seek Bar Simple grasp it firmly and give it a waggle to jump around the video.
  13. Input Panel

  14. These buttons add/remove/move stuff in The Important Bit.
  15. Add Frame drops your currently viewed frame into the list. Add Text inserts a plain text element. The data will be autofilled from the discrete white bar above the Input Panel. Add Image drops in an empty Image. Specify the path in The Important Bit. Add Video gives you a Video element. Specify URL above, again. Add Split Inserts a html <hr> element. I like them. There's probably several on this page alone.
  16. The lower section manipulates the selected element. Move Up/Down moves it up/down 1 item relative to the rest of the list. Delete removes it from the list. Goto Frame jumps the currently viewed frame to the one in the selection. Useful for quickly checking something when writing. Set Frame changes the selected items Frame number to the currently viewed one.
  17. The Important Bit
  18. This is a raw data dump of everything the Mighty Comparitron is thinking about right now. Seperated into columns are your list of page elements. They have a Type a Frame number, a Text string, for captioning things. Also available are a Image tag and a VideoTag. How these work depends on the element type;
  19. Comparison types only depend on the Frame and Text fields.
  20. Text types only use the Text field.
  21. Image types rely on the Image field. The Text field is used as title/mouseover text.
  22. Video types use the Video field. The Image field is used as a picture fallback if the user viewing the page can't see the video for some reason, and the Text field adds commands to the video control. Add "controls" here to give the user something to control the video with. Full list of commands are here, under the Optional Attributes heading

Afterthoughts

  1. This program is incredibly specific in function and isn't thoroughly tested so possibly has some bugs. Feel free to play around with the source on Github if you feel you can improve or fix anything.
  2. and most of all, have fun~!