VideoHelp Forum
+ Reply to Thread
Results 1 to 12 of 12
Thread
  1. Hi ****,
    in attachement I have do a video of my cat

    when I load it on virtualdub using the fmmpeg plugin OR using this avisynth script:

    Code:
    FFVideoSource("C:\Users\Administrator\Desktop\gatto\GOPR1406.MP4")
    duration of the video is: 5.78 seconds

    Click image for larger version

Name:	578.jpg
Views:	838
Size:	69.1 KB
ID:	28164

    But when I load it on virtualdub using this script:

    Code:
    FFVideoSource("C:\Users\Administrator\Desktop\gatto\GOPR1406.MP4")
    AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave()
    duration of the video become 5,80 seconds

    Click image for larger version

Name:	580.jpg
Views:	726
Size:	78.2 KB
ID:	28165

    can someone tell me why? How can I get 5,78 sec using the

    AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave()

    line? thanks
    Image Attached Files
    Quote Quote  
  2. The source has an odd number of frames and you're cutting the number of frames by half. You can't have half a frame at the end so it's being padded to fill out the last half frame.
    Quote Quote  
  3. thanks jagabo, I understand but what can I do?
    In timeline I have the video track that have +1 frame of the audio track
    Quote Quote  
  4. Member
    Join Date
    Sep 2012
    Location
    Australia
    Search Comp PM
    Code:
    AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave().Trim(0, last.FrameCount)
    Last edited by ndjamena; 28th Oct 2014 at 04:10.
    Quote Quote  
  5. The output video can only be 20 ms (the duration of one frame of the source) shorter or longer than the source.
    Quote Quote  
  6. my problem is that:

    from the gopr1406.mp4 I extract audio with ffmpeg using:

    ffmpeg.exe -y -i gopr1406.mp4 -filter_complex "[0:1] volume=1.5" -c:a pcm_s16le gopr1406.wav

    and this .wav have, in timeline, have duration of 05 sec 19 frames

    but using avisynth with the script

    Code:
    FFVideoSource("C:\Users\Administrator\Desktop\gatto\GOPR1406.MP4")
    AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave()
    or AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave().Trim(0, last.FrameCount)

    I have the video track that are 1 frames in excess (have duration of 5sec and 20 frames) so my nle don't "attach audio-video"
    how can I help my cat?

    Click image for larger version

Name:	TML.jpg
Views:	208
Size:	101.3 KB
ID:	28184
    Quote Quote  
  7. Member
    Join Date
    Sep 2012
    Location
    Australia
    Search Comp PM
    Oh, right, you're halving the frame rate. *2 /2 /2

    Um...

    That would mean each frame has twice the duration, if there were an odd number of video frames in the source then it's simply not possible to match that length, you have no choice but to extend the audio.
    Quote Quote  
  8. Originally Posted by ndjamena View Post
    Code:
    AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave().Trim(0, last.FrameCount)
    tryed but seems don't change the +1 frame problem.

    Can I tell to avisynth that have to trim 0 : lenghtOfGOPR1406.wav?
    Quote Quote  
  9. You cannot trim a video to half a frame accuracy.

    ndjamena's script had a few problems. last.FrameCount is the number of frames in the original clip, not the ~half length interlaced clip. FrameCount is the number of frames, not the number of the last frame (since the first frame is 0 the last frame is FrameCount-1). And Trim() includes the last frame in trim. So the correct command should have been:

    Code:
    AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave().Trim(0, last.FrameCount/2-1)
    But that will give you a video that's 20 ms shorter than the original audio rather than 20 ms longer. You'll have to trim the audio too.
    Last edited by jagabo; 28th Oct 2014 at 10:40.
    Quote Quote  
  10. Code:
    FFVideoSource("C:\Users\Administrator\Desktop\gatto\GOPR1406.MP4")
    AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave().Trim(0, last.FrameCount/2-2)
    in fact with this virtualdub (File information) get a duration of 5,72 second (should be 5,78) and in timeline duration is 5 sec and 18 frames (should be 5 sec and 19 frames to match audio)

    Quote Quote  
  11. I fixed the script before you posted. It ends in -1 now rather than -2.

    And, once again, YOU WILL NEVER GET S 5.78 SECOND CLIP WITH 25 FPS VIDEO.
    Quote Quote  
  12. 5,76 but it's ok in timeline!! thanks Name:  SMC.jpg
Views: 982
Size:  14.0 KB
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!