VideoHelp Forum
+ Reply to Thread
Results 1 to 11 of 11
Thread
  1. My script the just loading and trimming Vid1 over and over. Thanks for the help.

    LoadPlugin("E:\ffms2\ffms2.dll")
    Vid1=DirectShowSource("C:\2014sd\1.mp4")
    Vid2=DirectShowSource("C:\2014sd\2.mp4")
    Vid3=DirectShowSource("C:\2014sd\3.mp4")
    Vid4=DirectShowSource("C:\2014sd\4.mp4")
    Vid5=DirectShowSource("C:\2014sd\5.mp4")
    Vid6=DirectShowSource("C:\2014sd\6.mp4")
    Vid7=DirectShowSource("C:\2014sd\7.mp4")
    Aud1=FFAudioSource("C:\2014sd\1.mp4")
    Aud2=FFAudioSource("C:\2014sd\2.mp4")
    Aud3=FFAudioSource("C:\2014sd\3.mp4")
    Aud4=FFAudioSource("C:\2014sd\4.mp4")
    Aud5=FFAudioSource("C:\2014sd\5.mp4")
    Aud6=FFAudioSource("C:\2014sd\6.mp4")
    Aud7=FFAudioSource("C:\2014sd\7.mp4")
    AV1 = AudioDub(Vid1,Aud1)
    AV2 = AudioDub(Vid2,Aud2)
    AV3 = AudioDub(Vid3,Aud3)
    AV4 = AudioDub(Vid4,Aud4)
    AV5 = AudioDub(Vid5,Aud5)
    AV6 = AudioDub(Vid6,Aud6)
    AV7 = AudioDub(Vid7,Aud7)
    AV1++AV2++AV3++AV4++AV5++AV6++AV7
    Crop(0,0,0,-72)
    BicubicResize(1280,648,0,0)
    Vid1 = Trim(18978,70586)
    Vid2 = Trim(7137,42154)
    Vid3 = Trim(5776,49625)
    Vid4 = Trim(8430,43872)
    Vid5 = Trim(7082,16808)
    Vid6 = Trim(5086,27747)
    Vid7 = Trim(9074,46257)
    AlignedSplice(Vid1,Vid2,Vid3,Vid4,Vid5,Vid6,Vid7)
    Quote Quote  
  2. I'm guessing it's getting implict "last" mixed up

    You should explicity say which video is being trimmed for Vid1 = Trim , Vid2 = Trim, etc...

    I would avoid DirectShowSource() when using Trim, as frame numbers can get mixed up (not necessarily frame accurate) . Why not use FFVideoSource() ? Since you're using FFAudioSource() for audio . You might have to use AssumeFPS(), because ffms2 sometimes gets the frame rate slightly off

    There is a wrapper function in the ffms2.avsi called FFMpegSource2, which does the audiodub() for you

    eg. this would use FFAudioSource, FFVideoSource, and AudioDub() in 1 step:
    Vid1 = FFMpegSource2("C:\2014sd\1.mp4", atrack=-1)
    Quote Quote  
  3. Originally Posted by poisondeathray View Post
    I'm guessing it's getting implict "last" mixed up

    You should explicity say which video is being trimmed for Vid1 = Trim , Vid2 = Trim, etc...

    I would avoid DirectShowSource() when using Trim, as frame numbers can get mixed up (not necessarily frame accurate) . Why not use FFVideoSource() ? Since you're using FFAudioSource() for audio . You might have to use AssumeFPS(), because ffms2 sometimes gets the frame rate slightly off

    There is a wrapper function in the ffms2.avsi called FFMpegSource2, which does the audiodub() for you

    eg. this would use FFAudioSource, FFVideoSource, and AudioDub() in 1 step:
    Vid1 = FFMpegSource2("C:\2014sd\1.mp4", atrack=-1)
    Separating the trims with commas didn't work. I also tried "++". I am not able to use FFVideoSource for some reason with my captured file but I am able to use it with videos I have already shrunk with Handbrake. Here is the media info of the mp4 that FFVideoSource will not open

    General
    Complete name : C:\2014sd\1.mp4
    Format : MPEG-4
    Codec ID : M4V
    File size : 3.00 GiB
    Duration : 19mn 50s
    Overall bit rate mode : Variable
    Overall bit rate : 21.6 Mbps
    Movie name : My Great Capture
    Description : Description here.
    Recorded date : 2014-02-09
    Encoded date : UTC 2014-02-09 08:46:17
    Tagged date : UTC 2014-02-09 08:46:17

    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : High@L4.0
    Format settings, CABAC : Yes
    Format settings, ReFrames : 2 frames
    Format settings, GOP : M=3, N=15
    Codec ID : avc1
    Codec ID/Info : Advanced Video Coding
    Duration : 19mn 50s
    Duration_LastFrame : 32ms
    Bit rate mode : Variable
    Bit rate : 21.4 Mbps
    Maximum bit rate : 30.0 Mbps
    Width : 1 280 pixels
    Height : 720 pixels
    Display aspect ratio : 16:9
    Frame rate mode : Constant
    Frame rate : 59.940 fps
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.387
    Stream size : 2.96 GiB (99%)
    Language : English
    Encoded date : UTC 2014-02-09 08:46:17
    Tagged date : UTC 2014-02-09 08:46:17
    Color primaries : BT.709
    Transfer characteristics : BT.709
    Matrix coefficients : BT.709

    Audio
    ID : 2
    Format : AAC
    Format/Info : Advanced Audio Codec
    Format profile : LC
    Codec ID : 40
    Duration : 19mn 50s
    Bit rate mode : Constant
    Bit rate : 216 Kbps
    Channel(s) : 2 channels
    Channel positions : Front: L R
    Sampling rate : 48.0 KHz
    Compression mode : Lossy
    Stream size : 31.4 MiB (1%)
    Language : English
    Encoded date : UTC 2014-02-09 08:46:17
    Tagged date : UTC 2014-02-09 08:46:17
    Quote Quote  
  4. If you're using directshowsource() for the video, why not use it for the audio as well ?

    Sorry I wasn't clear enough - I didn't mean separate them by commas . Use a name reference, instead of implicit "last"

    eg. If you meant to cut from the 1280x648 appended video , give it a name like "resized".

    (or did you mean to cut from each individual video - what numbers do your trim numbers reference to) ?

    Code:
    AV1++AV2++AV3++AV4++AV5++AV6++AV7
    Crop(0,0,0,-72)
    BicubicResize(1280,648,0,0)
    resized=last
    
    
    Vid1 = resized.Trim(18978,70586)
    Vid2 = resized.Trim(7137,42154)
    Vid3 = resized.Trim(5776,49625)
    Vid4 = resized.Trim(8430,43872)
    Vid5 = resized.Trim(7082,16808)
    Vid6 = resized.Trim(5086,27747)
    Vid7 = resized.Trim(9074,46257)
    AlignedSplice(Vid1,Vid2,Vid3,Vid4,Vid5,Vid6,Vid7)
    Last edited by poisondeathray; 13th Feb 2014 at 21:38.
    Quote Quote  
  5. I was able to use to use FFIndex and load my captured video. How do I load multiple sources with it? Also how do I trim each source.

    LoadPlugin("E:\ffms2\ffms2.dll")
    FFIndex("C:\2014sd\1.mp4")
    A = FFAudioSource("C:\2014sd\1.mp4")
    V = FFVideoSource("C:\2014sd\1.mp4")
    AudioDub(V, A)
    Crop(0,0,0,-72)
    BicubicResize(1280,648,0,0)
    Quote Quote  
  6. You shouldn't need to use FFIndex, it's automatically called by FFVideoSource and FFAudioSource or FFMpegSource2

    Use better names and variables. Give them each names to keep it organized

    To trim individual videos, use Trim immediately after you call the video (so implicit last is used), or explicitly use the variable name of the video before trim.

    Code:
    A1 = FFAudioSource("C:\2014sd\1.mp4")
    V1 = FFVideoSource("C:\2014sd\1.mp4")
    AudioDub(V1, A1)
    Crop(0,0,0,-72)
    BicubicResize(1280,648,0,0) 
    Vid1=last
    
    A2 = FFAudioSource("C:\2014sd\2.mp4")
    V2 = FFVideoSource("C:\2014sd\2.mp4")
    AudioDub(V2, A2)
    Crop(0,0,0,-72)
    BicubicResize(1280,648,0,0) 
    Vid2=last
    
    Vid1.Trim(100,200) ++ Vid2.Trim(500,600)

    In this example, Vid1 is trimmed from 100 to 200 , and appended to Vid 2 which was trimmed from 500 to 600. The trim numbers reference to the original video frame numbers from Vid1, Vid2 , respectively
    Last edited by poisondeathray; 14th Feb 2014 at 10:59.
    Quote Quote  
  7. Originally Posted by poisondeathray View Post
    You shouldn't need to use FFIndex, it's automatically called by FFVideoSource and FFAudioSource or FFMpegSource2

    Use better names and variables. Give them each names to keep it organized

    To trim individual videos, use Trim immediately after you call the video (so implicit last is used), or explicitly use the variable name of the video before trim.

    Code:
    A1 = FFAudioSource("C:\2014sd\1.mp4")
    V1 = FFVideoSource("C:\2014sd\1.mp4")
    AudioDub(V1, A1)
    Crop(0,0,0,-72)
    BicubicResize(1280,648,0,0) 
    Vid1=last
    
    A2 = FFAudioSource("C:\2014sd\2.mp4")
    V2 = FFVideoSource("C:\2014sd\2.mp4")
    AudioDub(V2, A2)
    Crop(0,0,0,-72)
    BicubicResize(1280,648,0,0) 
    Vid2=last
    
    Vid1.Trim(100,200) ++ Vid2.Trim(500,600)

    In this example, Vid1 is trimmed from 100 to 200 , and appended to Vid 2 which was trimmed from 500 to 600. The trim numbers reference to the original video frame numbers from Vid1, Vid2 , respectively
    Thanks that did load all the clips and trim them. Now I am getting an error in MeGui when I run a test file and use FFVideo. x264 error: ratecontrol_init: can't open stats file
    Quote Quote  
  8. Can you preview the final .avs in vdub or avspmod? Does it look ok ?

    Post the megui log file
    Quote Quote  
  9. Originally Posted by poisondeathray View Post
    Can you preview the final .avs in vdub or avspmod? Does it look ok ?

    Post the megui log file
    Yes the preview is fine in Windows Media Player and the preview that pops up for MeGUI.


    -[Error] Log for job14 (video, Copy_megui_otherx264_2.avs -> Copy_megui_otherx264_2_1.264)
    --[Information] [2/14/2014 11:21:56 AM] Started handling job
    --[Information] [2/14/2014 11:21:56 AM] Preprocessing
    --[Information] [2/14/2014 11:21:56 AM] Avisynth input script
    ---[NoImage] LoadPlugin("C:\Users\lguser\Documents\MeGUI_2418_x 86\tools\ffms\ffms2.dll")
    ---[NoImage] A1 = FFAudioSource("C:\Users\lguser\Documents\Downloads \Trey Canard REvival 41 Official Movie temp files\9.mp4")
    ---[NoImage] V1 = FFVideoSource("C:\Users\lguser\Documents\Downloads \Trey Canard REvival 41 Official Movie temp files\9.mp4")
    ---[NoImage] AudioDub(V1, A1)
    ---[NoImage] Crop(0,0,0,-72)
    ---[NoImage] BicubicResize(1280,648,0,0)
    ---[NoImage] Vid1=last
    ---[NoImage] A2 = FFAudioSource("C:\Users\lguser\Documents\Downloads \Trey Canard REvival 41 Official Movie temp files\10.mp4")
    ---[NoImage] V2 = FFVideoSource("C:\Users\lguser\Documents\Downloads \Trey Canard REvival 41 Official Movie temp files\10.mp4")
    ---[NoImage] AudioDub(V2, A2)
    ---[NoImage] Crop(0,0,0,-72)
    ---[NoImage] BicubicResize(1280,648,0,0)
    ---[NoImage] Vid2=last
    ---[NoImage] Vid1.Trim(0,600) ++ Vid2.Trim(0,600)
    --[Information] [2/14/2014 11:21:57 AM] resolution: 1280x648
    --[Information] [2/14/2014 11:21:57 AM] frame rate: 60001/1001
    --[Information] [2/14/2014 11:21:57 AM] aspect ratio: 160:81 (1.975)
    --[Information] [2/14/2014 11:21:57 AM] Job commandline: "C:\Users\lguser\Documents\MeGUI_2418_x86\tools\x2 64\x264.exe" --level 4.0 --preset slow --pass 2 --bitrate 3333 --stats "C:\Users\lguser\Documents\Downloads\Trey Canard REvival 41 Official Movie temp files\Copy_megui_otherx264_2_1.stats" --keyint 599 --vbv-bufsize 31250 --vbv-maxrate 25000 --merange 32 --subme 10 --trellis 2 --sar 1:1 --output "C:\Users\lguser\Documents\Downloads\Trey Canard REvival 41 Official Movie temp files\Copy_megui_otherx264_2_1.264" "C:\Users\lguser\Documents\Downloads\Trey Canard REvival 41 Official Movie temp files\Copy_megui_otherx264_2.avs"
    --[Information] [2/14/2014 11:21:57 AM] Process started
    --[Information] [2/14/2014 11:21:57 AM] Standard output stream
    --[Error] [2/14/2014 11:21:57 AM] Standard error stream
    ---[Information] [2/14/2014 11:21:57 AM] avs [info]: 1280x648p 1:1 @ 60001/1001 fps (cfr)
    ---[Information] [2/14/2014 11:21:57 AM] x264 [info]: using SAR=1/1
    ---[Information] [2/14/2014 11:21:57 AM] x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    ---[Error] [2/14/2014 11:21:57 AM] x264 [error]: ratecontrol_init: can't open stats file
    ---[Error] [2/14/2014 11:21:57 AM] x264 [error]: x264_encoder_open failed
    --[Error] [2/14/2014 11:21:57 AM] Process exits with error: 0xFFFFFFFF (-1)
    --[Information] [2/14/2014 11:21:57 AM] Job completed
    Quote Quote  
  10. Where is the 1st pass log? (Did you run the 1st pass?)

    Try encoding in CRF mode, to see if it actually encodes anything, this will help rule out other issues
    Quote Quote  
  11. Originally Posted by poisondeathray View Post
    Where is the 1st pass log? (Did you run the 1st pass?)

    Try encoding in CRF mode, to see if it actually encodes anything, this will help rule out other issues
    Oops that's my fault I forgot to click auto 2 pass instead of 2 pass. Thank you very much for all your help.
    Quote Quote  



Similar Threads

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