0
  1. I have a video with voice over.
  2. I extracted it's audio.
  3. I extracted a cutlist from adobe audition of this audio like this:

    Start: 00:00:12:00

    End: 00:00:13:00

    These are the parts that are silence and that are to be removed.

  4. I converted these to frames given 25fps video file.

  5. I created an avisynth file like this:

    AVISource("20130531_1303_46.avi")

    Crop(2,0,852,480)

    Trim(0,4-1) ++ Trim(50+1,0)

    Trim(0,34-1) ++ Trim(82+1,0)

    ....

    Each line contains the start(first trim) minus (sum of all differences between previous end and start) and end(second trim) minus (sum of all differences between previous end and start) - frames.

  6. I load this into virtualdub.

  7. I remove all silences in audition according to the cutlist and save as mp3
  8. I load the mp3 into virtualdub.

Problem: It's not in sync over the whole video, ie it starts in sync and after a while it drifts off in the positive direction(I have to enter a negative value of -3000ms for it to be in sync in the middle. Also it is chopped off more often than not.)

Means that something is wrong. I guess with the sum of all differences.

To understand this:

When you select a part in virtualdub and remove it, the total count of frames is the total count of frames minus the amount of frames the part has.

Example:

Frames 2-5 were removed. So it's basically 1-6-7-8-... left. According to a original time-frame relationship I would start at let's say 7. But 7 is now 3. And this adds up the more I remove.

So I thought: If I use the frame number minus the sum of all previously removed frames, I should cut at the right place.

I seem to forget something, what is it?

Brutus Cruciatus
  • 404
  • 3
  • 18

1 Answers1

0

I found the solution. If I use Start = 4 and End = 50 then I need to step

End - Start + 1 

forward and not

End - Start

But still, the 25fps resolution is too low, sometimes audio parts are chopped off.

Brutus Cruciatus
  • 404
  • 3
  • 18