VideoHelp Forum

+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. Code:
    source=FFVideoSource("F:\A Spider In The Web.avi").convertTOYV12(interlaced=false).killaudio()
    
    filename = "F:\SCtest.txt"
    
    prev = source.selectevery(1,-1)
    next = source.selectevery(1,1)
    source.SCSelect(next,prev,source,dfactor=3.0)
    
    WriteFileIf(filename, "(prev=true) || (next=true)" , "current_frame", flush=false)
    I am stuck trying to write out the frames number when scselect detects a change of scene and swap frame before and after scene change.

    Also is it possible to do this?

    frames 1 2 3 sc 4 5 6 become 1 2 3 2 sc 5 4 5 6

    cheers
    Quote Quote  
  2. How about this for scene change:

    Code:
    filename = "F:\SCtest.txt"
    source=FFVideoSource("F:\A Spider In The Web.avi").convertTOYV12(interlaced=false).killaudio()
    
    sup = MSuper(source)
    vec = MAnalyse(sup, isb=false, delta=1)
    scenechange = MSCDetection (source, vec)
    
    WriteFileIf(scenechange, filename, "(AverageLuma()>250)", "current_frame", append = false)
    Quote Quote  
  3. I can only assume you were replying to the wrong thread?

    Your answer doesn't help at all.
    Quote Quote  
  4. Originally Posted by coolgit View Post
    I can only assume you were replying to the wrong thread?

    Your answer doesn't help at all.
    Originally Posted by coolgit View Post
    I am stuck trying to write out the frames number when scselect detects a change of scene
    I gave you an alternate method of getting all the scene changes. I was going to work on the second part later but since you're not interested in my input I'll pass.
    Quote Quote  
  5. Originally Posted by jagabo View Post
    Originally Posted by coolgit View Post
    I can only assume you were replying to the wrong thread?

    Your answer doesn't help at all.
    Originally Posted by coolgit View Post
    I am stuck trying to write out the frames number when scselect detects a change of scene
    I gave you an alternate method of getting all the scene changes. I was going to work on the second part later but since you're not interested in my input I'll pass.
    I was being sarcastic

    My point being is that your method, after some fine tuning, only outputs the frame numbers but it doesn't swap frames before and after scene change. The swapping of frames is the feature I need. I just need to output the frame numbers of the said feature.

    So is it possible or not?
    Quote Quote  
  6. Swapping of the frames is easy, but after your reply to jagabo, I'm not going to help either. His answer was exactly what you asked for:
    I am stuck trying to write out the frames number when scselect detects a change of scene
    Quote Quote  
  7. Originally Posted by johnmeyer View Post
    Swapping of the frames is easy, but after your reply to jagabo, I'm not going to help either. His answer was exactly what you asked for:
    I am stuck trying to write out the frames number when scselect detects a change of scene
    No he didn't. MSCDetection works independently of scselect.

    I am stuck trying to write out the frames number when scselect detects a change of scene
    That sentence means when scselect detects a scene change(sc) then scselect will
    If last frame before sc
    Then replace with previous frame
    Else
    If first frame after sc
    Then replace with next frame.
    Then
    Write frame number of sc.

    MSCDetection from jagabo does not do that.

    The purpose of having a list of frames numbers is for debugging purpose to make sure that scselect works as intended and that it doesn't falsely swap frames between one sc and another sc, for any other possible reasons. It would then allow me to adjust the dfactor if necessary.
    Quote Quote