VideoHelp Forum
+ Reply to Thread
Results 1 to 5 of 5
Thread
  1. Member
    Join Date
    Jan 2011
    Location
    poland
    Search Comp PM
    I just made a simple script which takes 1 picture and one song as input and should give 4min movie output (song is 4min long).

    When I open that script in vDub I get only 41 sec output but when I open this script with mplayer I have full 4 minutes long movie.

    Could anybody explain why?
    Quote Quote  
  2. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    it might help a bit if you post the script.
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  3. Member
    Join Date
    Jan 2011
    Location
    poland
    Search Comp PM
    sure, here it comes (but keep in mind I'm just starting with avisynth and these are just commands taken from manual to exercise a little):

    LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\mpasource.dll")
    img = imageSource("c:\image.jpg")
    mp3 = MPASource("cong.mp3", normalize = false)
    audioDub(img,mp3)
    Quote Quote  
  4. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    ImageSource gives by default a video length of 1001 frames and a framerate of 24fps, which gives a duration of about 41 secs.
    So your video length is shorter than the audio - most players will continue playing the audio once the end of the video is reached, but it would be better to make them match.

    You can do this changing the script as follows:
    LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\mpasource.dll")
    mp3 = MPASource("cong.mp3", normalize = false)
    img = imageSource("c:\image.jpg", fps=25, start=1, end=ceil(25*AudioLengthF(mp3)/AudioRate(mp3)))
    audioDub(img,mp3)

    I've set the framerate to 25fps - change both 25's to something else if you want a different rate.
    Quote Quote  
  5. Member
    Join Date
    Jan 2011
    Location
    poland
    Search Comp PM
    Thank you.
    Quote Quote  



Similar Threads

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