Hello! There is a camera that looks at the entrance to work. Sometimes I need to see who comes to work and when. To do this, I watch 4 hours of video at an accelerated pace. I decided that it would be easier if the video player itself finds motion and pauses the video or something else, but I cannot find anything like it! Whether prompt there is such software?
- Yes, there is such a thing, for example, in the firmwares of the IP cameras for surveillance, which record on the server, only if the camera captures motion - Igor Lavrynenko
- I am not comfortable in a video camera! And I rarely do this! I happen to download 4 hours on a USB flash drive and review at home! I would be in the finished video! - Alexander Rublev
1 answer
I can offer an old school version. If you are friends with AVISynth, then there are tools in it that can help you. For example, you can analyze a video file and save to JPEG those frames where there are serious changes in the picture: the house with the mp3 file saves JPEG files.
global avdir="F:\VideoSoft\AVS_Plugins\" #Ρ Π²Π°Ρ ΠΏΠ°ΠΏΠΊΠ° ΠΌΠΎΠΆΠ΅Ρ Π±ΡΡΡ Π΄ΡΡΠ³ΠΎΠΉ LoadPlugin(avdir + "ffms-2.17\ffms2.dll") Import(avdir + "ffms-2.17\FFMS2.avsi") filename="camera.mp4" # ΠΠΌΡ Π²Π°ΡΠ΅Π³ΠΎ MP4 ΡΠ°ΠΉΠ»Π° path="ΠΏΠΎΠ»Π½ΡΠΉ ΠΏΡΡΡ ΠΊ ΡΠ°ΠΉΠ»Ρ, Π·Π°ΠΊΠ°Π½ΡΠΈΠ²Π°ΡΡΠΈΠΉΡΡ \" # Π·Π°Π΄Π°ΡΡ ΠΏΡΡΡ ΠΊ MP4 ΡΠ°ΠΉΠ»Ρ imageprefix="prefix_" # ΠΏΡΠ΅ΡΠΈΠΊΡ Π² ΠΈΠΌΠ΅Π½ΠΈ ΡΠ°ΠΉΠ»Π° JPG ΠΠ°ΡΡΠΈΠ½ΠΎΠΊ Global Luma_Tolerance=15 # ΠΠΎΠΏΡΡΠΊ ΠΎΡΠ»ΠΈΡΠΈΡ ΡΡΠΊΠΎΡΡΠΈ ΠΊΠ°Π΄ΡΠ° ΠΎΡ ΠΎΠΏΠΎΡΠ½ΠΎΠ³ΠΎ #ΠΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΡ Π΄Π»Ρ ΡΠ΅Π³ΠΈΡΡΡΠ°ΡΠΈΠΈ ΠΌΠ΅Π΄Π»Π΅Π½Π½ΡΡ
ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΠΉ ΠΊΠ°ΡΡΠΈΠ½ΠΊΠΈ Global YDiff_Tolerance=10 # ΠΠΎΠΏΡΡΠΊ ΠΎΡΠ»ΠΈΡΠΈΡ ΡΡΠΊΠΎΡΡΠΈ ΠΊΠ°Π΄ΡΠ° ΠΎΡ ΠΏΡΠ΅Π΄ΡΠ΄ΡΡΠ΅Π³ΠΎ #ΠΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΡ Π΄Π»Ρ ΡΠ΅Π³ΠΈΡΡΡΠ°ΡΠΈΠΈ Π±ΡΡΡΡΡΡ
ΠΈ ΡΡΠ΅Π΄Π½ΠΈΡ
ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΠΉ ΠΊΠ°ΡΡΠΈΠ½ΠΊΠΈ FFmpegSource2(path+filename) ConvertToYV12() #Trim(180, 580) #ΠΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΡ Π΄Π»Ρ Π½Π°ΡΡΡΠΎΠΉΠΊΠΈ Π΄ΠΎΠΏΡΡΠΊΠΎΠ², ΠΏΠΎΠ΄ΡΡΠ°Π²ΠΈΠ² Π΄ΠΈΠ°ΠΏΠ°Π·ΠΎΠ½ ΠΊΠ°Π΄ΡΠΎΠ² Ρ Π½ΡΠΆΠ½ΡΠΌ Π΄Π²ΠΈΠΆΠ΅Π½ΠΈΠ΅ΠΌ Global AVG_Lum=0 FR=FrameRate # ΠΠΎΠΆΠ½ΠΎ ΡΠ±ΡΠ°ΡΡ ΠΈΠ»ΠΈ Π·Π°ΠΊΠΎΠΌΠΌΠ΅Π½ΡΠΈΡΠΎΠ²Π°ΡΡ, Π΅ΡΠ»ΠΈ Π½Π΅ Π½ΡΠΆΠ½Ρ Π½ΠΎΠΌΠ΅ΡΠ° ΠΊΠ°Π΄ΡΠΎΠ² ΠΈ Π²ΡΠ΅ΠΌΡ ScriptClip("""subtitle(string(current_frame)+"f" \ +" "+string(int(current_frame/(FR*3600))) \ +"h "+string(int(current_frame/(FR*60))-60*int(current_frame/(FR*3600))) \ +"m "+string(int(current_frame/FR)-60*int(current_frame/(FR*60)))+"s") \ """) ScriptClip(""" Global AVG_Lum=(current_frame==0) ? AverageLuma : AVG_Lum Test=((Abs(AverageLuma-AVG_Lum))>Luma_Tolerance || YDifferenceFromPrevious>YDiff_Tolerance) ? True : False Global AVG_Lum=(Test) ? AverageLuma : AVG_Lum Test ? ConvertToRGB24(). \ ImageWriter(path+imageprefix,current_frame, current_frame, "jpg",false).ConvertToYV12() : last """) Your actions:
1. install plugin paths
2. designate the name of the mp3 file and the path to its location.
3. Set the tolerances YDiff_Tolerance and Luma_Tolerance - then you have to play, it all depends on the camera that was shooting.
YDiff_Tolerance - the most important is the difference in brightness of the current frame from the previous one.
Luma_Tolerance - auxiliary, they are set to distinguish the current frame from the last saved (or from the first, if nothing has been saved). For example, if there is a slow motion, then the differences between adjacent frames are small, but after a certain number of frames it accumulates, then Luma_Tolerance will trigger and the frame will be saved to disk. If you put 255, then this option will be disabled.
You can open this script from any application that runs AVISynth, for example, from the good old VirtualDub.