View Full Version : Scene detector which is making snapshots automatically
Guys, I have quite a complex and unusual task. Let me describe it and, please, recommend a tool, which can be of use.
I have video files with a feature films as an input. Tool should detect scene changes (montage joinings) and for each scene produce, preferably, three snapshots - first, middle and last frame of the scene.
I need to process a lot of films in different formats in this way (DVD images, AVIs, MPGs...). Does anyone know the tool, which can help me? Thanks beforehand.
dum
19th August 2014, 23:56
Guys, may be at least someone knows tools like this?
KreuzBlick
20th August 2014, 19:38
I don't know, if there is such a tool.
But I would recommend the following: First you use a tool, which finds the scene-changes. There are avisynth-scripts, who take as input a clip and give you as output a list of numbers, the framenumbers, where a new scene begins.
Second, you write a small program, which calculates for each scene the first, middle and last frame number.
Third, you create an avisynth-script, which collects the snapshots for these framenumbers.
Just an idea.
dum
20th August 2014, 20:42
Thank you, but even if first thing is possible, are there any possibilities to open text files (with numbers) in AviSynth and retrieve frame by number and store frame to a, lets say, PNG file?
raffriff42
20th August 2014, 22:34
are there any possibilities to open text files (with numbers) in AviSynth and retrieve frame by number and store frame to a, lets say, PNG file?Yes, no problem. The problem is no one AFAIK has written a reliable Avisynth scene change detector.
I don't think the problem is solvable with computer technology alone - it requires subjective judgement. How would you handle a slow dissolve? How would you handle a quiet scene with a sudden explosion? How about a 2-camera back and forth exchange, where one subject is in light and the other is in darkness?
dum
20th August 2014, 22:44
Yes. I expect this not to work perfectly, but 95% detection is fine for my purposes.
> retrieve frame by number and store frame to a, lets say, PNG file
Can you give me some hints on doing this in AviSynth, please? May be - just keywords.
raffriff42
20th August 2014, 23:23
I think the basic keywords are WriteFile (http://avisynth.nl/index.php/WriteFile), ConditionalReader (http://avisynth.nl/index.php/ConditionalReader) and ImageWriter (http://avisynth.nl/index.php/ImageWriter).
EDIT 1
before you get into that, try writing a function that simply flashes Subtitle("Scene Change Detected!") at all scene changes.
EDIT 2
Here is a short, working script that generates a log file with frame numbers and average luminance.
EDIT 2.1 To use it, you open the script in eg, VirtualDub, use "File/Run video analysis pass" to play through all frames without skipping any, then close the script and examine the log file: global g_logpath = "D:\test_log.txt"
## NOTE "global" only needed if you call WriteFile from within a function
AviSource("D:\test.avi")
ConvertToYV12
WriteFileStart(g_logpath, """ "frame" """, "Chr(9)", """ "AverageLuma" """)
WriteFileEnd(g_logpath, """ "(EOF)" """ ) ## optional - check for successful completion
WriteFile(g_logpath, "current_frame", "Chr(9)", "AverageLuma")
__END__
I wonder if @StainlessS's "Clip Clop" could be used to select the frames - assuming the existence of this magic SceneChangeDetected() function:
http://forum.doom9.org/showthread.php?t=162266
Once the right frames are selected, writing them out to images is easy.
StainlessS
21st August 2014, 00:09
I wonder if @StainlessS's "Clip Clop" could be used
FrameSel() could.
OK, I spent about 20 mins modifying an existing script
SceneChangeDump.avs
# Requires RT_Stats
AVISource("D:\avs\test.avi").Killaudio()
#
dFact = 4.0 # Lower more false +ve's, Higher fewer scene changes detected
dMin = 3.0 # Scene Change, avoid silly numbers (very small) on static scenes causing false +ve
#
fn_Start = "Start.Txt"
fn_Mid = "Mid.Txt"
fn_End = "End.Txt"
(Exist(fn_Start)) ? RT_FileDelete(fn_Start) : NOP
(Exist(fn_Mid)) ? RT_FileDelete(fn_Mid) : NOP
(Exist(fn_End)) ? RT_FileDelete(fn_End) : NOP
STARTCLIP = SubTitle("START OF SCENE") # Quicker to do external to Scriptclip
ENDCLIP = SubTitle("END OF SCENE")
StartFrame = 0
CondS="""
A = RT_LumaDifference(Last,Last,n=current_frame-1,n2=current_frame+0)
B = RT_LumaDifference(Last,Last,n=current_frame+0,n2=current_frame+1)
C = RT_LumaDifference(Last,Last,n=current_frame+1,n2=current_frame+2)
EOS= (((dFact*A + dMin) < B) && ((dFact*C + dMin) < B) || current_frame == FrameCount-1) # Detect on Last frame of scene
(EOS) ? RT_TxtWriteFile(String(StartFrame) ,fn_Start ,append=true) : NOP
(EOS) ? RT_TxtWriteFile(String((StartFrame+current_frame) / 2) ,fn_Mid ,append=true) : NOP
(EOS) ? RT_TxtWriteFile(String(current_frame) ,fn_End ,append=true) : NOP
Last = (EOS) ? ENDCLIP : (StartFrame==current_frame) ? STARTCLIP : Last
StartFrame = (EOS) ? current_frame + 1 : StartFrame # Must be at end of scriptclip (and not before Subtitle Select).
Return Last
"""
ScriptClip(CondS)
return Last
EDITED: Moved Subtitle() out of ScriptClip.
EDIT: Oops, broke it. StartFrame must be updated at end of Scriptclip, fixed.
SceneChangeGet.avs
# Requires FrameSel.
AVISource("D:\avs\test.avi").Killaudio()
fn_Start = "Start.Txt"
fn_Mid = "Mid.Txt"
fn_End = "End.Txt"
S = FrameSel(cmd=fn_Start) #.SubTitle("START")
M = FrameSel(cmd=fn_Mid) #.SubTitle("MID")
E = FrameSel(cmd=fn_End) #.SubTitle("END")
#Return S
#Return M
#Return E
#Return Interleave(S,M,E)
Interleave(S,M,E)
Return ConvertToRGB24.ImageWriter(file="TESTING_%06d.png",type = "png")
raffriff42
21st August 2014, 00:38
Wow, not bad, not bad at all. I got lots of false positives but it's a great start.
StainlessS
21st August 2014, 03:03
Update to SceneChangeDump.avs
# Requires RT_Stats, Perhaps RoboCrop.
AVISource("D:\avs\flashtest.avi").Killaudio()
#config
dFact = 4.0 # Lower more false +ve's, Higher fewer scene changes detected (Dfact=1.5 dMin=8.0 works pretty good)
dMin = 4.0 # Scene Change, avoid silly numbers (very small) on static scenes causing false +ve
dMinLen = 12 # Minimum length of scene for scene change detection to be valid (ignore short scenes)
ChromaWeight= 1.0/3.0 # Weighting for combined U + V Channels. Suggest about 1.0/3.0 -> 1.0/2.0
METRICS = True # basic metrics
#
fn_Start = "Start.Txt"
fn_Mid = "Mid.Txt"
fn_End = "End.Txt"
################
RoboCrop(Wmod=4) # Remove letterboxing from metrics. Requires RoboCrop(). Can Comment out if not using RoboCrop.
(Exist(fn_Start)) ? RT_FileDelete(fn_Start) : NOP
(Exist(fn_Mid)) ? RT_FileDelete(fn_Mid) : NOP
(Exist(fn_End)) ? RT_FileDelete(fn_End) : NOP
STARTCLIP = SubTitle("START OF SCENE",Align=5,Size=64) # Quicker to do external to Scriptclip
ENDCLIP = SubTitle("END OF SCENE",Align=5,Size=64)
UCLIP = UtoY() # Chroma U as Luma
VCLIP = VtoY() # Chroma V as Luma
StartFrame = 0
SceneNo = 0
CondS="""
A = YUV_Diff(Last,UCLIP,VCLIP,current_frame-2,current_frame-1,ChromaWeight)
B = YUV_Diff(Last,UCLIP,VCLIP,current_frame-1,current_frame+0,ChromaWeight)
C = YUV_Diff(Last,UCLIP,VCLIP,current_frame+0,current_frame+1,ChromaWeight) # Diff between current frame and next
D = YUV_Diff(Last,UCLIP,VCLIP,current_frame+1,current_frame+2,ChromaWeight)
E = YUV_Diff(Last,UCLIP,VCLIP,current_frame+2,current_frame+3,ChromaWeight)
AB=B-A BC=C-B CD=D-C DE=E-D # Diff of Diffs
ABC=BC-AB BCD=CD-BC CDE=DE-CD # Diff of Diff of Diffs
T1 = (((dFact*B + dMin) < C) && ((dFact*D + dMin) < C)) # Curr->next sufficiently bigger than those either side ?
T2 = ABC>0.0 && BCD<0.0 && CDE>0.0 # Scene Change sign OK ? (Also rejects single Flash Frames)
T3 = ((dMinLen<=1) || (current_frame-StartFrame + 1) >= dMinLen) # Scene length at least dMinlen frames ?
EOS = ((T1 && T2 && T3) || current_frame == FrameCount-1) # END OF SCENE conditions fullfilled ?
(EOS) ? RT_TxtWriteFile(String(StartFrame) ,fn_Start ,append=true) : NOP
(EOS) ? RT_TxtWriteFile(String((StartFrame+current_frame) / 2) ,fn_Mid ,append=true) : NOP
(EOS) ? RT_TxtWriteFile(String(current_frame) ,fn_End ,append=true) : NOP
Last = (EOS) ? ENDCLIP : (StartFrame==current_frame) ? STARTCLIP : Last
(METRICS)
\ ? RT_Subtitle("T1=%s T2=%s T3=%s (#=%d:len=%d)\n%7.3f(%7.3f) %7.3f %7.3f(%7.3f)",
\ T1?"T":"F",T2?"T":"F",T3?"T":"F",SceneNo,current_frame-StartFrame+1,
\ B,(dFact*B + dMin),C,D,(dFact*D + dMin))
\ : NOP
# Must be at end of scriptclip (and not before Subtitle Select)
SceneNo = (EOS) ? SceneNo + 1 : SceneNo
StartFrame = (EOS) ? current_frame + 1 : StartFrame
Return Last
"""
ScriptClip(CondS)
return Last
Function YUV_Diff(clip Y,clip U,Clip V,int n,int n2,Float CW) {
yd = RT_LumaDifference(Y,Y,n=n,n2=n2)
ud = RT_LumaDifference(U,U,n=n,n2=n2)
vd = RT_LumaDifference(V,V,n=n,n2=n2)
cd = (ud + vd) / 2.0
return yd * (1.0 - CW) + (cd * CW)
}
EDIT: Added Chroma diff.
EDIT: Added RoboCrop.
EDIT: Added SceneNo
SceneChangeGet.avs update
# Requires FrameSel.
AVISource("D:\avs\flashtest.avi").Killaudio()
# Config
SHOW_FRAMENO = True
SUBS = True
##
fn_Start = "Start.Txt"
fn_Mid = "Mid.Txt"
fn_End = "End.Txt"
S = FrameSel(cmd=fn_Start,Show=SHOW_FRAMENO)
M = FrameSel(cmd=fn_Mid,Show=SHOW_FRAMENO)
E = FrameSel(cmd=fn_End,Show=SHOW_FRAMENO)
S = (SUBS) ? S.SubTitle("START",Align=5,SIZE=64) : NOP
M = (SUBS) ? M.SubTitle("MID",Align=5,SIZE=64) : NOP
E = (SUBS) ? E.SubTitle("END",Align=5,SIZE=64) : NOP
#Return S
#Return M
#Return E
#Return Interleave(S,M,E)
Interleave(S,M,E)
Return ConvertToRGB24.ImageWriter(file="TESTING_%06d.png",type = "png")
raffriff42
21st August 2014, 04:55
Got good results (no missed changes, no false positives!) on my test clip with these changes:
...
#config
dFact = 24.0 #4.0 # Lower more false +ve's, Higher fewer scene changes detected
dMin = 24.0 #3.0 # Scene Change, avoid silly numbers (very small) on static scenes causing false +ve
...
lumadj = 129.0/(AverageLuma+1.0) ## HACK - try to make scene detection sensitivity inversely luma-dependant
A = RT_LumaDifference(Last,Last,n=current_frame-2,n2=current_frame-1)*lumadj
B = RT_LumaDifference(Last,Last,n=current_frame-1,n2=current_frame+0)*lumadj
C = RT_LumaDifference(Last,Last,n=current_frame+0,n2=current_frame+1)*lumadj # Diff between current frame and next
D = RT_LumaDifference(Last,Last,n=current_frame+1,n2=current_frame+2)*lumadj
E = RT_LumaDifference(Last,Last,n=current_frame+2,n2=current_frame+3)*lumadj
...
StainlessS
21st August 2014, 11:37
OK, you got my attention ! :)
How would you incorporate into the edited post #10 (ie with the YUV_diff thing added) ?
Gonna give it a try.
EDIT: can use
lumadj = 129.0/(RT_AverageLuma(Last)+1.0) ## HACK - try to make scene detection sensitivity inversely luma-dependant
# n defaults current_frame, RT_AverageLuma faster than builtin on v2.6a5 but AVS+ faster than RT
EDIT:
Assuming it works (have not tried it yet), then is still not ideal.
For metrics (display), as lumadj changes at every (EDIT: current) frame, so metrics for current frame will be different when at the next frame.
EDIT: Added RoboCrop() to post #10.
StainlessS
21st August 2014, 14:38
RaffRiff,
Small mod to post #10.
Try current post #10 with mod of dMin=20.0 for your sample anime (well game cap) by PM.
The luma hack works quite well for such samples but is quite awful for live video (misses many times more scene changes).
The dMin mod to 20.0, works very well and avoids scene change detection when that massive amount of text is splatted on frame in your sample.
I shall keep that sample (re-encoded to UT_Video), pretty good for test purposes.
EDIT:
dMin = 4.0 # Scene Change, avoid silly numbers (very small) on static scenes causing false +ve
In the case of your game cap, if there is a small change on frame (eg cockpit canopy raising) and static on both sides of that change
it results in the silly numbers as noted above, ie differences either side can be 0.0, so even a small change can be 'many' times bigger than 0.0.
EDIT: Actually, try dMin=10.0 instead, still works OK. However, misses (as does 20.0) the transition near beginning from MPS Logo -> Black,
but MPS logo is on black background and so is not going to be correctly detected without your hack. The cockpit canopy opening is about
the same difference as MPS logo -> black, I guess thats why you did the hack, but I think a bad idea as eg a credits sequence with
names appearing and disappearing on black background would be detected as loads of scene changes.
For General use on live video, I tried Dfact=1.5 dMin=8.0 on Jurassic Park, where Sam Neil and girl friend (EDIT: Laura Derne I think)
walking up hill at the dinosaur dig site (near beginning), and I think watching 9:15 secs with about 76 scene changes, that it performed
brilliant and I dont think it missed a single SC nor inserted any false +ve's. With given defaults it misses a number of scene changes
(maybe about 6 -> 8).
EDIT: Added update SceneChangeGet.avs to post #10.
smok3
21st August 2014, 19:10
possible ffmpeg ideas;
a. http://www.danielbachler.de/Automatic-scene-detect-via-ffmpeg-and-create-edl (have not test that personally)
b. https://www.youtube.com/watch?v=Vfvq_skLS8Q (my old script)
StainlessS
21st August 2014, 19:16
Thanx smokey, I'll give it em both a bash.
StainlessS
21st August 2014, 22:15
Smokey, I tried out the first link you gave with the ffmpeg scene change detection (at default 0.4) on the previously mentioned
Jurassic Park clip. I also re-did the post#10 scan, and still think that it did not miss any scene change detections nor added any false +ve's
where dFact=1.5 and dMin=8.0, and it found 71 scene good changes, no bad ones. ffmpeg managed to find 45 scene changes, but may
do better if the detection arg is played with (also, I did scans on UT_Video AVI, ffmpeg might fare better on a VOB).
Have not as yet figured out what to do with your 2nd script.
Anyway, I think the #10 script is working pretty good, hope the op is happy and if RaffRiff42 would care to perfect it, then please be my guest,
got to get back to what I was doing, bye.
smok3
22nd August 2014, 16:15
StainlessS; thanks for comparision, I'll play around to compare my-old (abusing x264) with new ffmpeg scene detector in recent future (i hope).
StainlessS
22nd August 2014, 19:03
Smokey, word of warning, the linked guys EDLGenerator thing is very picky about what it will accept, pretty much anything
not exactly right will produce an error (access violation I think). This worked for me for Test.avi, Test.csv inputs.
EDLGenerator.exe TEST.csv 25.0 TEST.AVI TEST.edl
ffmpeg I used was I think current about 2 weeks ago, not the MeGUI version (which I usually use).
When I said that ffmpeg might fare better on VOB, I meant that it may eg scan internal compression data (DCT and the like)
instead of expanding to video frame.
smok3
25th August 2014, 17:59
Just compared my old (using x264)
vs
new method
./ffmpeg -i big_buck_bunny_720p_h264.mov -vf 'select=gt(scene\,.4),showinfo' -f null -
using ffmpeg
ffmpeg version N-65550-gb097d17 Copyright (c) 2000-2014 the FFmpeg developers
built on Aug 12 2014 17:18:18 with Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
and its quite obvious that this new one is not as brain-dead as my old one, the diff;
diff -bBdy old.txt new.txt
0 <
.16 <
.25 <
11.87 11.87
15.75 15.75
23.04 23.04
47.70 47.70
56.08 56.08
60.66 60.66
63.79 63.79
69.41 69.41
71.29 71.29
73.45 73.45
75.54 75.54
79.95 79.95
89.75 89.75
91.41 91.41
99.75 99.75
103.91 103.91
112.66 112.66
117.95 117.95
120.87 120.87
123.45 123.45
126.87 126.87
146.37 146.37
149.08 149.08
156.00 156.00
160.83 160.83
162.29 162.29
163.29 163.29
166.20 166.20
168.00 168.00
169.54 169.54
176.12 176.12
177.75 177.75
180.50 180.50
185.95 185.95
189.33 189.33
192.16 192.16
194.66 194.66
195.70 195.70
196.91 196.91
199.83 199.83
204.16 204.16
205.91 205.91
207.45 207.45
208.87 208.87
211.62 211.62
213.79 213.79
220.50 220.50
223.79 223.79
226.25 226.25
229.91 229.91
232.45 232.45
242.04 242.04
243.50 243.50
250.75 250.75
> 252.00
253.66 253.66
255.33 255.33
257.00 257.00
258.66 258.66
259.50 259.50
261.16 261.16
262.83 262.83
264.50 264.50
266.16 266.16
270.33 270.33
275.95 275.95
277.91 277.91
279.70 279.70
281.37 281.37
284.70 284.70
292.20 292.20
295.54 295.54
297.12 297.12
300.25 <
305.20 305.20
308.25 <
312.50 312.50
314.41 314.41
317.20 317.20
319.20 319.20
322.16 322.16
323.70 323.70
331.33 <
334.33 334.33
336.87 336.87
337.08 | 337.12
339.75 339.75
346.33 <
351.41 <
372.70 372.70
375.37 375.37
378.33 378.33
381.16 381.16
390.79 390.79
392.50 392.50
394.50 394.50
396.12 396.12
398.95 398.95
399.33 399.33
399.70 399.70
404.41 <
404.95 404.95
408.12 408.12
410.41 410.41
412.12 412.12
416.12 416.12
417.33 417.33
420.04 420.04
420.70 420.70
421.87 421.87
424.33 424.33
426.41 426.41
427.50 <
429.29 429.29
430.79 430.79
433.70 433.70
435.54 435.54
436.16 <
440.58 440.58
442.16 442.16
443.20 443.20
444.70 <
444.75 <
444.83 <
444.87 <
451.75 451.75
458.29 458.29
461.83 <
461.87 <
461.91 <
471.33 471.33
472.87 472.87
480.16 480.16
481.66 481.66
483.83 483.83
486.29 486.29
488.66 <
489.87 <
490.08 <
490.12 <
490.16 <
490.20 <
490.25 <
490.29 <
500.41 <
507.54 <
517.08 <
526.16 <
532.66 <
534.62 <
537.62 <
538.16 <
538.87 <
540.58 <
541.29 <
542.20 <
542.91 <
544.00 <
544.70 <
545.41 <
547.04 <
548.83 <
550.04 <
551.25 <
552.66 <
554.37 <
554.79 <
555.75 <
556.20 <
557.50 <
559.08 <
560.45 <
579.95 <
580.91 580.91
596.45 | 596.41
Quick visual inspection of the new method seems to be 100% match for this specific clip. ( http://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_720p_h264.mov )
p.s. I have used the approximate values in mm:ss for this
00:12
00:16
00:23
00:48
00:56
01:01
01:04
01:09
01:11
01:13
01:16
01:20
01:30
01:31
01:40
01:44
01:53
01:58
02:01
02:03
02:07
02:26
02:29
02:36
02:41
02:42
02:43
02:46
02:48
02:50
02:56
02:58
03:01
03:06
03:09
03:12
03:15
03:16
03:17
03:20
03:24
03:26
03:27
03:29
03:32
03:34
03:41
03:44
03:46
03:50
03:52
04:02
04:04
04:11
04:12
04:14
04:15
04:17
04:19
04:20
04:21
04:23
04:25
04:26
04:30
04:36
04:38
04:40
04:41
04:45
04:52
04:56
04:57
05:05
05:13
05:14
05:17
05:19
05:22
05:24
05:34
05:37
05:37
05:40
06:13
06:15
06:18
06:21
06:31
06:33
06:35
06:36
06:39
06:39
06:40
06:45
06:48
06:50
06:52
06:56
06:57
07:00
07:01
07:02
07:04
07:06
07:09
07:11
07:14
07:16
07:21
07:22
07:23
07:32
07:38
07:51
07:53
08:00
08:02
08:04
08:06
09:41
09:56
p.s. The new-method is slower than my-old method, which is not very encouraging, as my-old was not really a rocket to start with.
slight speedup, maybe;
./ffmpeg -i big_buck_bunny_720p_h264_prores.mov -sws_flags neighbor -vf
'scale=100:100,select=gt(scene\,.4),showinfo' -f null - 2>&1 | sed 's/.*pts_time:\([[:digit:].]*\).*/\1/'
StainlessS: would you care to paste first 10 lines of your generated edl?
StainlessS
25th August 2014, 22:39
I take it that you mean the Jurassic Park EDL, Only 5kb, so here in entirety.
TITLE: TEST.AVI
001 AY B C 00:00:00:00 00:00:20:12 00:00:00:00 00:00:20:12
* FROM CLIP NAME: TEST.AVI
002 AX B C 00:00:20:12 00:00:22:21 00:00:20:12 00:00:22:21
* FROM CLIP NAME: TEST.AVI
003 AY B C 00:00:22:21 00:00:25:17 00:00:22:21 00:00:25:17
* FROM CLIP NAME: TEST.AVI
004 AX B C 00:00:25:17 00:00:32:05 00:00:25:17 00:00:32:05
* FROM CLIP NAME: TEST.AVI
005 AY B C 00:00:32:05 00:00:35:01 00:00:32:05 00:00:35:01
* FROM CLIP NAME: TEST.AVI
006 AX B C 00:00:35:01 00:00:52:23 00:00:35:01 00:00:52:23
* FROM CLIP NAME: TEST.AVI
007 AY B C 00:00:52:23 00:01:04:00 00:00:52:23 00:01:04:00
* FROM CLIP NAME: TEST.AVI
008 AX B C 00:01:04:00 00:02:06:08 00:01:04:00 00:02:06:08
* FROM CLIP NAME: TEST.AVI
009 AY B C 00:02:06:08 00:02:18:09 00:02:06:08 00:02:18:09
* FROM CLIP NAME: TEST.AVI
010 AX B C 00:02:18:09 00:02:27:21 00:02:18:09 00:02:27:21
* FROM CLIP NAME: TEST.AVI
011 AY B C 00:02:27:21 00:02:54:07 00:02:27:21 00:02:54:07
* FROM CLIP NAME: TEST.AVI
012 AX B C 00:02:54:07 00:02:58:03 00:02:54:07 00:02:58:03
* FROM CLIP NAME: TEST.AVI
013 AY B C 00:02:58:03 00:03:20:11 00:02:58:03 00:03:20:11
* FROM CLIP NAME: TEST.AVI
014 AX B C 00:03:20:11 00:03:24:09 00:03:20:11 00:03:24:09
* FROM CLIP NAME: TEST.AVI
015 AY B C 00:03:24:09 00:03:27:07 00:03:24:09 00:03:27:07
* FROM CLIP NAME: TEST.AVI
016 AX B C 00:03:27:07 00:03:29:05 00:03:27:07 00:03:29:05
* FROM CLIP NAME: TEST.AVI
017 AY B C 00:03:29:05 00:03:43:18 00:03:29:05 00:03:43:18
* FROM CLIP NAME: TEST.AVI
018 AX B C 00:03:43:18 00:04:14:07 00:03:43:18 00:04:14:07
* FROM CLIP NAME: TEST.AVI
019 AY B C 00:04:14:07 00:04:26:03 00:04:14:07 00:04:26:03
* FROM CLIP NAME: TEST.AVI
020 AX B C 00:04:26:03 00:04:35:01 00:04:26:03 00:04:35:01
* FROM CLIP NAME: TEST.AVI
021 AY B C 00:04:35:01 00:04:40:23 00:04:35:01 00:04:40:23
* FROM CLIP NAME: TEST.AVI
022 AX B C 00:04:40:23 00:05:01:00 00:04:40:23 00:05:01:00
* FROM CLIP NAME: TEST.AVI
023 AY B C 00:05:01:00 00:05:07:11 00:05:01:00 00:05:07:11
* FROM CLIP NAME: TEST.AVI
024 AX B C 00:05:07:11 00:05:11:08 00:05:07:11 00:05:11:08
* FROM CLIP NAME: TEST.AVI
025 AY B C 00:05:11:08 00:05:18:22 00:05:11:08 00:05:18:22
* FROM CLIP NAME: TEST.AVI
026 AX B C 00:05:18:22 00:05:23:23 00:05:18:22 00:05:23:23
* FROM CLIP NAME: TEST.AVI
027 AY B C 00:05:23:23 00:05:28:02 00:05:23:23 00:05:28:02
* FROM CLIP NAME: TEST.AVI
028 AX B C 00:05:28:02 00:05:42:21 00:05:28:02 00:05:42:21
* FROM CLIP NAME: TEST.AVI
029 AY B C 00:05:42:21 00:05:48:06 00:05:42:21 00:05:48:06
* FROM CLIP NAME: TEST.AVI
030 AX B C 00:05:48:06 00:05:52:02 00:05:48:06 00:05:52:02
* FROM CLIP NAME: TEST.AVI
031 AY B C 00:05:52:02 00:05:58:14 00:05:52:02 00:05:58:14
* FROM CLIP NAME: TEST.AVI
032 AX B C 00:05:58:14 00:06:03:21 00:05:58:14 00:06:03:21
* FROM CLIP NAME: TEST.AVI
033 AY B C 00:06:03:21 00:06:07:00 00:06:03:21 00:06:07:00
* FROM CLIP NAME: TEST.AVI
034 AX B C 00:06:07:00 00:06:09:06 00:06:07:00 00:06:09:06
* FROM CLIP NAME: TEST.AVI
035 AY B C 00:06:09:06 00:06:41:19 00:06:09:06 00:06:41:19
* FROM CLIP NAME: TEST.AVI
036 AX B C 00:06:41:19 00:06:55:07 00:06:41:19 00:06:55:07
* FROM CLIP NAME: TEST.AVI
037 AY B C 00:06:55:07 00:06:56:16 00:06:55:07 00:06:56:16
* FROM CLIP NAME: TEST.AVI
038 AX B C 00:06:56:16 00:07:00:03 00:06:56:16 00:07:00:03
* FROM CLIP NAME: TEST.AVI
039 AY B C 00:07:00:03 00:07:06:04 00:07:00:03 00:07:06:04
* FROM CLIP NAME: TEST.AVI
040 AX B C 00:07:06:04 00:07:30:21 00:07:06:04 00:07:30:21
* FROM CLIP NAME: TEST.AVI
041 AY B C 00:07:30:21 00:08:28:13 00:07:30:21 00:08:28:13
* FROM CLIP NAME: TEST.AVI
042 AX B C 00:08:28:13 00:08:43:21 00:08:28:13 00:08:43:21
* FROM CLIP NAME: TEST.AVI
043 AY B C 00:08:43:21 00:08:48:19 00:08:43:21 00:08:48:19
* FROM CLIP NAME: TEST.AVI
044 AX B C 00:08:48:19 00:08:55:15 00:08:48:19 00:08:55:15
* FROM CLIP NAME: TEST.AVI
045 AY B C 00:08:55:15 00:09:08:17 00:08:55:15 00:09:08:17
* FROM CLIP NAME: TEST.AVI
I did take a quick look at source code to see if I could see what type of EDL it was (I know nothing of such things),
but nothing noted. Looks like it might be CMX 340 (but they all look pretty much the same to me).
smok3
26th August 2014, 11:03
Now I wonder if there is adobe friendly edl that would have at least 5 digits for event number?
(Trying to do a little bash edl "plotter")
smok3
26th August 2014, 11:54
sony 9100 edl does not import correctly (shame, since it has 4 digits for event number);
TITLE: someEdit FORMAT: Provisional 24P (Sony9100)
EDT REL MODE TYP P S T P-VTR IN P-VTR OUT R-VTR IN R-VTR OUT
BLOCK 001
0001 y_720p VA1A2 C 00:00:13:06 00:00:15:08 00:00:00:00 00:00:02:02
0002 y_720p VA1A2 C 00:00:19:15 00:00:21:02 00:00:02:02 00:00:03:13
0003 y_720p VA1A2 C 00:00:46:00 00:00:47:08 00:00:03:13 00:00:04:21
0004 y_720p VA1A2 C 00:06:18:12 00:06:19:14 00:00:04:21 00:00:05:23
0005 y_720p VA1A2 C 00:03:13:08 00:03:19:18 00:00:05:23 00:00:12:09
.
END
cmx 3600 does work thought
TITLE: sceneDetectionEDL
001 nny_720p AA/V C 00:00:13:06 00:00:15:08 00:00:00:00 00:00:02:02
002 nny_720p AA/V C 00:00:19:15 00:00:21:02 00:00:02:02 00:00:03:13
003 nny_720p AA/V C 00:00:46:00 00:00:47:08 00:00:03:13 00:00:04:21
004 nny_720p AA/V C 00:06:18:12 00:06:19:14 00:00:04:21 00:00:05:23
005 nny_720p AA/V C 00:03:13:08 00:03:19:18 00:00:05:23 00:00:12:09
StainlessS
26th August 2014, 16:17
I could (I think) mod the SCeneChangeDump script to produce an RT_Stats DBase, with a record number entry for EACH FRAME something like:
Visited:Bool, ScStatus:Int
Where ScStatus would be eg 0=none, 1=SceneStart, 2=SceneEnd
So could eg scan with metrics showing on frame for setup, then when happy,
call Gscript for/next loop using RT_Stats YankChain() to produce the DBase (without user jumping about nor display).
then call function to scan DBase and produce simple frames files (start,end,mid,range), or to produce an EDL in whatever format was required.
(Easily user added)
Is I think quite doable.
EDIT: Perhaps even a user 'Override', so user could supply list of overrides to force frames to SC or NOT SC.
smok3
26th August 2014, 18:53
well my bash 'edl plotter' is working, but premiere is refusing to import this properly;
http://paste.debian.net/plain/117693
any ideas? (I can't spot any obvious problems)
edit: Actually i think its about premiere (lightworks also) being auto-smart and merging things into single clip.
Alternative approach would be
a. a frame of black with duration of 1 frame at each scene cut.
b. using some sort of dissolve
c. using some random clip names and then overlaying the result in timeline < bingo!
d. reel swap (AX,AY) < bingo as well!
StainlessS
26th August 2014, 19:39
Look pretty much the same to me however, apparently spacing can be important.
Top line from the Jurassic Park EDL.
001 AY B C 00:00:00:00 00:00:20:12 00:00:00:00 00:00:20:12
001 AX AA/V C 00:00:00:00 00:00:11:22 00:00:00:00 00:00:11:22
See "Incompatibilities and potential problems", here: http://en.wikipedia.org/wiki/Edit_decision_list
GVG format uses 4 digit event number: http://www.edlmax.com/EdlMaxHelp/Edl/maxguide.html
EDIT: CMX3600.pdf here (42MB): http://www.google.co.uk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=0CCcQFjAB&url=http%3A%2F%2Fxmil.biz%2FEDL-X%2FCMX3600.pdf&ei=rtT8U7u-BcK4O4TygeAC&usg=AFQjCNEJa9OGBBUCxKhgChicQsf8-MB7Gg&bvm=bv.73612305,d.ZWU
google search: https://www.google.co.uk/?gws_rd=cr&ei=ZE7PUrCTJMrStAa9p4CoAg#q=gvg+edl+spec
smok3
26th August 2014, 20:15
It was about video-editing app being to smart and merging back on edl import, however the c. approach seems to be good enough (just using some random names for clips, I have used a counter), edl then looks like this:
TITLE: sceneDetectionEDL
001 AX V C 00:00:00:00 00:00:11:21 00:00:00:00 00:00:11:21
* FROM CLIP NAME: 1 sceneDet.mov
002 AX V C 00:00:11:21 00:00:15:18 00:00:11:21 00:00:15:18
* FROM CLIP NAME: 2 sceneDet.mov
003 AX V C 00:00:15:18 00:00:23:01 00:00:15:18 00:00:23:01
* FROM CLIP NAME: 3 sceneDet.mov
004 AX V C 00:00:23:01 00:00:47:17 00:00:23:01 00:00:47:17
* FROM CLIP NAME: 4 sceneDet.mov
005 AX V C 00:00:47:17 00:00:56:02 00:00:47:17 00:00:56:02
* FROM CLIP NAME: 5 sceneDet.mov
006 AX V C 00:00:56:02 00:01:00:16 00:00:56:02 00:01:00:16
* FROM CLIP NAME: 6 sceneDet.mov
007 AX V C 00:01:00:16 00:01:03:19 00:01:00:16 00:01:03:19
* FROM CLIP NAME: 7 sceneDet.mov
008 AX V C 00:01:03:19 00:01:09:10 00:01:03:19 00:01:09:10
* FROM CLIP NAME: 8 sceneDet.mov
and then overlaying that to some turned-off layer (keyboard cut to cut jump still works just fine).
http://shrani.si/t/1G/xS/49IrMcPd/overlayedffmpegscenedete.jpg (http://shrani.si/f/1G/xS/49IrMcPd/overlayedffmpegscenedete.png)
@StainlessS: just noticed that your edl is using AX AY and B, wonder whats that ..., another thing to test.
edit: the AX, AY approach is working as well;
TITLE: sceneDetectionEDL
001 AX AA/V C 00:00:00:00 00:00:11:21 00:00:00:00 00:00:11:21
* FROM CLIP NAME: findme.mov
002 AY AA/V C 00:00:11:21 00:00:15:18 00:00:11:21 00:00:15:18
* FROM CLIP NAME: findme.mov
003 AX AA/V C 00:00:15:18 00:00:23:01 00:00:15:18 00:00:23:01
* FROM CLIP NAME: findme.mov
004 AY AA/V C 00:00:23:01 00:00:47:17 00:00:23:01 00:00:47:17
* FROM CLIP NAME: findme.mov
005 AX AA/V C 00:00:47:17 00:00:56:02 00:00:47:17 00:00:56:02
* FROM CLIP NAME: findme.mov
006 AY AA/V C 00:00:56:02 00:01:00:16 00:00:56:02 00:01:00:16
* FROM CLIP NAME: findme.mov
StainlessS
31st August 2014, 01:07
@StainlessS: just noticed that your edl is using AX AY and B, wonder whats that ..., another thing to test.
edit: the AX, AY approach is working as well;
I think the B thing means a copy (B reel), think it says someting about that in one of the given links but did not do more than give a cursory glance to them as yet. AX,AY, probably to do with the A reel, B reel thing.
MugFunky EDL thread just been resurrected in Avisynth usage, was wondering how to do the drop frames thing.
Pretty much done the DBase script as described in a previous post.
EDIT:
edit: Actually i think its about premiere (lightworks also) being auto-smart and merging things into single clip.
Probably the A reel B reel thing, both were being seen as same clip and so merged.
smok3
31st August 2014, 17:34
was wondering how to do the drop frames thing.
some explanation here http://andrewduncan.net/timecodes/
SynchronousArts
25th September 2014, 01:56
Also see this:
http://dropframetimecode.org/
SA
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.