Hello.
i captured a tape two times and now i want to run the two captures in an algorithm and the algorithm will return me the frames that not the same in one of the captures.
at first i will must to trim one cupture so thiner frames numbers will provide the same picture if no problems ..
but after that i need a avisynth algorithm in my avisynth script for this job..
thanks for helpers!
this is the best forum for video![]()
+ Reply to Thread
Results 1 to 30 of 38
-
-
Code:
WhateverSource("video1.ext").Trim(x,0) WhateverSource("video2.ext").Trim(y,0) Subtract(v1,v2)
-
-
What will you do with the log file?
Last edited by sanlyn; 26th Mar 2014 at 06:55.
-
-
-
-
tape never plays exactly the same way twice. Almost every frame will be "different" in some way.
I don't use only AVISynth to see what happens.
i also using sony vegas for see tow Integrated captures (every on 50% opacity)
and whwn played tow Integrated captures in that Settings, so i didn't have a sync problems for Hours of playback -
Then you think wrong. But the issue is "how different" they are each time and being able to set a threshold in your detection. DeDup has such options. But again, it returns the opposite of what you want (if you use it following Subtract()). You may still be able to use the output though (I've never looked at the log file).
I verified will work for you.
Code:v1=AviSource("video1.avi") v2=AviSource("video2.avi") Subtract(v1,v2) DupMC(log="dup.txt")
Code:DeDup 0.17 by Loren Merritt, based on Dup 2.20 beta 1 by Donald Graft/Klaus Post, Copyright 2004 frm 0: diff from frm 1 = 0.0000% at (0,0) frm 1: diff from frm 2 = 0.0000% at (0,0) frm 2: diff from frm 3 = 0.0000% at (0,0) frm 3: diff from frm 4 = 0.0000% at (0,0) ... frm 433: diff from frm 434 = 0.0000% at (0,0) frm 434: diff from frm 435 = 0.0000% at (0,0) frm 435: diff from frm 436 = 47.9239% at (640,128) frm 436: diff from frm 437 = 47.9239% at (640,128) frm 437: diff from frm 438 = 0.0000% at (0,0) frm 438: diff from frm 439 = 0.0000% at (0,0) ...
Last edited by jagabo; 22nd Mar 2013 at 07:59.
-
I know that tape is never playing exactly the same.
But the point is - I'm looking for just the big differences.
From what you write, that's exactly what I was looking for.
from what I understand from the script, I do not understand how it works.
But thanks anyway .. I'll try this and if I have problems I will update. -
Subtract() subtracts one video from the other then adds 128 (so you can see "negative" results). If the frames are identical you get a flat medium grey image. If the frames are different you get something which is not a perfectly flat grey. Just look at the results of Subtract() alone and you'll get the idea.
DupMC() compares successive frames in a video and reports how different they are. During sections where the original videos are identical you will get a long string of gray frames -- all detected as near-zero percent frame-to-frame changes by DupMC(). Where the videos are different Subtract() will give a bunch of noise and DupMC() will report that as a greater difference.Last edited by jagabo; 22nd Mar 2013 at 09:00.
-
By the way, if you can get three (or more) caps you can use a median filter to eliminate occasional playback hiccups. Things like comets, playback noise, etc.
-
-
-
i wrote a AutoIt3 script to reed this huge log and give me only the lines with Over different Percent i want.
this is the script:
Code:#Include <File.au3> $logfile = FileOpenDialog("Select Only the log file by DupMC()", ".", "Text files (*.txt)", 1) if @Error = 1 then exit Local $aFile _FileReadToArray($logfile,$aFile) $file2 = "Output.txt" $DifSet = 24 ; <---------------- put here the Number you want For $i = 2 to $aFile[0] $pres = ($i/$aFile[0])*100 $pres2 = StringSplit($pres,".",1) If $pres2[0] = 2 Then $pres = $pres2[1]&"."&StringLeft($pres2[2],2) ToolTip($pres&"%") ConsoleWrite($aFile[$i] & @crlf) $var = StringSplit($aFile[$i]," = ",1) If $var[0] = 2 Then $var = StringSplit($var[2],"%",1) If $var[1] > $DifSet Then FileWriteLine($file2,$aFile[$i]) EndIf EndIf Next MsgBox(0,"Done","Done!")
i also want to write function to convert the frame number to time based on FPS rate that need to write in the script.
i hope that it is helpful
EDIT:
Updated Script with frame to time conversion:
Code:#Include <File.au3> $logfile = FileOpenDialog("Select Only the log file by DupMC()", ".", "Text files (*.txt)", 1) $logfile = "dup.txt" if @Error = 1 then exit Local $aFile _FileReadToArray($logfile,$aFile) $file2 = "Output.txt" $DifSet = 35 ; <---------------- put here the Number you want $FPSrate = 25 ; <--------------- put here the Frame Rate of your video For $i = 2 to $aFile[0] $pres = ($i/$aFile[0])*100 $pres2 = StringSplit($pres,".",1) If $pres2[0] = 2 Then $pres = $pres2[1]&"."&StringLeft($pres2[2],2) ToolTip($pres&"%") ConsoleWrite($aFile[$i] & @crlf) $var = StringSplit($aFile[$i]," = ",1) If $var[0] = 2 Then $var2 = StringSplit($var[2],"%",1) If $var2[1] > $DifSet Then $var3 = StringSplit($var[1],":",1) $var3 = StringSplit($var3[1]," ",1) ; $var3[2] ----> frame Number $SEC = $var3[2]/$FPSrate FileWriteLine($file2,$aFile[$i]&" Time: "&Sec2Time($SEC)) EndIf EndIf Next MsgBox(0,"Done","Done!") Func Sec2Time($nr_sec) $sec2time_hour = Int($nr_sec / 3600) $sec2time_min = Int(($nr_sec - $sec2time_hour * 3600) / 60) $sec2time_sec = $nr_sec - $sec2time_hour * 3600 - $sec2time_min * 60 Return StringFormat('%02d:%02d:%02d', $sec2time_hour, $sec2time_min, $sec2time_sec) EndFunc ;==>Sec2Time
frm 52: diff from frm 53 = 44.5674% at (160,64) Time: 00:00:02
frm 53: diff from frm 54 = 45.6558% at (480,0) Time: 00:00:02
frm 325: diff from frm 326 = 43.1670% at (608,160) Time: 00:00:13
frm 810: diff from frm 811 = 44.2079% at (224,544) Time: 00:00:32
frm 811: diff from frm 812 = 45.8669% at (96,512) Time: 00:00:32
frm 812: diff from frm 813 = 54.1498% at (480,544) Time: 00:00:32
frm 813: diff from frm 814 = 46.2134% at (672,256) Time: 00:00:32
frm 814: diff from frm 815 = 51.7441% at (672,512) Time: 00:00:32
frm 816: diff from frm 817 = 57.3184% at (64,448) Time: 00:00:32
frm 1163: diff from frm 1164 = 44.8142% at (480,320) Time: 00:00:46
frm 1164: diff from frm 1165 = 42.6176% at (416,160) Time: 00:00:46
frm 1167: diff from frm 1168 = 35.8070% at (416,256) Time: 00:00:46
frm 1168: diff from frm 1169 = 53.4038% at (416,384) Time: 00:00:46
frm 3424: diff from frm 3425 = 37.8462% at (0,192) Time: 00:02:16
frm 3427: diff from frm 3428 = 42.3679% at (224,96) Time: 00:02:17
frm 3428: diff from frm 3429 = 43.2060% at (128,192) Time: 00:02:17
i am using the times in my log file that the script create from the DupMC() log for vegas to know where to easily replace framesLast edited by gil900; 23rd Mar 2013 at 08:28.
-
Something about what you just showed and told us tells me that what you really need is just a good TBC.
Scott -
I start thinking about it seriously.
But I looked here:
https://forum.videohelp.com/threads/193619-TBC-buying-guide
I did not see recommendations on models ..
can you give me recommendations on something good and cheap? (Up to $ 50)
i know this Technique. But it's not as convenient as in sony vegas ..
There are things that I'd rather to do in other programs. -
[QUOTE=gil900;2228968] I start thinking about it seriously.
But I looked here:
https://forum.videohelp.com/threads/193619-TBC-buying-guide
I did not see recommendations on models ..
can you give me recommendations on something good and cheap? (Up to $ 50)
Did you read the topic ? $50 for a tbc did npt happen then and it will not happen now.
The cheapest model is the AVT-8710 and you can read some more about this at:
http://www.digitalfaq.com/forum/video-restore/1853-alternative-avt-8710-a.html -
The AVT-8710 is not the type of tbc you want for VHS work. How many times do tbc's have to be described before the difference is understood? A line-level tbc or line tbc pass-thru is the tbc of choice for analog tape capture. Frame-level tbc's don't work the same way as line-level tbc's and do not improve many of the basic problems with VHS playback.
You can find any of several used Panasonic or Toshiba DVD recorders from the 2000-2005 time period for around $50 that can be used for line-level tbc pass-thru. Camcorders with the same capabilty are not that numerous, and will cost more, but will accomplish the task.Last edited by sanlyn; 26th Mar 2014 at 06:55.
-
@sanlyn
Well I am really confused now. I just re-read LS's topic (link as above) and that seems to contradict your remarks.
"Good standalone TBCs include- the AVToolbox AVT-8710 aka Cypress CTB-100,
- DataVideo TBC-1000, and others in the series
S-VHS VCR Line TBC:
Unlike the standalone TBC, this one will- NOT give a continual clean signal out from the VCR
- NOT remove anti-copy signals, by replacing those often-dirty areas with new clean data
- NOT help much with jitter -- in fact it can sometimes increase the amount of jitter "
-
If you don't know the difference between a scan line and a frame filled with scan lines, I don't know what to advise.
When I mentioned line tbc, I'm not talking about the more crude SVHS built-in tbc's found in ancient VCR's. While they do help mitigate many problems, most of those vcr's can't play a tape without serious professional overhaul.
line-level tbc: corrects line-by-line sync pulse of each frame. Does not correct frame-by-frame output.
frame tbc: corrects frame sync pulse, does not correct line-by-line within each frame.
Full-scale professional stand-alone tbc usually has complete correction. If you would like to buy one and the associated equipment required to operate it, see your banker.
https://forum.videohelp.com/threads/319420-Who-uses-a-DVD-recorder-as-a-line-TBC-and-what-do-you-use -
OK. I will take you word for it but when I see an article/topic by another respected member I do also take note.
On a side issue. My ADVC 300 has what is descibed as a Line TBC but more than one member on here states that this is not a adequate approach to VHS capture. Personally, I found a substantial improvement when using it.
Now the majority of members on here, myself included, do not have friendly bank managers. We have to make do with compromises.
So if neither of the stand-alones that are quoted in that topic will do the job then pray tell us, and without breaking the bank, what will. -
You might want to browse the thread that I (and many many many others) have referred to many many many times: https://forum.videohelp.com/threads/319420-Who-uses-a-DVD-recorder-as-a-line-TBC-and-what-do-you-use
jagabo and poisondeathray ahve posted capsule descriptions of the two types of tbc, and lordsmurf's digitalfaq site discusses the differences as well. To recap suggestions quoted many times as well (I really don't have time to look up all those posts, but they're all over the forum and go back several years), some units work well as pass-thru and some don't:
Panasonic ES10, Toshiba "RD" and "RD-XS" series recorders up to 2005, a Philips unit discussed in several links (was that Mini-me's post? I don't remember), the DENON AVR-890 a/v receiver (which you will never find "cheap"), and a few cameras mentioned in the link posted above. I've posted a few myself from my own experience -- five videos, images, and two source videos shown here:
https://forum.videohelp.com/threads/331681-s-video-artifacts?p=2141386&viewfull=1#post2141386Last edited by sanlyn; 26th Mar 2014 at 06:56.
-
-
It works on a pixel-by-pixel basis, not frame-by-frame. Ie, for each pixel in a frame it looks at the three source videos and picks the median of the three. Comets and other occasional playback glitches will usually be an outlier so the median is usually a "good" pixel. The technique won't work for glitches that are on the tape itself. Those play back messed up every time so a median selection won't work.
This post discusses it:
https://forum.videohelp.com/threads/340963-Best-quality-and-speed-video-denoisers-2011?...=1#post2122313
I changed the name of Median1() to MedianOf3(), and median2() to MedianOf5().
Similar Threads
-
Change Reference Frames
By Manigorudo in forum Video ConversionReplies: 1Last Post: 22nd Jan 2013, 16:12 -
How to compare and edit individual frames of two videos side by side
By SushiSky in forum Newbie / General discussionsReplies: 8Last Post: 24th Jul 2012, 08:48 -
Stripping out no-change frames
By swkenney in forum Newbie / General discussionsReplies: 3Last Post: 2nd Aug 2011, 10:23 -
compare compression of two frames
By mathmax in forum Newbie / General discussionsReplies: 21Last Post: 27th Apr 2011, 23:19 -
Cannot compare lossless with MPEG-2 encodes: Frames aren't lining up!
By Mini-Me in forum Video ConversionReplies: 15Last Post: 5th Dec 2010, 01:08