Log in

View Full Version : How to compare video content?


lovelove
6th September 2011, 19:08
Hi. Does anyone have good ideas for comparing videos?

For scenario 1 I have a working but probably improvable solution, suggestions welcome
For scenario 2 I don't really have a good solution. Help appreciated.


Scenario 1: The objective is to check whether a given clip A and clip B have identical content, i.e. whether all scenes are the same (same length, same order, etc.). Different encoding parameters don't matter (i.e. the clips can have different X*Y resolution, different framerate, different quality, image enhancements, etc.)

The only solution I have found so far is to create a thumbnail sheet (http://img199.imageshack.us/img199/9117/theboa1thumbs.jpg) for each clip and then check if both images are identical.

» Solution 1a: MPC (http://www.videohelp.com/tools/Media_Player_Classic) or MPC-HC (http://www.videohelp.com/tools/Media_Player_Classic_Home_Cinema) (file > save thumbnails)
(nothing can be adjusted)

» Solution 1b: Movie Thumbnailer (http://www.videohelp.com/tools/movie_thumbnailer)
mtn.exe -z -c 10 -s 60 -b 2 -B 0,0 -E 0,0 -w 1280 -g 6 -j 100 -L 4:2 -D 0 -h 50 -k FFFFFF -f cour.ttf -F 000000:10:TAHOMABD.TTF:FFFF00:000000:10 -o _thumbs.jpg -n -p inputfile.avi
(begin time, end time can be adjusted via -B -E, frame rate via -s)

» Solution 1c: FFmpeg (http://www.videohelp.com/tools/ffmpeg)
ffmpeg.exe -i inputfile.avi -r 0.1 -s 400x300 -ss hh:mm:ss -t hh:mm:ss -f image2 outputfile-%%03d.png
(begin time, end time can be adjuste via -ss, -t, frame rate via -r)

Is there any other method than resorting to thumbnail sheets?

Scenario 2: Some clips are different, but share common content to some extent. The objective here is to compare the content of clip A and clip B to determine what scenes occur in both clips and what scenes are in A (but not in B) and in B (but not in A).

» Solution 2a: Virtualdub (http://www.videohelp.com/tools/Virtualdub) + mods
You open 2 instances side by side and use the button "scan forward to next scene change".
Problem: external codecs required. Some of them process the video slower than realtime (which means that you would even be faster by just sitting through the whole video)

» Solution 2b: TMPGenc video Mastering Works (http://www.videohelp.com/tools/TMPGEnc_Xpress)
The "clip editing" interface features scene change detection (http://tmpgenc.pegasys-inc.com/en/lab/ttips_200706_03.html).
Problem: Can't say yet, I'm still testing. It would be helpful if the identified scenes (http://tmpgenc.pegasys-inc.com/en/lab/images/ttips_scenedetection_03big.png) could be copied to the timeline (http://www.videohelp.com/toolsimages/tmpgenc_xpress_621.jpg), but I'm afraid the program can't do that.

Do you know better solutions for that?
thank you.

lovelove
8th September 2011, 09:14
I was just made aware of a professional Fraunhofer tool (http://www.hhi.fraunhofer.de/en/departments/interactive-media-human-factors/overview/video-structure-detection/) (which is I think not available to end users) but which visually explains my posting above:

http://www.hhi.fraunhofer.de/uploads/tx_templavoila/im_vsd-grafik-en_605px_02.jpg

For my own needs, I don't require all the hierarchical levels, I would already be happy to find a good solution for a single level, like this:

http://img98.imageshack.us/img98/915/ttipsscenedetection03bi.png

Yobbo
12th September 2011, 06:20
Wouldn't you be better off just putting them both on a timeline & zooming in and just manually comparing?

lovelove
12th September 2011, 06:35
Yes, I think so. It gradually occured to me over the last few days. I'll post later on. Thank you.

Mounir
12th September 2011, 08:29
Easy to do with Sony Vegas but i guess is possible with many NLE softs

You put the 2 videos on 2 separate tracks and you simply lower the opacity of the first and add a unique color to it so you can compare them: scenes and lengths

jmac698
12th September 2011, 16:58
There's scripts to do this on a numerical level. We use it to restore videos by usiing different sources. The problem is, they have to be matched in the other ways before this stage, so you can do levels/geometry tweaking beforehand.
Something as simple as subtract(clip1,clip2) will make difference stand out like a sore thumb.