VideoHelp Forum




+ Reply to Thread
Results 1 to 12 of 12
  1. Member
    Join Date
    Aug 2016
    Location
    Netherlands
    Search PM
    Ola!

    I'm making videos for my youtube channel every day, and i'm doing almost exactly the same for each of them. This is how it looks:

    - I have a mp4 video that is around 5 hours long
    - I record a clip of around 20 minutes out of that with VLC player
    - I import the clip into Adobe Premiere
    - I trim a clip of around 20 seconds from the 20 minute clip
    - I add the 20 second clip in front of the 20 minutes clip (intro)
    - I add an image overlay at the start of the clip (for 5 seconds or so)
    - Export

    Now this takes me about 1-1.5 hours and i feel like i can be more effective with this, but i'm not sure how ^^

    For the last 2 days i've been playing around with AviSynth, trying to make a script that will do all this for me. Conclusion is that i can't get it to work, i guess i'm missing some experience with these kind of programs and programming.

    Is there something else that might work for me? Or is the way i'm working now the way to go?

    Don't expect a full step by step plan how to make this work better but a push in the right direction would be nice

    Gr. Luffy
    Quote Quote  
  2. I record a clip of around 20 minutes out of that with VLC player
    Wouldn't it be faster to make a clip in an editor that supports "copy", ie without rencode, like AviDemux, XmediaRecode, Video To Video ...
    Quote Quote  
  3. Code:
    WhateverSource("5 hour clip.ext")
    #return(last) # enable this line to see the full video
    
    part1 = Trim(start_of_20_second_clip, five_seconds_into_20_second_clip)
    part2 = Trim(five_seconds_into_20_second_clip+1, end_of_20_second_clip)
    part3 = Trim(start_of_20_minute_clip, end_of_20_minute_clip)
    
    ovr = ImageSource("overlay.png")
    part1 = Overlay(part1, ovr, X=?, Y=?, opacity=?)
    
    part1 ++ part2 ++ part3
    It will probably take you a few minutes to locate the parts you want and the corresponding frame numbers. Open the script in an editor (like AviSynth) with "return(last)" enabled to get the frame numbers.
    Quote Quote  
  4. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    @Jagabo, Return(last) doesn't show me the frame numbers but adding he following and enabling them after Return(last) does:

    #ShowFrameNumber(scroll=true, x=400, y=27, font="Arial", size=24, text_color=$ff0000)
    #ShowTime(x=462, y=44, font="Arial", size=24, text_color=$ff0000)

    Should I need them or am I doing something wrong?
    Quote Quote  
  5. Member
    Join Date
    Aug 2016
    Location
    Netherlands
    Search PM
    @Videobruger, i'm going to look into this!

    Originally Posted by jagabo View Post
    Code:
    WhateverSource("5 hour clip.ext")
    #return(last) # enable this line to see the full video
    
    part1 = Trim(start_of_20_second_clip, five_seconds_into_20_second_clip)
    part2 = Trim(five_seconds_into_20_second_clip+1, end_of_20_second_clip)
    part3 = Trim(start_of_20_minute_clip, end_of_20_minute_clip)
    
    ovr = ImageSource("overlay.png")
    part1 = Overlay(part1, ovr, X=?, Y=?, opacity=?)
    
    part1 ++ part2 ++ part3
    It will probably take you a few minutes to locate the parts you want and the corresponding frame numbers. Open the script in an editor (like AviSynth) with "return(last)" enabled to get the frame numbers.
    Yeah, something like that i need! Only problem is that i couldn't get Avisynth to work with my mp4 files. I got it to play with ffvideosource("C:\eeuwww.mp4") but there was no sound. When i started searching i found out i probably need FFmpegSource but i can't get that installed, the Install manual (https://github.com/FFMS/ffms2/blob/master/INSTALL) is to much for me Almost nothing in there makes sense to me.

    Not sure if you can be of any help there? Would be awesome.
    Quote Quote  
  6. Originally Posted by Budman1 View Post
    @Jagabo, Return(last) doesn't show me the frame numbers but adding he following and enabling them after Return(last) does:

    #ShowFrameNumber(scroll=true, x=400, y=27, font="Arial", size=24, text_color=$ff0000)
    #ShowTime(x=462, y=44, font="Arial", size=24, text_color=$ff0000)

    Should I need them or am I doing something wrong?
    I meant you could open the script in an editor that shows you the frame numbers (like VirtualDub). But using ShowFrameNumber() will work too.
    Quote Quote  
  7. Originally Posted by Luffyy View Post
    Only problem is that i couldn't get Avisynth to work with my mp4 files. I got it to play with ffvideosource("C:\eeuwww.mp4") but there was no sound.
    ffvideosource() only opens the video. For video and audio:

    Code:
    v=ffvideosource("C:\eeuwww.mp4")
    a=ffaudiosource("C:\eeuwww.mp4")
    AudioDub(v,a)
    Quote Quote  
  8. Member
    Join Date
    Aug 2016
    Location
    Netherlands
    Search PM
    Originally Posted by jagabo View Post
    Originally Posted by Luffyy View Post
    Only problem is that i couldn't get Avisynth to work with my mp4 files. I got it to play with ffvideosource("C:\eeuwww.mp4") but there was no sound.
    ffvideosource() only opens the video. For video and audio:

    Code:
    v=ffvideosource("C:\eeuwww.mp4")
    a=ffaudiosource("C:\eeuwww.mp4")
    AudioDub(v,a)
    At work now, going to play with it tonight! Thanks!
    Quote Quote  
  9. Originally Posted by Luffyy View Post
    - I have a mp4 video that is around 5 hours long
    - I record a clip of around 20 minutes out of that with VLC player
    You can eliminate the VLC step -- just load it directly into Premiere.

    Originally Posted by Luffyy View Post
    - I import the clip into Adobe Premiere
    - I trim a clip of around 20 seconds from the 20 minute clip
    - I add the 20 second clip in front of the 20 minutes clip (intro)
    - I add an image overlay at the start of the clip (for 5 seconds or so)
    - Export

    Now this takes me about 1-1.5 hours and i feel like i can be more effective with this, but i'm not sure how ^^
    The time consuming part is identifying the parts of the clips you want to use. That's true whether you are using Premiere or Avisynth. At least in Premiere it's easier to see what you are doing. An hour to an hour and a half doesn't sound particularly unreasonable -- but see if you speed up after doing it a couple of times.
    Quote Quote  
  10. At least in Premiere it's easier to see what you are doing
    Which also can be done by laoding jagabo's script (#7) into AvsPmod, position the clips an using the frame no shown in AvsPmod and expanding the script into jagabo's (#3)
    Quote Quote  
  11. I don't see how avisynth is speeding up your workflow for this task. It's not really automating anything in this scenario. I think it would be faster in premiere, especially if the 20 seconds were made of of separate edits (a non contiguous section). The navigation and editing are faster


    The other time consuming part is re-encoding. Not only is there quality loss, it takes time, sometimes a long time - depending on your settings. Using a smart editor that supports "stream copy" like videoredo, solveigmm video splitter, tmpg smart renderer, etc.. will pass though the edits many times faster (basically limited by storage I/O transfer speed)



    If you're doing it in avisynth, I would use l-smash instead of ffms2. l-smash doesn't require indexing of mp4, so you're going to save time and index clutter on each video

    eg.
    Code:
    v=LSmashVideoSource("C:\eeuwww.mp4")
    a=LSmashAudioSource("C:\eeuwww.mp4")
    AudioDub(v,a)
    Quote Quote  
  12. You can even let AviSynth calculate the 5 second overlay segment for you. Combining some of the above scripts:

    Code:
    v=ffVideoSource("C:\eeuwww.mp4") 
    a=ffAudioSource("C:\eeuwww.mp4) 
    AudioDub(v,a)
    #return(ShowFrameNumber(x=20,y=20))  # enable this line to see the entire video with frame numbers
    
    part1 = Trim(start_of_20_second_segment, end_of_20_second_segment)
    part2 = Trim(start_of_20_minute_segment, end_of_20_minute_segment)
    
    part1a = part1.Trim(0, Int(framerate*5)) # 0 to 5 seconds
    part1b = part1.Trim(Int(framerate*5)+1, 0) # 5 seconds (+1 frame) to end
    
    ovr = ImageSource("overlay.png")
    part1a = Overlay(part1a, ovr, X=width-100, Y=height-100, opacity=1.0) # lower right corner, fully opaque
    
    part1a ++ part1b ++ part2
    Note that Trim() includes the starting and ending frames. So Trim(10,20) is 11 frames long, not 10.
    Quote Quote  



Similar Threads

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