VideoHelp Forum




+ Reply to Thread
Results 1 to 10 of 10
  1. Hello

    I want a way to make 2 minute preview video from a 45 minutes movie (Automatically)

    Assume that I have a movie its duration around 43 min, I want to take 3 seconds splits every X times then merge those splits into one file to produce a 2 minute long video.

    How could I do this? and with which programs/scripts?
    It will be great too if I could do this to multiple files at once (batch)


    Thanks in advance
    Last edited by master1024; 24th Jul 2016 at 07:17.
    Quote Quote  
  2. AviSynth's SelectRangeEvery() will allow you to do such.
    Quote Quote  
  3. Originally Posted by jagabo View Post
    AviSynth's SelectRangeEvery() will allow you to do such.
    Thanks for your suggestion, I will appreciate a step by step guide, if you have time.

    I am totally new to virtualdub and other scripting world.

    The function you mentioned seems to do exactly what I am looking for. but what I should do after opening the video file with virtualdub?
    Quote Quote  
  4. Now, I am stuck with this. I created this script file (.avs)
    Code:
    AVISource("D:\My Files\05 Videos\Videotomakeapreview.mp4")
    SelectRangeEvery(clip, 3000, 120, 0)
    and when I try to run the script in virtualdub, it shows me this message
    Error during script execution at line 1, column 10:Variable 'AVISource' not found
    Am I on the right track, or I missed something?
    Quote Quote  
  5. Member
    Join Date
    Dec 2005
    Location
    Canada
    Search Comp PM
    Source is an mp4 file?

    Code:
    a=ffvideosource("C:\Users\Superuser\Desktop\Titanic.mp4")
    SelectRangeEvery(a, 100, 25, 0)
    Code:
    # to keep the audio
    a=audiodub(ffvideosource("C:\Users\Superuser\Desktop\Titanic.mp4"), ffaudiosource("C:\Users\Superuser\Desktop\Titanic.mp4"))
    SelectRangeEvery(a, 100, 25, 0)
    # download http://code.google.com/p/ffmpegsource/downloads/detail?name=ffms2-2.18-rc1.7z&can=2&q=
    # and unzip the file ffms2.dll to the Avisynth/plugins folder.
    # Haali splitter may also be required to be installed
    # https://www.videohelp.com/tools/Haali-Media-Splitter
    Quote Quote  
  6. Originally Posted by sambat View Post
    Source is an mp4 file?

    Code:
    a=ffvideosource("C:\Users\Superuser\Desktop\Titanic.mp4")
    SelectRangeEvery(a, 100, 25, 0)
    Code:
    # to keep the audio
    a=audiodub(ffvideosource("C:\Users\Superuser\Desktop\Titanic.mp4"), ffaudiosource("C:\Users\Superuser\Desktop\Titanic.mp4"))
    SelectRangeEvery(a, 100, 25, 0)
    # download http://code.google.com/p/ffmpegsource/downloads/detail?name=ffms2-2.18-rc1.7z&can=2&q=
    # and unzip the file ffms2.dll to the Avisynth/plugins folder.
    # Haali splitter may also be required to be installed
    # https://www.videohelp.com/tools/Haali-Media-Splitter

    I downloaded the ffms and changed the script according to yours but the problem still here,
    Variable 'a' not found
    What's your advice?
    Quote Quote  
  7. You can use ffmpeg - there are at least 2(3 when fps conversion used) filters capable to do such thing - thumbnail seem to be best for such task, only one case is to create dynamic script where total length for movie can be used to create interval parameter for thumbnail...
    https://ffmpeg.org/ffmpeg-filters.html#thumbnail
    Quote Quote  
  8. Originally Posted by pandy View Post
    You can use ffmpeg - there are at least 2(3 when fps conversion used) filters capable to do such thing - thumbnail seem to be best for such task, only one case is to create dynamic script where total length for movie can be used to create interval parameter for thumbnail...
    https://ffmpeg.org/ffmpeg-filters.html#thumbnail
    Do you now what command line should I use to do what I am looking for?
    Thumbnail command seems to generate snapshots from the video not video splits to make a preview.
    Quote Quote  
  9. Originally Posted by master1024 View Post
    Now, I am stuck with this. I created this script file (.avs)
    Code:
    AVISource("D:\My Files\05 Videos\Videotomakeapreview.mp4")
    SelectRangeEvery(clip, 3000, 120, 0)
    and when I try to run the script in virtualdub, it shows me this message
    Error during script execution at line 1, column 10:Variable 'AVISource' not found
    Am I on the right track, or I missed something?
    You don't use file=>run script in vdub

    You open the .avs as a video file; file => open video file
    Quote Quote  
  10. Originally Posted by master1024 View Post
    Do you now what command line should I use to do what I am looking for?
    Thumbnail command seems to generate snapshots from the video not video splits to make a preview.
    This one works for me... feel free to modify (i use only key frames)

    Code:
    @ffmpeg -y -hide_banner -loglevel 24 -color_range 2 -skip_frame nokey -i %1 -an -c:v libvpx-vp9 -b:v 64K -speed 0 -tile-columns 0 -frame-parallel 0 -auto-alt-ref 1 -lag-in-frames 25 -g 9999 -aq-mode 0 -vf "scale=256:-2:sws_flags=bicubic:sws_dither=none:in_range=1:out_range=1,format=pix_fmts=yuv420p,thumbnail=5,setpts=N/(15*TB)" -dash 0 "%~n1_.webm"
    Quote Quote  



Similar Threads

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