Hey everyone. Please help me.
I have a powerpoint slideshow (52 slides) with audio to convert to dvd. What I did was capture each frame with a screen grabber and convert it to a video. But the last frame has to be timed with an instrumental piece in the accompanying music track. So I encoded the first 51 slides as a video, calculating the fps to coincide with the non-instrumental part (the first part) of the music using vdub. Then encoded the last frame to go as long as the instrumental piece and joined the two parts together. But due to what I think is rounding errors (3 significant digits) sync is lost using this method, with about 4 seconds discrepancy at the end of the video and the instrumental piece isn't timed properly.
How should I go about doing this? It may seem vague what I'm trying to do, but I really thought I had it worked out. I can give more info about the whole idea but this has to be finished over the weekend. Is there any software that can stretch and squeeze video to match audio or am I stuck stretching the audio to match the vid?
Thanks
Dave
+ Reply to Thread
Results 1 to 12 of 12
-
-
hey guns1inger. that's my prob. I don't know what to use. I read a post somewhere about a certain app being able to do good slideshows but it isn't supported any more. I am using vdub.
What I did was calculate the fps from the number of frames. The song is 5m37.433 secs long. So dividing that by the number of frames gives how many seconds per frame. Inverse it to get fps. So I loaded the slides into vdub, set it to the fps above then converted to 25fps for PAL video. But there is about 4 seconds difference over the whole thing. I could just shrink the audio since 4 seconds out of 5 mins wouldn't be noticable, but prefer not to. There must be software to do this. How else could this be done? It doesn't have to be perfect, but 4 seconds is noticable.
I think I'm going about this the wrong way but have not seen the light yet. Any ideas? I had expected there to be an avisynth plugin or something for this type of thing.
Oh, and I did see there's an app to create slideshows and export to dvdauthor but after looking at it, maybe wouldn't allow the frame adjustment I need. Maybe I'm wrong there too??? Can't remember the name but something like DvdSlideshowGui or something?
Edit:
And why are you so tired? -
I would do it in Vegas (because that's what I have) where it is just a matter of putting the audio on the timeline, then adding the stills and dragging them out to any length required with single frame precision.
That said, your process seemed sound up until the "then converted to 25fps for PAL video" part. If you need PAL than all your calculations should be based on 25 fps from the start - no conversion necessary. I suspect this is where the sync issues have come from.
At that running time you have 8436 frames to work with, at 25 fps, which will give you slightly less than a frame full of silence at the end.Read my blog here.
-
If I were you, I would use AviSynth to:
first) create two "ImageSource()s" from your slides, one to display 51 pics, and
one to display the 52nd pic;
second) apply "UnalignedSplice" onto the "ImageSource()s";
third) "AudioDub" image sequence and music.
¿Full? and ¡official! info about Avisynth can be found @:
http://avisynth.org/mediawiki/Main_Page
HTH.
============== -
I'd love to use avisynth for all this. I'm already using it for the resizing and adding overscan borders. But I just can't work out how to get the correct number of frames with it. Or with anything else for that matter.
If I do it with Avisynth, then how and when does the framerate get set? Should I use ImageSource with an fps=1 and then adjust afterwards? That's what I tried with vdub and it didn't work. I have now made sure the audio "cut point" is on 25fps boundaries. But it seems to me that it would have to be a multiple of 51 so each slide has a whole-number of frames. I just don't see any functions in avisynth which would help in this. But if I calculate how many seconds-per-slide are required like I said in last post rounding errors seem to occur.
Please help someone. This is all backwards to what I normally do and it is starting to annoy me that I can't work it out. -
It's all ok now!
I had a read up about Avisynth's frame rate adjustment and it uses 64 bit precision internally, IIRC. So I did the following:
1) Import the slides with ImageSource, setting the fps to 1.
2) Use AssumeFPS to make each slide play for the correct amount of time, ie, fps=1/(time required for each slide)
3) Use ChangeFPS to convert to 25fps
Now it seems to be working beautifully. But can anyone tell me if the above method is ok as a general method, or could it cause problems on other projects? I imagine this may cause problems with actual video footage since frames would be blended a lot, but for a slideshow I'm hoping the above is fine.
Thanks for the help!
Dave -
You will always screw yourself changing framerates. If you have to change the framerate to 25fps then you are not calculating things correctly.
Essentially you need to work out how long each clip needs to last in second, then work out how many frames, at 25 fps, this is. That's it. Add them all together and you have your full length clip. No need to change the framerate at all. You seem to be making this much more complicated than it needs to be. It is a simple PAL project, so work on this basis from the outset.Read my blog here.
-
Well I sort of see now what I was doing wrong. And yes I'm making it more difficult than it needs to be.
But I still don't understand how to do it with Avisynth. Using ImageSource I get a video containing 51 frames. How do you turn those 51 frames into 8000 or so frames using only avisynth? In other words, how do you select every frame, duplicate it x amount of times then join the clips together? That's why I was doing the framerate conversion in the first place because it was the only way I could work out to get the required number of frames for the 25fps video. -
I did a similar project recently, but I used ImageSource() repeatedly in the script for each picture I wanted to use and defined the number of frames and framerate in the ImageSource command, like this:
Code:V0 = Imagesource("C:\Mandy\Mandy (01).jpg", End = 168, fps = 29.97) V1 = Imagesource("C:\Mandy\Mandy (02).jpg", End = 168, fps = 29.97) V2 = Imagesource("C:\Mandy\Mandy (03).jpg", End = 168, fps = 29.97) V3 = Imagesource("C:\Mandy\Mandy (04).jpg", End = 168, fps = 29.97) V4 = Imagesource("C:\Mandy\Mandy (05).jpg", End = 168, fps = 29.97) . . .
"Shut up Wesley!" -- Captain Jean-Luc Picard
Buy My Books -
As great as Avisynth and Virtualdub are, they are not always the best answer to every video question.
What video software do you have at the moment, preferably that you know reasonably well ?
If you do want to use avisynth then you need to think through the problem a bit more.
Work out how long the instrumental section is in seconds, then multiply by 25. Divide this by 51. You now know how long each of the first 51 frames needs to last. For the sake of this example, lets call it NumFrames. (We'll use this label in our script - below - and replace it with the actual number)
Create a simple avisynth script along the lines of
clip_01 = ImageSource("pathtoyourslides/slide01").Loop(NumFrames)
This simple script, where NumFrames is the number of frames each slide should last for, will give you one frame lasting for as long as you tell it to loop.
If you want to learn a lot more avisynth then you can learn how to code logic and make the next part a little less painful, otherwise, copy these two lines another 50 times, and alter the slide and clip numbers so that it look like this
clip_01=ImageSource("pathtoyourslides/slide01").Loop(NumFrames)
clip_02=ImageSource("pathtoyourslides/slide02").Loop(NumFrames)
clip_03=ImageSource("pathtoyourslides/slide03").Loop(NumFrames)
etc.
Finally, add a final line to the script that says
part_01=clip_01 + clip_02 + etc (where all the clips are added in order).
Save this and open it in virtualdubmod to test it. If all is well you should have a video that runs the duration of the instrumental part of the audio, with 51 slides displayed for equal periods along it's length.
So far, so good. Onto the final stretch.
Work out the number of frames the final clip needs to last for : (total running time of song - length of instrumental section) x 25. Lets call this Part2Length
Open your script and go to the end of it. After the final statement add
part_02=ImageSource("pathtoyourslides/slide52").Loop(Part2Length)
Where Part2Length is replaced with the actual number of frames.
Finally, add the following line to your script
Final_Clip=part_01 + part_02
Save it and test it in virtualdubmod.
Assuming it works correctly, you should now have single clip running the length of your audio track, with the first 51 slides evenly spaced across the instrumental section, and the last slide running for the balance of the track.
While still in virtualdubmod, click on Streams->Stream List. Click on Add and select your audio track. Click OK. If your system is fast enough you should be able to play the video and audio together to test how it fits. If not, encode it out to your HDD and test.Read my blog here.
-
Just saw GadetGuy's post, which is simpler again.
replace
clip_01=ImageSource("pathtoyourslides/slide01").Loop(NumFrames)
with
clip_01=ImageSource("pathtoyourslides/slide01", end=NumFrames, fps=25)
and duplicate it throughout for every image. Adding it all up at the end remains the same though.Read my blog here.
Similar Threads
-
Audio Syncing Issues
By Alexstarfire in forum AudioReplies: 6Last Post: 4th Jul 2010, 03:49 -
Syncing audio with d2v
By Norio in forum Video ConversionReplies: 8Last Post: 23rd May 2010, 01:07 -
Audio Syncing issue
By jmclean69 in forum DVD RippingReplies: 15Last Post: 4th Feb 2009, 15:34 -
editing/syncing audio
By angryassdrummer in forum EditingReplies: 3Last Post: 1st Sep 2008, 04:20 -
audio syncing
By projecttemp in forum AudioReplies: 3Last Post: 9th Apr 2008, 21:11