VideoHelp Forum




+ Reply to Thread
Results 1 to 11 of 11
  1. In order to save myself a lot of work in the future in case I need to re-encode my original files again and join them up into 1 file I would like to do the following:

    I have several parts of a video, each is of a different resolution and has different colour settings. Is there any way I could join them up (I already know how to do that) and then process the whole file with Avisynth by telling it to encode each part of the video with different settings?
    Quote Quote  
  2. Originally Posted by holygamer View Post
    In order to save myself a lot of work in the future in case I need to re-encode my original files again and join them up into 1 file I would like to do the following:

    I have several parts of a video, each is of a different resolution and has different colour settings. Is there any way I could join them up (I already know how to do that) and then process the whole file with Avisynth by telling it to encode each part of the video with different settings?
    If there aren't all that many different places to filter, then maybe trims are the easiest way:

    X=Last
    A=X.Trim(0,last frame).Filter here
    B=X.Trim(last frame+1,next last frame).Filter some more
    C=X.Trim(next last frame+1,more frames) #No filter needed
    D=X.Trim(more frames+1,0).Filter again
    A+B+C+D

    With a lot of filtering to do, especially the same filter used a bunch of different times, maybe Stickboy's RemapFrames is the way to go. Load it and then:

    BaseClip=Last
    SourceClip=BaseClip
    SourceClip=SourceClip.Filter
    ReplaceFramesSimple(BaseClip,SourceClip,Mappings="[firstframe lastframe] [firstframe2 lastframe2]")

    BaseClip=Last
    SourceClip=BaseClip
    SourceClip=SourceClip.Different Filter
    ReplaceFramesSimple(BaseClip,SourceClip,Mappings="[firstframe3 lastframe3] [firstframe4 lastframe4]")

    Call it as many times as you like.

    http://avisynth.org/stickboy/
    Last edited by manono; 16th Jun 2012 at 16:01.
    Quote Quote  
  3. Thanks. I'm still not sure how to use it though. Could you please give an example script? I just want to have a certain section of the video have 1 crop and another section of the video to have another crop.
    Quote Quote  
  4. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    This was used to reverse that annoying thing they do of squeezing the credits to one side while running a promo for another show in half the screen.

    Code:
    FFmpegSource2("612.mkv")
    Trim(0,67000)++\ 
    Trim(67000+1,67364).Crop(148, 314, -148, -62).AddBorders(0, 74, 0, 74, color=$2e4650).LanczosResize(720,576)++\
    Trim(67364+1,0)
    The AddBorders is to keep the same aspect ratio.
    Quote Quote  
  5. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    You are in for a world of hurt if you try encoding to different settings (resolution, framerate, codec, colorspace) and then try to join them up afterward. The main area where you CAN change and have it be innocuous is BITRATE.

    Scott
    Quote Quote  
  6. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by Cornucopia View Post
    You are in for a world of hurt if you try encoding to different settings (resolution, framerate, codec, colorspace) and then try to join them up afterward. The main area where you CAN change and have it be innocuous is BITRATE.

    Scott
    He said specifically he wants to change the cropping, thus my example.

    Avisynth will throw an error if the segments don't match on fps, framesize, etc, of course.
    Quote Quote  
  7. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    I just didn't want him/her to get too far in the process, and end up throwing their hands up because it wasn't a good idea to begin with. Figured someone had to mention it...

    Scott
    Last edited by Cornucopia; 10th Sep 2012 at 16:40.
    Quote Quote  
  8. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by Cornucopia View Post
    I just didn't want him/her to get too far in the process, and end up throwing their hands up because it wasn't a good idea to begin with. Figured someone had to mention it...

    Scott
    The initial post was a bit ambiguous.

    I think the source files are different specs and he wants to join them, thus needs to make them compatible, rather than trying to join as-is.
    Quote Quote  
  9. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Right. And the appropriate place for that is in a true NLE, not a "joiner".

    Scott
    Quote Quote  
  10. Member 2Bdecided's Avatar
    Join Date
    Nov 2007
    Location
    United Kingdom
    Search Comp PM
    You can load different files with different specs into AVIsynth, process them as you wish in AVIsynth, convert them to the same spec (resolution, frame rate, colour space) in AVIsynth, join them in AVIsynth, then output that single conformed video for encoding in one go. You can do all that in a single script.

    You can't join files with different resolutions preserving those different resolutions and load them into AVIsynth in one go. When you load something into AVIsynth it becomes a single clip within AVIsynth. A given clip within AVIsynth can have exactly one resolution, frame rate, and colour space.

    You can often drop a bunch of different files of different specs onto the same NLE timeline and have the NLE convert them all to the same resolution, frame rate and colour space for output - but IME, depending on the conversion this implies, most NLEs make a mediocre-to-poor job of this.

    Hope this helps.

    David.
    Quote Quote  
  11. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    If holygamer had trouble with that original AVISynth script, the job of converting and processing separately multiple different sections and joining with AVISynth would be insurmountable! That's why I suggested and NLE. It may be less than optimal at the conversion part, but it's consistent and will get him/her there without much hassle.

    Scott
    Quote Quote  



Similar Threads

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