So i have a few extremely long videos that have about 99% no action. For the most part it is sitting on a static frame that i know longer want in the video. Does anyone know how to remove via automation.
Or to word it another way does anyone know how to take some security footage and only get the action frames?
Or to word it a third way how would you remove duplicate frames. If i frame is just like the previous frame it removes it.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 21 of 21
Thread
-
-
Perhaps something like:
http://briefcam.com/products/briefcam-vs-enterprise/
Review here:
http://www.sourcesecurity.com/news/articles/co-4559-ga-co-1151-ga.3400.html -
Are you trying to change the overall duration of the video?
If so, there are AVISynth scripts to remove duplicate frames (if they are TRULY duplicates).
If not, the only way would be to work on sections, saving at different (appropriately compensatory) framerates, and recombine, ending up with a Variable FrameRate (VFR) video. These don't play well on many software players and on most hardware players, so I don't recommend it. With that in mind, it would be best to leave it alone.
Scott -
Sooooo checking it out.....
From post http://forum.doom9.org/showthread.php?t=134930
In other words it works like this:
(Assume captial letters represent frames with actual changes)
AbcdeFGhiJkLmnop
This filter will produce:
AAAAAFGGGJJLLLLL
AFGJL
It looks like there is going to be a learning curve here. So do you think this will work?
*EDIT*
I think i might want this....
DeDup -
Yes, it can work, but there's a "threshold" for how identical the dupes are. If they fall within that threshold, they are considered dupes and will get removed, if they don't fall within the threshold, they're left alone.
Simple scripts can only test for 100% identical dupes, I don't have in my back pocket the better scripts (where you can adjust that threshold), but have seen them HERE and at doom9 before...
Scott -
Not to make this more complicated then it already is.
First off the video i am working with is an flv.
Since i dont know how to make it work in avisynth i just used a tool to convert that to avi.
From there I switched to TDecimate for the command. dont really know how to use it correctly but it appears i dropped about 1000 frames out of 6000 some.
On the first video i tested.
Any tips for using TDecimate? or how to get it to work directly with the flv files?
*EDIT*
would it help if i showed a video of what or provided an example of what i am trying to achieve?Last edited by justusiv; 2nd May 2012 at 15:03.
-
What are your reasons for doing this? Is this for viewing purpose, or some storage purpose?
Did you know avisynth serves uncompressed video, so you have to re-encode the video if you use it (or you're left with huge video sizes many times larger than the original).
If you re-encode security footage with lossy compression, quality will deteriorate (security footage is usually shabby at best in the first place). So if it's to be used in investigations etc... not a good idea -
LOL good questions.......
Slightly both.
I dont know if i had mentioned this before but the source is a direct vnc capture. Using this python script.
http://www.unixuser.org/~euske/python/vnc2flv/index.html
It connects to a machine via vnc and just records the stream to a flv file.
It is set to always connect so in 1 day i have 24 hours of video. However 95% of that time its sitting on the ctrl alt del screen.
Yes i want to save it. Yes i want to view it.
My main goal is to watch it for the examples of what i need. In trouble shooting this issue.
Other points of interest.
I am grabbing about 4 frames a second. That is good enough for what i need.
My first run was 15 hours at 2.5GBLast edited by justusiv; 2nd May 2012 at 15:56.
-
I assume there is no audio?
To load FLV video in avisynth use FFVideoSource("video.flv") . Get ffmpegsource2 plugin from
http://code.google.com/p/ffmpegsource/
Many avisynth functions run in wine under linux, but some do not. Also there is a avisynth port called avxsynth , but also has limitations compared to windows version
https://github.com/avxsynth/avxsynth/wiki
http://forum.doom9.org/showthread.php?t=164386
Dedup is capped at 20 duplicate strings, so it will help , but if you have hours of static unchanging frames, it won't be as useful. The benefit is it has other parameters and threshold tuning, so you can customize it
ExactDedup isn't capped at 20, but has no threshold settings (only exact dups are decimated, so if you have codec quality issues, noise etc.. this may impair your resluts)
Most dup filters require 2 passes, the 1st being an analysis pass. You feed the 2nd pass into whatever encoder that accepts avs scripts you want for your final export goal -
I am actually running this under windows. Just happens that program is wrote in python.....
I will dig deeper in again tomorrow
thanks for the tips -
If you're doing a screencap feed, the time to have done the dedupe operation would have been prior to encoding. Then, the duplicate streams would have been 100% identical, making the job much easier. Now, with lossy compression, there's much more to deal with. Maybe you can include this in the chain in future recordings..
You could always run "Dedup" in many multiples of passes, slowly bring down the # of dupes (by ~20). But that's a little cumbersome. Maybe you can hack the code for dedup to overcome the 20, change it to 99 or something (thinking 2 digits in hex editor).
Scott -
So i did get avisynth to open up a flv file
however trying to run dedup on it yeilded me this error
Avisynth open failure:
DeDup: requires YUY2 or YV12 source
(D:\Recordings\Dedup.avs, line 3)
LoadPlugin("DeDup.dll")
FFVideoSource("Recording.flv")
DupMC(log="FLV.dup.txt") -
Not sure what you want....
Format : Screen video
Codec ID : 3
Duration : 1h 20mn
Bit rate : 4 024 Kbps
Width : 1 696 pixels
Height : 1 056 pixels
Display aspect ratio : 1.606
Frame rate mode : Constant
Frame rate : 4.000 fps
Bit depth : 8 bits
Bits/(Pixel*Frame) : 0.562
Stream size : 2.27 GiB (96%)
Also
ConvertToYV12() is working
and it is creating a FLV.dup.txt currently
Is there a way to make this faster? it appears to be playing through at 1x. -
Thx. But darn, single threaded.
Gonna have to work on my secone pass now, Results seem promising from looking at the FLV.dup.txt
Tips for second pass?
Thx again,
For everyone's help. New to this video stuff..
Here are some blurbs from the FLV.dup.txt
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 4: diff from frm 5 = 0.0000% at (0,0)
frm 5: diff from frm 6 = 0.0000% at (0,0)
frm 6: diff from frm 7 = 0.0000% at (0,0)frm 77: diff from frm 78 = 0.0000% at (0,0)
frm 78: diff from frm 79 = 0.0000% at (0,0)
frm 79: diff from frm 80 = 0.0000% at (0,0)
frm 80: diff from frm 81 = 4.6206% at (736,544)
frm 81: diff from frm 82 = 4.5757% at (736,544)
frm 82: diff from frm 83 = 3.1948% at (736,544)
frm 83: diff from frm 84 = 1.2762% at (704,576)
frm 84: diff from frm 85 = 0.0000% at (0,0)
frm 85: diff from frm 86 = 7.2444% at (736,576)
frm 86: diff from frm 87 = 0.0000% at (0,0)
frm 87: diff from frm 88 = 4.5304% at (736,576)
frm 88: diff from frm 89 = 6.5122% at (736,576)
frm 89: diff from frm 90 = 3.3070% at (768,576)
frm 90: diff from frm 91 = 4.5300% at (768,576)
frm 91: diff from frm 92 = 0.0000% at (0,0)
frm 92: diff from frm 93 = 4.5304% at (768,576)
frm 93: diff from frm 94 = 0.0000% at (0,0)
frm 94: diff from frm 95 = 41.0389% at (736,576)
frm 479: diff from frm 480 = 0.0000% at (0,0)
frm 480: diff from frm 481 = 0.0000% at (0,0)
frm 481: diff from frm 482 = 0.0000% at (0,0)
frm 482: diff from frm 483 = 0.0000% at (0,0)
frm 483: diff from frm 484 = 0.0000% at (0,0)
frm 484: diff from frm 485 = 0.0000% at (0,0)
frm 485: diff from frm 486 = 0.0000% at (0,0)
frm 486: diff from frm 487 = 0.0000% at (0,0)
frm 487: diff from frm 488 = 0.0000% at (0,0)
frm 488: diff from frm 489 = 0.0000% at (0,0)
frm 489: diff from frm 490 = 0.0000% at (0,0)
frm 490: diff from frm 491 = 0.0000% at (0,0)
frm 491: diff from frm 492 = 0.0000% at (0,0)
frm 492: diff from frm 493 = 0.0000% at (0,0)
frm 493: diff from frm 494 = 0.0000% at (0,0)
frm 494: diff from frm 495 = 0.0000% at (0,0)
frm 495: diff from frm 496 = 0.0000% at (0,0)
frm 496: diff from frm 497 = 4.5250% at (448,64)
frm 497: diff from frm 498 = 2.8009% at (1056,32)
frm 498: diff from frm 499 = 2.8009% at (1056,32)
frm 499: diff from frm 500 = 1.3792% at (896,64)
frm 500: diff from frm 501 = 3.6191% at (832,768)
frm 501: diff from frm 502 = 3.6191% at (832,768)
frm 502: diff from frm 503 = 2.4298% at (864,480)
frm 503: diff from frm 504 = 5.8270% at (832,480)
frm 504: diff from frm 505 = 6.8908% at (832,480)
frm 505: diff from frm 506 = 18.1479% at (1312,160)
frm 506: diff from frm 507 = 4.2383% at (928,640)
frm 507: diff from frm 508 = 4.2383% at (928,640)
frm 508: diff from frm 509 = 3.3490% at (1184,384)
frm 509: diff from frm 510 = 34.3181% at (928,480)
frm 510: diff from frm 511 = 3.0523% at (1216,352)
As some examples.
I am assuming the 0% are the static frames.
And if i could just get rid of those...Last edited by justusiv; 3rd May 2012 at 10:07.
-
LoadPlugin("DeDup.dll")
FFVideoSource("out201205021300.flv")
ConvertToYV12()
DeDup(threshold=0.3, maxcopies=20, maxdrops=20, log="FLV.dup.txt", times="FLV.times.txt")
Seems to have done the job. But i do have that max drop of 20 frames.
But its way better.
I might look into modifying the plugin -
You can try ExactDedup, it's not maxed out at 20
If you modify the plugin, can you publish the sources ? It could help others in the same boat -
Ok guys, i wanna thank you for all your help.
Hell i would buy you a beer if you want.
A few final questions
I have moved over to ExactDedup. I like this for several reasons. First essentially i dont "lose" data. I only pull frames that i actually have in another place.
However the process is single threaded, Is it possible to get this multithreaded?
Second is I do my first pass and my second pass although i don't actually alter the original file. Is there anyway to encode this again? I see the save as avi but this makes a crazy huge file. What is the best way to handle this?
I also run two passes using two .avs files.
Is there anyway to put both these into a file or batch convert this stuff with less human interaction?Last edited by justusiv; 7th May 2012 at 14:02.
-
You're saving as uncompressed RGB. Choose a codec (in Video->Compression) and set it up. If you don't have the XviD or DivX codecs installed, do so first.
Also, Donald Graf's Multidecimate filter can do the same (remove all dupe frames), also with with a threshold set so they don't have to be exact duplicates before being removed. It also requires 2 passes to do its job, but it's quite good:
http://neuron2.net/multidecimate/multidecimate.html
Similar Threads
-
Remove frames from an iPhone 4S video (MOV) without re-encoding?
By kingmustard123 in forum Newbie / General discussionsReplies: 6Last Post: 11th Dec 2011, 11:18 -
Remove Duplicate Frames
By robindean in forum Video ConversionReplies: 26Last Post: 11th Mar 2010, 15:30 -
Need to remove some static from a recording for funeral
By canadianjameson in forum AudioReplies: 6Last Post: 29th Sep 2008, 01:22 -
How to remove a single or more frames from a DVD
By justmehere in forum Authoring (DVD)Replies: 2Last Post: 22nd Apr 2008, 12:06 -
Remove green color from 49 frames
By mlong30 in forum EditingReplies: 5Last Post: 10th May 2007, 23:54