VideoHelp Forum




+ Reply to Thread
Results 1 to 8 of 8
  1. Member
    Join Date
    Mar 2002
    Location
    chicago
    Search Comp PM
    I've got a Divx Mpeg4 file-25fps(according to VDub), and the .sub subtitle files that I want to add while frameserving with AVIsynth when I encode with either TMPG or CCE.
    I'm new to using AVIsynth, so I've been writing my script one line at a time, making sure the media player will still read the file after each addition. I'm getting stuck when I get to the Vobsub.dll line.
    I get the following error:
    the script's return value was not a video clip.
    here is my script:

    directshowsource("G:\temporary movie files\wolf1.avi")
    bicubicresize(576,480)
    loadplugin("c:\winnt\system32\vobsub.dll")

    any help would be greatly appreciated
    Quote Quote  
  2. Member
    Join Date
    Feb 2001
    Location
    Berlin, Germany
    Search Comp PM
    I think you have to change the order.

    loadplugin("c:\winnt\system32\vobsub.dll")
    avisource("G:\temporary movie files\wolf1.avi")
    bicubicresize(480,576)
    vobsub("G:\temporary movie files\wolf1")
    Quote Quote  
  3. Member
    Join Date
    Mar 2002
    Location
    chicago
    Search Comp PM
    Thanks for the quick reply
    the video is now playing, however the subs are not there.

    vobsub("G:\temporary movie files\wolf1")
    is the above pointing toward the video file, or the subtitle file?
    also, do I need to run VobSubconfigure first? when I do that, I can open the subtitle file, but the "ok" button remains greyed out.
    thanks again for the help
    Quote Quote  
  4. Member
    Join Date
    Mar 2002
    Location
    chicago
    Search Comp PM
    vobsub("G:\temporary movie files\wolf1")
    is the above pointing toward the video file, or the subtitle file?
    also, do I need to run VobSubconfigure first? when I do that, I can open the subtitle file, but the "ok" button remains greyed out.
    thanks again for the help
    ok...I just found a post over at doom9 saying that the above doesn't have an extention bcz in the path, there should be a .sub and .idx file...is there a way to extract/generate the .idx file from the .sub file? or, is there a way to use the .srt or .ssa files with avisynth?
    Quote Quote  
  5. Member
    Join Date
    Feb 2001
    Location
    Berlin, Germany
    Search Comp PM
    hmm, how did you create the subtitles? It sounds to me, that you have downloaded subtitle files and you are not sure which format it is.
    If the .sub file is created by vobsub, just open the .sub in vobsub config, write a new index and write an Avisynth script as shown above.

    If you have the subs in MicroDVD(.sub) format,
    http://www.vcdhelp.com/srtsubsvirtual.htm
    convert it to .ssa and load the subtitler filter for VirtualDub into your Avisynth script.

    AVIsource("D:\test\testtesttest.avi")
    ConvertToRGB
    function VD_Subtitler(clip clip, string filename)
    {
    LoadVirtualdubPlugin("C:\Program Files\VirtualDub-1_4_9\plugins"+"\subtitler.vdf", "_VD_Subtitler")
    return clip._VD_Subtitler(1, filename)
    }
    VD_Subtitler("D:\test\test.ssa")
    Quote Quote  
  6. Member
    Join Date
    Mar 2002
    Location
    chicago
    Search Comp PM
    I believe the subs are in MicroDVD format(the are .sub files), so I'll give that a try when I get home tonight.
    I have a few questions, though, about the script...


    1) is that the exact format I need, including the ended quotes and the (plus) like you have written?

    LoadVirtualdubPlugin("C:\Program Files\VirtualDub-1_4_9\plugins"+"\subtitler.vdf", "_VD_Subtitler")
    2) does the following need a path, and what do I need to enter in place of the "clip clip, filename" --ie, path/filename?
    function VD_Subtitler(clip clip, string filename)
    3) the "(1,filename)"--same question as question 2(path\filename?)
    return clip._VD_Subtitler(1, filename)
    4) why the "Convert to RGB" ?

    --thanks again for your all of your help --I'm still new at AVIsynth scripts
    Quote Quote  
  7. Member
    Join Date
    Feb 2001
    Location
    Berlin, Germany
    Search Comp PM
    AVIsource("D:\test\testtesttest.avi")
    ConvertToRGB
    function VD_Subtitler(clip clip, string filename)
    {
    LoadVirtualdubPlugin("C:\Program Files\VirtualDub-1_4_9\plugins"+"\subtitler.vdf", "_VD_Subtitler")
    return clip._VD_Subtitler(1, filename)
    }
    VD_Subtitler("D:\test\test.ssa")

    I do not use VirtualDub filters with Avisynth. I just copied it from the vdfilters.avs, that you can download here, the vdfilters.avs is part of the Avisynth 1.0b3 package.
    I only change the bold text, i.e. the pathes to the avi, ssa and .vdf. The rest I left untouched and it worked. I added the ConvertToRGB line, because my source was YUY2 and VDfilters work in RGB colorspace only.
    Now it's your turn to figure out, what the rest of the script means.
    Quote Quote  
  8. Member
    Join Date
    Mar 2002
    Location
    chicago
    Search Comp PM
    truman...
    thanks for all your help--I got it to work!
    ...at least with TMPG--CCE is being really fussy. although...I did forget to try the resampleaudio(44100) line in the script...
    thanks again!
    Quote Quote  



Similar Threads

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