VideoHelp Forum
+ Reply to Thread
Results 1 to 13 of 13
Thread
  1. Hello,

    i downloaded video files with the tool "letmeatit". I noticed, that my files always freeze for a few moments. This is very random. Everytime i download it again, the freezes are on another place. :/

    Can i check my videos with some kind of tool, that shows me the exact spot of the freezes? The videos are quite long, so i can't check them myself after every download attempt. :/ Or did i make something wrong with letmeatit?


    sorry for english

    Thanks a lot
    Last edited by schmutzbrust; 11th Apr 2020 at 17:11.
    Quote Quote  
  2. If the frames repeat exactly, then it is very easy to find the frame numbers where duplicates occur using an AVISynth script.

    Here is some old code I had lying around. If you only need to find true duplicates, set the blankthreshold value to a really small number, like 0.1.

    Code:
    #This script finds exact duplicate frames and outputs the frame numbers
    loadPlugin("c:\Program Files\AviSynth 2.5\plugins\MPEGDecoder.dll")
    loadPlugin("c:\Program Files\AviSynth 2.5\plugins\dgdecode.dll")
    
    #Set blankthreshold to a really low value, like 0.01, if you only want to detect true duplicates
    global blankthreshold=3
    
    filename = "e:\output_duplicate_frames.txt"
    AVISource("e:\fs.avi").killaudio()
    i=AssumeBFF.ConvertToYV12
    
    #This line below will output EVERY frame that is below threshold, which results in LOTS of frames
    #Normally you don't do this, but it is included for those who want this capability.
    #WriteFileIf(last, filename,  "(YDifferenceFromPrevious(i)<=blankthreshold)", "current_frame+1", append = false)
    
    #The line below writes the FIRST frame that falls below the threshold
    WriteFileIf(last, filename,  "(YDifferenceFromPrevious(i)>blankthreshold)&&YDifferenceToNext(i)<=blankthreshold", "current_frame", append = false)
    
    #Use this instead of WriteFile in order to determine blankthreshold
    #ScriptClip("Subtitle(String(YDifferenceFromPrevious(i)))")
    Quote Quote  
  3. Thanks a lot for your post and the script. Unfortunately it won't regognize the freezes. :/ Tried several values. :/

    Maybe it's not a freeze in a classic way, i don't know whats the problem.
    Quote Quote  
  4. Originally Posted by schmutzbrust View Post
    Thanks a lot for your post and the script. Unfortunately it won't regognize the freezes. :/ Tried several values. :/

    Maybe it's not a freeze in a classic way, i don't know whats the problem.
    You have to post a few seconds of un-edited video so we can see what you actually mean by "freeze." Normally a freeze is caused by duplicate frames, but if my script didn't work, then there is something else going on.

    So, post a clip.
    Quote Quote  
  5. Here's a 1 min Sample (look from 0:35)

    https://1fichier.com/?bx3qtex2ryv4k3ocmvs2
    Quote Quote  
  6. Code:
    ffmpeg -v error -i "Path to file" -f null -
    reports:
    Code:
    [h264 @ 0000012873e5a100] Reference 7 >= 2
    [h264 @ 0000012873e5a100] error while decoding MB 68 20, bytestream 167
    [h264 @ 00000128741e2340] error while decoding MB 96 14, bytestream -9
    on files without an error it reports nothing.

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  7. Is this also an AviSynth script? Because i got an error message:





    deleted the "-" at the end, i got this:

    Quote Quote  
  8. No that was a command line to use FFmpeg.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  9. ffprobe shows the video is VFR. Most frames are displayed for ~33 ms. But frame 1108 is displayed for 5100 ms, and frame 1134 is displayed for 5167 ms.

    A slight mod of johnmeyer's script:

    Code:
    #This script finds exact duplicate frames and outputs the frame numbers
    #loadPlugin("c:\Program Files\AviSynth 2.5\plugins\MPEGDecoder.dll")
    #loadPlugin("c:\Program Files\AviSynth 2.5\plugins\dgdecode.dll")
    
    #Set blankthreshold to a really low value, like 0.01, if you only want to detect true duplicates
    global blankthreshold=0.1
    
    filename = "test_duplicate_frames.txt"
    LWlibavVideoSource("test.mkv", fpsnum=30000, fpsden=1001) # converts to CFR
    i=last
    
    #This line below will output EVERY frame that is below threshold, which results in LOTS of frames
    #Normally you don't do this, but it is included for those who want this capability.
    #WriteFileIf(last, filename,  "(YDifferenceFromPrevious(i)<=blankthreshold)", "current_frame+1", append = false)
    
    #The line below writes the FIRST frame that falls below the threshold
    WriteFileIf(last, filename,  "(YDifferenceFromPrevious(i)>blankthreshold)&&YDifferenceToNext(i)<=blankthreshold", "current_frame", append = false)
    
    #Use this instead of WriteFile in order to determine blankthreshold
    #ScriptClip("Subtitle(String(YDifferenceFromPrevious(i)))")
    finds duplicate sequence (after converting to CFR) starting at frames:

    Code:
    498
    501
    504
    507
    1106
    1283
    1285
    1496
    1499
    1502
    1505
    1508
    1797
    All verified.
    Last edited by jagabo; 13th Apr 2020 at 10:34.
    Quote Quote  
  10. @selur

    Sorry, my bad. Now it worked:





    @Jagabo

    Thanks, but how i set the path to my video file? At the moment it says: Script error: There is no function named 'LWlibavVideoSource'
    i assume, this is for avisynth?

    Or is there a way to make a batch file out of it, so i just drag the video to it? If it works, i'll have to test a lot of them (videos) :/
    Last edited by schmutzbrust; 13th Apr 2020 at 10:50.
    Quote Quote  
  11. First you need to download and install the LSmash source filter for AviSynth. http://avisynth.nl/index.php/LSMASHSource
    Quote Quote  
  12. Here's an example batch file (you can drag/drop your sample on it) that will produce an AviSynth script and execute it via ffmpeg to produce the list of duplicates:

    Code:
    echo LWLibavVideoSource("%~d1%~p1%~n1%~x1", fpsnum=30000, fpsden=1001) > "%~1.avs"
    echo WriteFileIf(last, "%~dpn1.dups.txt",  "(YDifferenceFromPrevious(last)>0.1)&&YDifferenceToNext(last)<=0.1", "current_frame", append = false)  >> "%~1.avs"
    ffmpeg -i "%~1.avs" -f null -
    pause
    But there's an obvious problem: the frame rate of a video may not be 30000/1001. You would have to extract that information from the video first then add it to the batch file. There are many other reasons why such an automated process could fail too.
    Quote Quote  
  13. Member
    Join Date
    Feb 2008
    Location
    United States
    Search Comp PM
    Download each video twice. Check if the CRC of the videos match. If they are the same, the videos downloaded correctly and the duplicate can be deleted. If the CRC differs, download the video for a third time. Compare the CRCs for two that match. Delete the wrong CRC video, as well as the duplicate.

    While this method consumes more bandwidth and time, it ensures that it downloaded without errors in the stream.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!