iPod Video Conversion Part II: Subtitles & AviSynth

Written by rob on February 12, 2006 – 7:43 pm -

Note: A reader, cghera, pointed out that the program called Handbrake can automate this entire process. I recommend you give it a try. You can download the program here, and you can find the documentation here.

I have successfully figured out how to convert a video to iPod format and still keep the subtitles! I figured I would share this golden information with everyone else, since it took me so long to figure it out. I have been trying to do this ever since I got a PSP, and then a Video iPod. Neither device can understand subtitles in any format, so in order to have them you must embed them into the video itself. You see, DVDs have subtitles in a separate layer, completely separate from the video itself. That is why you can turn them on or off, or pick which language you want. Some movies have what are called “built-in subtitles”. For example, in Lord of the Rings the Elfish is translated to English at the bottom of the screen, whether you have subtitles on or not. If you were to convert your Lord of the Rings DVD to iPod version, those Elfish subtitles would still be there. So, the trick is making ALL the subtitles “built-in”. The key? A little program called AviSynth.

If you have a good memory, you will remember that when you installed the Videora iPod Converter it also installed something called AviSynth. That was one of the checkboxes you could turn on or off during the install. AviSynth is essentially a scripting language that you can use to edit videos. You use Notepad or any other text editor to edit these scripts, and then you use a separate program to actually interpret the script. MANY video programs today support AviSynth, as it is pretty much the most flexible and powerful video scripting platform available. Videora happens to also support it. You can write your script in notepad, save it as a .avs file, and then open that file in Videora as opposed to a video file (.avi, .vob, etc.). Videora automatically interprets the file, and then converts its output as if it was any other video.

Enough of the background information. Time to begin. You are going to need a few programs to follow this howto. For the sake of ease, you should probably just download them all now.

  1. Videora iPod Converter – This will install AviSynth as well as let you convert files to iPod format.
  2. SubRip – This will allow you to rip subtitle files out of .VOB files.
  3. DVD Decrypter – This is necessary to rip DVDs to your hard drive in the form of .VOB files.
  4. DGIndex – AviSynth unfortunately does not support .VOB files directly. You must run them through this first in order to make them compatible.
  5. BeLight – Necessary to convert .ac3 DVD audio files to .wav files readable by AviSynth, and makes sure they stay in sync.
  6. DirectVobSub – Used by AviSynth to actually show the subtitles.

Before we begin, open up My Computer and click on “Local Disk (C:)”. Now, right-click anywhere in the window that comes up and go to New, and then Folder. Name the folder “temp”. This will be the temporary folder we use to store all the in-between files that come before we can actually convert the video to iPod format.

The first thing you want to do is download and install DVD Decrypter. After it is installed, run it. In the menu bar, go to Mode and then IFO. Then go to Tools, Settings. In the box that comes up, go to the IFO Mode tab and where it says File Splitting, select None. Press OK to return to the program. Go to the Stream Processing tab, and enable Stream Processing. Uncheck all of the boxes except the main movie (should be the longest video there), the English language audio file (if there is more than one, go with the one that says 2ch). Now, here is the important part. Make sure you select the Subtitles stream you want (the language)! After these three things are selected, click the little folder under Destination. Browse to C:, and then the “temp” folder you created above. Now you can press the green arrow to begin. This will take about 8-25 minutes depending on the length of the movie and the speed of your CD drive.

Once the ripping process is complete, exit DVD Decrypter. Now it is time to download DGIndex. This program doesn’t actually have an installer program, so just decompress the ZIP file and run DGIndex.exe that is within the folder. In the menu bar, go to File, Open. Browse to C:, and then “temp”. You should see the ripped DVD file, which should be a single VOB file. Double-click it to open it. In the box that comes up, simply press OK. Now all you need to do in this program is go to Video, Field Operation, Forced Film. After that, just go to File, Save Project. It should already be in your temp folder, but if it is not you can browse to it now. Once you are in the right folder just press Save. DGIndex will then create a .d2v file which is able to be read from within AviSynth. This should take about three minutes.

DGIndex also separates the audio from the video and most of the time puts it in an .ac3 file. Open up My Computer and then browse to your C:/temp folder. There will be a file called something along the lines of “VTS_01_PGC_01_1 T01 48K 16bit 2ch”. It can be a variety of different things, but what you are really looking for is either an .ac3 or a .wav file. If it is .wav, you can skip to the next paragraph as you are ready to proceed. Otherwise, you have an .ac3 file. AviSynth unfortunately cannot read that, so we need to convert it. This is where BeLight comes in, so download that. Just like DGIndex, it has no install program so just uncompress and run the BeLight.exe. Press the Input button and browse to C:, and then temp. Select your .ac3 file. Select the WAV/PCM tab below the Output button. Make sure WAV, and 16-bits Stereo Wave are selected. You don’t have to change anything else, so just press the Start button. A black box with white text will come up that says transcoding… preceded by the current location in the movie. This process usually doesn’t take longer than five minutes. After it is done, close BeLight. You now have a video file and audio file compatible with AviSynth.

The next step is to actually get the subtitles out of the .VOB file. SubRip is the tool necessary to do this, so download that. Again, this has no installer, so uncompress and run SubRip.exe. Go to File, Open VOB(s). Press the Open IFO button. Browse to your temp directory and select the only file that will show up. This is the IFO file that is automatically made by DVD Decrypter (goes with VOB files). Open that up. Now, make sure that your desired language is selected under Language Stream. Now press Start. What SubRip will now do is what is called Optical Character Recognition (OCR). DVDs store subtitles as images, and not text. OCR converts the images to text so then you can specify your own font, etc. Just know that this will turn out much smoother than doing things any other way. The OCR will highly a letter (or multiple letters), and you need to type what they are. It is a lot of typing in the beginning. Make sure you type the right thing,or your subtitles will be messed up. After awhile, it will have all the information it needs and will finish OCRing the file. If you made a mistake, you can correct it by going to Character Matrix, Edit/View Characters Matrix. Anyway, when it is done I always like to go to Character Matrix, Save Character Matrix and save it to my temp folder. This is not necessary, but it ensures you’ll never have to redo the OCR process if something goes wrong later. To save the actual subtitle file we will use in AviSynth, goto File, Save As on the bottom (not the top window, but the bottom with black background and white text) menu bar. It will ask you the Font and Font Size. I keep the defaults, since Tahoma 10-point is nonobtrusive but easy to read. After you are satisfied with the font settings, press the Save button. Call the file subs, and make sure you save it in your temp folder. You can name it whatever you want, but you will have to change the AviSynth script to reflect the changes, so I don’t recommend it.

Now you have all three things you need to make the video: the video itself, the audio, and the subtitles. Now would be the time to install DirectVobSub. This program does have an installer, so just follow the steps until it is finished. It doesn’t install an actual program, but instead a plug-in for AviSynth we will soon use. So, now you can download and install Videora iPod Converter. Make sure you uncheck “Launch at startup”, and make sure that Avisynth is checked! That is the brains behind this entire operation. After it is installed, there is one last thing we need to do before we are ready to actually write the AviSynth script. Go into the folder where you uncompressed DGIndex (it is probably called DGMPGDec). There will be a file called DGDecode.dll. This is an AviSynth plug-in that we need to use. Right-click it, and select Copy. Now go to My Computer, C:, Program Files, and finally DirectVobSub. Right-click anywhere and select Paste. You should now see both DGDecode.dll and VSFilter.dll in this folder, in addition to the Uninstall program. We are now ready to write the script. I am going to take this time to say that AviSynth can do pretty much anything you can imagine – crop, resize, deinterlace, do your homework (Ok, maybe not that), etc. Futhermore, there are hundreds of plug-ins for AviSynth that increase its powers.
Anyway, open up Notepad. Paste the following into Notepad:

LoadPlugin("C:Program FilesDirectVobSubDGDecode.dll")
LoadPlugin("C:Program FilesDirectVobSubVSFilter.dll")

# SOURCE
video = mpeg2source("C:tempVTS_01_PGC_01_1.d2v")
audio = WavSource("C:tempVTS_01_PGC_01_1 T01 2_0ch 192Kbps DELAY 0ms.wav")
AudioDub(video, audio)

# SUBTITLES
TextSub("C:tempsubs.srt")

EDIT (08-08-2006): Kudos to Sneaker for helping me realize that the quotes in the AVS script were converted to “fancy quotes” by WordPress. This made the script fail to work if copied and pasted right from the site. It should now work!

You will need to go to your C:/temp folder now. Find your .d2v file. Right-click it and go to properties. In the box that comes up, select the file name in the top box, right-click and go to Copy. Then, paste the filename in the mpeg2source part of the script, replacing my “VTS_01_PGC_01_1.d2v” filename but leaving the C:\temp. Do the same thing with the .wav file, but this time paste in the WavSource part instead of mpeg2source. If you followed my instructions, your subtitles file should be called subs.srt, but if it isn’t you should change that as well. The plug-ins should be specified correctly as well. When you think the script looks good, save it in your temp folder as “script.avs”. The .avs part is very important, as it is what tells Videora to use AviSynth with it.

After your script is saved, you are pretty much done. The last thing to do is actually convert the file, so open up Videora iPod Converter. Before we do anything, we need to set up the Profile. Go to the Setup item in the side bar and click it. Then go to the Profiles tab. You need to pick an “Existing Quality Profile” to modify. Choose whichever one you have found works well for you. If you are unsure which to use, just use “MPEG-4/320×240/768kbps Stereo/128kbps”, as it is one of the best quality profiles but still makes a reasonable file size (only about 700MB for a two-hour movie). In the Profile Name box put whatever you want. I named mine “Subtitles Preset”. Now there are two key things we need to set. The first one is the resolution. Click in the Resolution box and set it to 368×208. This is to make the video widescreen, so the iPod doesn’t stretch it and make it look bad. The next thing to set is Framerate. Choose 29.97 fps. After that, you can tweak anything else you like but I don’t recommend it. Press Apply when you are finished. (Note: Don’t mess with the AviSynth script area. It may look tempting, but believe it or not we don’t use that.) Anyway, now head over to the Convert section of the program. Click Transcode New Video, and browse to your temp directory. Select the script.avs file you created in the previous paragraph (NOT THE VOB FILE). Select the quality profile you just created (e.g. Subtitle Preset in my case). Press the Start button. This will generally take about half the time of the movie (e.g. a two-hour movie will take one hour).

When it is done, you have an iPod-friendly video that contains subtitles! Add it to iTunes by dragging it to the Library item on iTune’s sidebar. Plug in your iPod, and now you can watch a subtitled video on your iPod! Using the SubRip method described above, the subtitles will be very easily readable on the 2.5″ screen. You can safely delete you temp folder after the video is successfully converted (make sure you test it first so as to not waste all your hard work!).

The above instructions may seem complex due to their verboseness. However, what you are actually doing is very simple. It is just a matter of making sure you remember to go through each program in the right order. Furthermore, you won’t have to make a quality profile every time. You can just use the one you created the first time. Also, you can use the same exact script with little to no modification each time (so make sure to save it somewhere other than your temp folder so you don’t accidentally delete it). Have fun making subtitle enabled videos for your iPod. The next edition will probably focus on converting videos specifically to view on an HDTV, something I am still struggling with.


Posted in Howto's, Tech | 46 Comments »

46 Comments to “iPod Video Conversion Part II: Subtitles & AviSynth”

  1. Kelly R Says:

    i tried all the instructions above. it took me a while to troubleshoot, but instructions were clear. i noticed audio/video out of sync — not noticable in first 30 min, but very much so in last third of movie. usually i have audio and video to convert at input rate. how do i fix? i’m not what step in the process converts to what fps rate.

    thx kelly

  2. rob Says:

    Most likely the A/V sync is getting messed up in the final process, where the AviSynth file is converted into MPEG-4 (iPod-compatible) video. One thing you can check right off the bat is playing the .AVS file. A great video player that supports AviSynth files directly is called VLC Media Player. It is available for most operating systems, including Windows. Once that is installed, open up the program. Then simply drag the AviSynth file into the VLC window, and it should begin playing. Skip to near the end and see if everything is in sync. If it is in sync in VLC Player, then it means there is a problem with the conversion. Otherwise, it will most likely be a problem with the Ripping itself.

    I’m going to assume it is a problem with the conversion, as that is the most common place I see this type of problem occurring. There are a couple of things to try. First of all, open up Videora, go to Setup, then to the Profiles tab. Select your Subtitles Preset (whatever you called it in the above steps) in the Existing Quality Profiles drop-down box. Now from here you can try one of two things. The first thing to try is to put the text “-async 1” (without quotes) in the box labelled Custom FFMPEG Flags. This rarely works, but it is worth a try. The next thing to try is to set the Framerate option to “Input” instead of “29.97”. That is likely to solve the problem. You may also want to try the two of them combined… that is, set the -async 1 option as well as the Framerate to Input.

    If those two things did not fix it, we are going to have to edit the AviSynth file. It has an option that helps solve these types of problems, called AssumeFPS. So, open up the AviSynth file in Notepad or some other text editor, and add the following two lines at the end of the file:

    AssumeFPS(2398,100,true)
    SSRC(48000)

    After that, simply load the new script into Videora. You should set the Framerate option under the Quality Profile to Input, and get rid of the -async 1 option if you still have it in there. This should definitely solve the problem.

    Beyond this, there are a few more things you can try. One thing you can try to do is figure out what FPS the DVD is using. VLC Media Player lets you view FPS if you go to View -> Stream and Media Info. However, it does not always show it. A general rule of thumb, though, is that American DVDs bought from a store are usually 23.976. American Home-made DVDs (or bootlegs) are usually 29.97. European DVDs are 25.0 fps. Once you find the exact FPS, you could put that into the Videora framerate box. Also, you could put it into the AviSynth script using the AssumeFPS option. Just replace the above 2398 with the FPS multiplied by 100. (e.g. 25.0 would be 2500; 29.97 would be 2997) A little experimentation will probably be necessary.

    One final thing to try is to use the program called PSP Video 9. It is made by the same people that made Videora iPod converter, but it is using a better version of ffmpeg in the background, and so has been known to be more stable with strange FPS inputs. PSP Video 9 behaves very similarly to iPod, but has some PSP-only features. Ignore them, and you should be able to navigate the interface fine. Then try simply converting the AviSynth script to 368×208 video; no other fancy options should be needed.

    If you need further help with using any of the programs mentioned above or things still aren’t working, let me know. The fastest way to get a response is probably just to e-mail me, though I do check this site at least once every two days. There are a couple more things to try, but they will be going vastly out of your way and probably won’t be worth it. Plus, the above information should solve 90% of a/v sync issues with Videora.

  3. Kelly R Says:

    i tried converting a 2nd time, this time w/29.97 fps and that fixed the audio delay.

  4. rob Says:

    Setting it to 29.97 is supposed to fix a lot of the audio delays. The reason DVD-Rips often have A/V sync issues is because the ripped video turns out to be 23.976 fps. Videora’s version of ffmpeg can only handle fps value up to the hundredth decimal place, meaning it truncates it to 23.97. While that isn’t all that bad at first, over time the .006 frames per second catches up with the audio and delays it. For every 100 minutes of video, the audio will be delayed a full one second. That is HUGE. Forcing it to be upscaled to 29.97 nullifies the decimal issue, since it only has two decimal places. I think the PSP Video 9 version of ffmpeg has this issue fixed, which is why it is often recommended in times when a/v sync becomes an issue. As you probably now know, watching a movie with even the slightest delay is really quite maddening, though at times can be hilarious (e.g. when you hear someone get punched before seeing it).

  5. fsbo-ty Says:

    Good site… Nice design

  6. john Says:

    great website thanks a lot . Your the man. how do you know so much

  7. rob Says:

    I am glad the information helped you.

    In the case of the above article, I learned it all by experimentation. You can ask most of my friends how long I have been trying to get subtitles imbued into files (ever since I got a PSP in June 05), and I just kept trying various things. Finally, when I wrote the article about Videora (and consequently learned how t use that program) and read on their message boards, I learned about AviSynth, and it was a bunch of experimentation later to figure out exactly how to do it.

    Due to the fact that it took me so long to figure it out, I wanted to make it easily accessible to others.

  8. john Says:

    thanks, but when i use Videora with all the settings suggested it takes about 5 hours to do the movie.
    The movies i get are downloaded threw morpheus could that be why they take so long in videora.
    Also can you put Dvds on your ipod and psp?

  9. john Says:

    if you can put the dvd on the psp or ipod will it mess up the dvd (the things you have to do to put it on the ipod or psp)

  10. rob Says:

    John: On a full-lenth movie, Videora may take some time if you have a slower computer. Be patient. What are your computer’s specifications? I am using a fairly high-end computer, which is why I may be converting faster than you. To tell you the truth, five hours isn’t that long. Transcoding video has long been a very complex operation, and even on the most modern computer, certain transcoding can take that long, if not longer. For example, on my aforementioned fairly high-end system, AVI to DVD-compatible MPEG-2 often takes around four hours.

    As far as putting DVDs on the iPod/PSP, see this article. It references ripping DVDs. After that, the process is exactly the same. As for damaging the DVD, there is little if any risk. Ripping DVDs is a read-only operation… that is, it does not modify the DVD in any way, but simply copies it to your hard drive. You do the conversion on the material that is copied to your local drive, and not from the DVD itself.

  11. john Says:

    Thanks a lot sorry if i am bugging you
    but can i also convert more than one video at a
    time like open up 4 videoras and convert

    if i can will it take any longer?

  12. rob Says:

    I am sure it is possible. I know I have had one Videora open and converting, while I had another open to write these articles (like looking up what the boxes said, etc.). However, I do not recommend converting more than one at once. The time it will take for all four simultaneously will more often than not be more than doing each of the four separately.

    I know that if I simply play video while converting to MPEG-2, it doubles the time it takes. I never tried converting two videos at a time, but I assume it will be detrimental to the process, and not help at all.

    On a totally different side note, one thing that may be worth trying is converting two videos at the same time on a dual core processor. 💡 With the right tweaking, you may be able to get each core to do a separate video conversion. I know there was a way in Windows XP to send a process to another processor (if you had more than one), so I assume that will work with multi-core systems as well. But this is all just theory… I don’t know if it would actually work.

  13. Francisco Says:

    What about if do i have an avi and a srt files? Which procedure do i need to include the srt to avi in the ipod?

    Thanks

  14. rob Says:

    You would pretty much be able to skip right to the part where I describe creating the AviSynth file. Then, you would delete the first line (that loads the DGIndex plug-in, since you won’t need that). Finally, you would modify the video line to read:

    video = AviSource(”C:\temp\movie.avi”)

    From there, the directions should be the same. Good luck!

    You may also want to run your srt file through SubRip to confirm everything, but that is wholly optional.

  15. Francisco Says:

    Excelent!

  16. sneaker Says:

    yo watsup

    iv been trying to get subtitles on my video for a long time, I pretty much followed ur instructions to the word. but when I go to convert and select to convert the script.avs it completes the trancode in like 5 seconds and no video file is visible. Iv spent hours on hours doing this, tried with 5 diffrent movies and still no progress. any suggestions would be really appreciated.

    thanks alot

    sneaker

  17. rob Says:

    Sneaker, check out the following that I posted above:

    One thing you can check right off the bat is playing the .AVS file. A great video player that supports AviSynth files directly is called VLC Media Player. It is available for most operating systems, including Windows. Once that is installed, open up the program. Then simply drag the AviSynth file into the VLC window, and it should begin playing.

    That is the best first step in troubleshooting. If VLC doesn’t play the file, then it means there is something wrong in the AVS file itself.

    On another comment I wrote this:

    … transcoding in one second is usually an indication that the AviSynth file is not loading correctly. Open up Videora iPod Converter and then go to Setup. Open the Console tab and check the box that says “Enabled Debug Console”. From there, go to Convert and do what you usually do. After the transcode completes in one second, go back to the Setup button, and the Console tab. It should have a bunch of things. Copy and paste the whole thing into here.

    Try that as well. You can either copy and paste the log into here, or e-mail it. Either way, I’ll take a look at it and see if I can figure out what is going on.

    Simply put, if your video encodes in 5 seconds or less, there is an error occurring. Enabling the Debug mode and looking at the log will let you know what that error is so you can more easily try to fix it.

  18. sneaker Says:

    ey its me again,
    sneaker,
    i tried what you did and the vlc player dint do anything…i deleted the .vob file from my folder, does that matter? Anyway i also did the debug test you suggested and this is what came up.

    sorry to bother you…

    *** Queue Empty
    *** Transcoding: C:\temp\script.avs.avs
    ### C:\Program Files\VideoraiPodConverter\apps\ffmpeg.exe -y -maxfr 30 -i “C:\temp\script.avs.avs” -title “script.avs” -timestamp “2006-08-03 11:09:13” -bitexact -vol 256 -vcodec xvid -s 368×208 -r 29.97 -b 1500 -acodec aac -ac 2 -ab 64 -f mp4 “C:\Program Files\VideoraiPodConverter\Videos\script.avs.mp4”

    ffmpeg version CVS, build 4759, Copyright (c) 2000-2004 Fabrice Bellard
    configuration: –enable-mp3lame –enable-faac –enable-faad –enable-amr_nb –enable-amr_wb –disable-ffplay –enable-small –enable-memalign-hack –enable-gpl –enable-xvid –enable-dts –enable-a52 –disable-vhook –enable-pthread –enable-x264
    built on Dec 1 2005 17:25:10, gcc: 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)
    [avs @ 0x7e0ab4]failed to open avs : Script error: expected a , or )(C:\temp\script.avs.avs, line 1, column 18)
    C:\temp\script.avs.avs: Error while opening file
    ### C:\Program Files\VideoraiPodConverter\apps\MP4Box.exe -add “C:\Program Files\VideoraiPodConverter\Videos\script.avs.mp4” “C:\Program Files\VideoraiPodConverter\Videos\script.avs_1.mp4”

    Unknown input file type
    Error importing C:\Program Files\VideoraiPodConverter\Videos\script.avs.mp4: Feature Not Supported
    (Feature Not Supported)
    *** Deleting: C:\Program Files\VideoraiPodConverter\Videos\script.avs.mp4
    *** Renaming: C:\Program Files\VideoraiPodConverter\Videos\script.avs_1.mp4
    Exception raised while deleting:
    System.IO.FileNotFoundException: Could not find file “C:\Program Files\VideoraiPodConverter\Videos\script.avs_1.mp4”.
    File name: “C:\Program Files\VideoraiPodConverter\Videos\script.avs_1.mp4”
    at System.IO.__Error.WinIOError(Int32 errorCode, String str)
    at System.IO.File.Move(String sourceFileName, String destFileName)
    at VideoraConverter.90dd1dfc310d6aad.doneJob(02a04fb4e6760e36 mainForm)

    if you see something wrong then pls let me kno. thanks alot man
    and btw i dint work when i had my .vob file ther so i deleted it

  19. rob Says:

    The VOB file may need to still be in the folder. I never tried deleting it so I don’t know if it’s required or not.

    Anyway, by the looks of the log it looks like it is having a problem reading your AviSynth file, meaning a syntax error. It says “expected a , or )(C:\temp\script.avs.avs, line 1, column 18)”, which means the problem may be on Line 1. However, there could be more than one problem. Also, the fact that VLC Player does nothing means that the AVS file is the source of the problem. If you could e-mail me the AviSynth file or paste it here, that should let me figure out what the problem with it is. Based on the error, I would guess you’re missing something simple like a parenthese or something, but I can’t really tell unless I see the contents of the file.
    While you’re waiting for my response, you can try to rip the DVD again and stick the VOB file where it was originally. I doubt that would create the error that Videora is giving you, but it still may make more problems for you later. I just can’t remember whether or not DGIndex makes a reference to the VOB or converts it. Sometime tells me its the former, which means you’ll need the VOB file to have everything work.

  20. sneaker Says:

    LoadPlugin(”C:\Program Files\DirectVobSub\DGDecode.dll”)
    LoadPlugin(”C:\Program Files\DirectVobSub\VSFilter.dll”)# SOURCE
    video = mpeg2source(”C:\temp\VTS_01_1.d2v”)
    audio = WavSource(”C:\temp\VTS_01_1 T01 3_2ch 448Kbps DELAY 0ms.wav”)
    AudioDub(video, audio)

    # SUBTITLES
    TextSub(”C:\temp\subs.srt”)

    this is the avisynth file and i put the VOB back in
    do u see anyerro

    thanks

  21. rob Says:

    That file looks almost exactly the same as the one I used above (with the exception of a different audio name). It should work in its current state. The fact that it does not leads me to believe that there is something missing.

    Going back to the line of the error you got (line 1, column 18) leads me to believe that there has to be something wrong with the first line (the LoadPlugin line). Unfortunately, it looks perfectly fine to me. The thing that usually causes the error you’re getting is if you don’t use quotes around the path to the plugin, but you are doing this. Like I said, the script itself looks fine so there must be a reason why Videora is throwing up on that line.

    Is DirectVobSub installed correctly? You can navigate to C:/Program Files/DirectVobSub and see if you can see the two required plugins.

    Also, if you want to test AviSynth you could do the following. Open Notepad and paste the following line:

    DirectShowSource(“c:\folder\myclip.mpg”, fps=29.97)

    Change the c:\folder\myclip.mpg part to the path to some AVI or MPG file on your hard drive. If you don’t have one, you can download one from Google Video (almost all videos on there let you save as AVI). Then save the Notepad file as “test.avs” and put it on your desktop or something. Load that into Videora and try to convert the AviSynth script that you just save. It should work with no problem, as this is a very simply AviSynth script.

    If it does, then we know AviSynth works right. If not, then AviSynth is the cause of your problem. In that case, uninstall Videora and reinstall it, making sure to check the AviSynth problem.

    Let me know how testing AviSynth goes, and also check that DirectVobSub directory for the plugins. My hunch tells me that AviSynth isn’t the problem, but it’s best to be safe and not leave any loose ends.

    If we still can’t identify a problem after this, we’ll have to get down to the real nitty gritty troubleshooting. If that becomes the case, you should e-mail me some form of IM username so we can talk without these 12-hour delays between each conversation. But we’ll cross that bridge as we come to it, as they say.

  22. sneaker Says:

    yo wutsup

    yeah, i tried the avi synth thing, it didnt work, and i made sure that the plugins were there. Next i uninstalled and reinstalled videora converter and still no progress. I”ll email you my AIM.

    thanks alot man .

  23. cghera Says:

    I was wondering if there is a way of converting a Divx or Xvid movie along with an .srt subtitle file to MP4 with the subs embeded?
    How would the script of avisynth sould be?
    I tried wiriting one but go a small video say that a , or ) was expected.

  24. rob Says:

    cghera, it is entirely possible! The wonder of using AviSynth is that you have access to literally every input file possible in Windows. There is a plug-in for everything.

    In your case, however, you don’t even need a plug-in. AviSynth has a built-in function called AviSource. This would replace the mpeg2source in the script posted above. Also, if you do that, you can omit the LoadPlugin(“C:/Program Files/DirectVobSub/DGDecode.dll”) since you won’t be loading a DVD file.

    Since the AVI file has both video and audio in it, you can theoretically simplify the whole script by removing the audio = and video = lines, and the AudioDub line, and then simply have an AviSource line. However, I recommend that you DO NOT do this. It can lead to problems with audio sync.

    Instead, you should separate the audio and video using VirtualDubMod. Once you download and install the program, open it up. Then go to File->Open and browse to your AVI file. It may mention something about rewriting a VBR header; say No to that and any other prompts regarding rewriting the file.

    After it is open, go to Video->Direct Stream Copy. Then go to Streams->Stream List. Select the audio stream you want (if there is more than one, else just pick the only one). Then press the save WAV button. Select where you want to save it and then wait. I recommend naming it something like movie_audio.wav. It takes like 2 minutes for a movie. After that is done, make sure it is still selected and press Disable. The stream will then have lines thru it. This means it won’t get exported when you save your AVI.

    Close this box and goto File->Save As. Browse to where you want to save the file, and make sure Direct Stream Copy is selected at the bottom. Then press Save. I recommend naming it something like movie_vid.avi. Once this is done, you will have an AVI file with only video, and a WAV file with only audio. This is what you want.

    Back in AviSynth, make a script that is very much like the main one I posted above. The only difference is instead of mpeg2source, change it to AviSource and give it the path to the file you just saved (movie_vid.avi if you followed my recommendation). Then for the WavSource line, modify it to the path of the wav file you saved (movie_audio.wav if you followed me recommend.).

    That is all there is to it. It may sound like a lot but this is a 5 minute procedure. Much easier than going from a DVD.

    Any questions or comments, please reply to this message.

  25. cghera Says:

    Hello,
    I am getting to you as a pain in the back but I got virtualdubmod, extracted it in a folder (no setup) replaced 2 files that were newer build and run the prog.
    I got a message about some divx files that are hacks and blah blah.
    I now load the file and get two black boxes saying “warning there is nothing to output bframe decoder lag”. I tried 2 different movie files that I have and got the same message.
    I am afraid I am doing something wrong. Sorry I am a new man in the video ripdecodeconvertochange world.

  26. rob Says:

    The no decoder message means that you are lacking the correct codecs to read in the file. Can you play these files in Windows Media Player? You should check into a program called GSpot. Downloading and installing it is simple. Then you can drag the movie file into it and it will give you a lot of details about it. In the top right is codec information. Copy and paste both the Codec box and the Name box into here, and then I’ll see if I can find out more about that.

  27. cghera Says:

    I can play the file in WMP but it plays in slow motion and no sound.
    I usually use Kmplayer to see these movies and it works just fine.
    Gspot 2.70a says codecs are installed Codec DX50 Name Xvid 1.0.3
    Thank you for your help.

  28. rob Says:

    Kmplayer can play pretty much anything. It uses its own built-in codecs that are not available to other applications.

    Anyway, I did some more research and it seems like you shouldn’t need to worry about the codec at all. The error that you get in VirtualDubMod should say something at the end to the effect of “Only Direct Stream Copy will work with this file.” That is fine, since that is all you need to use anyway. You should be able to click OK out of the box and follow my steps above. Don’t worry about trying to play the file in VirtualDubMod, it probably won’t work; however, you should be able to demux the audio as a Wav file and then save the video without audio using Direct Stream Copy.

  29. cghera Says:

    Hello….
    I am back again. If you are bored please tell me to stop. OK I got your instructions and managed to save a muted video. Then I tried to get the audio also which is Mpeg Layer 3 so the demux or save wav button saves an MP3 file only (if i save wav I actually get the same size and can hear nothing).
    Anyway I got the MP3 and can hear the sound and searching on avisynth found that if I use a NicAudio.dll plugin I could get MP3 as audio. But I added the line and for sound
    audio = MPASource(“myfile.mp3”) and finally got a message saying that MPASource is not supported or something. Sould I try to convert the MP3 to wav? would it work?
    Anyway because I want to offer something usefull to this nice blog I also discovered a utility called handbrake that converts DVDs directly to MP4 files along with subs. Only thing it works command line and a GUI I got did not work for me on the subs part.
    I am continuing however to search for a way (or a program) that will do the dvix job I was telling you. Thank you for your time and research.

  30. rob Says:

    You seem to be very knowledgeable… good job looking up the NicAudio plugin. However, I would recommend that you do convert the MP3 to WAV before inputting it into the AviSynth script. The WAV support is definitely; the “MPASource” seems unpredictable. You can use a program like the BeSweet GUI. The interface is a little daunting, but you should be able to handle it. If you use another program to convert audio, by all means use that.

    Let me know how you make out.

    Good find with the Handbrake, though. I had heard about it but didn’t do any research because I thought it was Mac only (and we all know that my Mac cannot handle video playback, let alone transcoding). I am going to put the link at the top of this article.

  31. cghera Says:

    ok thanx again with the help. Actually I did convert the MP3 to wav before seing your post but I used winamp and the disk writer plugin. Well I got an enormous file then … but I dont remember what failed afterwards, cause its 2 days almost and it was 2am. I also tried yesterday to use a prog called ripbot that used avisynth scripts and when I woke up this morning I tried to see the movie but the sound subs and video was in complete desync.
    anyway I will try again with your latest suggestions. Thanx once more.

  32. cghera Says:

    ok… seems that the process is doomed.
    Got the besweet gui, followed both the wizard and the gui and asked it to convert the MP3 to WAVE and as soon as I hit GO or if I copy paste the command to the prompt, I get nothing and a clear shiny and empty log.
    I am just one pixel before I start crying… I ll get back when I am better

  33. rob Says:

    I think your problems have to do with a strange file format. For some reason, Virtual Dub Mod didn’t like the AVI file and thus messed up the WAV process. I have never seen the Save as WAV function not work, so there is something odd about your file. Just FYI in reference to the huge file… WAV files are generally going to be large. For a full-length movie, anything under 1GB is perfectly normal. Even slightly above 1GB is common for longer movies with very high quality sound.

    You should check out the CCCP codec pack. http://cccp-project.net/download.php?type=cccp Install that and then see if you can run your initial AVI in Windows Media Player. Hopefully you will be able to, so then you can get rid of everything in the AviSynth script and simply use DirectShowSource(“path to avi file”), followed by the TextSub(“path to srt file”) command. Of course you would still need the LoadPlugin line for the VSFilter.

  34. cghera Says:

    Ok I got the CCCP codecs and installed them.
    I can see clearly the video in WMP. But When I write the script and try it on VLC player just nothing happens. Is there any log I can check?
    thank you once more.

  35. rob Says:

    Make sure the quotes in the script (in between the various parentheses) are regular quotes and not the so-called “smart quotes”. You know how Word changes the quotes so that there is a different character for open quotes and close quotes? That’s what I mean – you don’t want that because it reads as a syntax error for AviSynth.

  36. cghera Says:

    ok… seems that you were right about those quotes. And realized it just before I came to read your answer. The quotes were different…
    Thank you in advance. I am making my trial right now.

  37. cghera Says:

    guess what… I am back.
    Well I finally managed to embed those subs in the video but I have a problem with the resolution. The original is 564X308 but I have not managed to keep this ratio when I convert. I created a specific profile in Videora using the suggested resolution 368×208 but failed. I also used simpleresize plugin and stated there the resolution but I allways get a 4:3 distorted video.
    and if I dont it seems that it takes ages to convert it (I croped my video to 2mins so that I can see fast the results)
    Any ideas?
    Thank you again

  38. rob Says:

    Good to hear the embedding finally worked for you.

    The iPod is tricky with ratios. I recommend that you upgrade your iPod’s firmware to the latest (using iTunes). This will ensure that you can play the more high-resolution files.

    As far as I know, anything that equals less than 230,400 pixels should work with MPEG-4. I don’t know about AVC. I also know that Apple now has 640×480 videos on the store, but I don’t think I would go that far. The 564×308 resolution you described is definitely less than the 230k safe limit. I would try making a custom profile with that exact resolution, therefore resulting in no resize as far as this software goes. All the resizing would take place in realtime on the iPod.

    EDIT: I did some more research and found a post by someone named cvx_b, stating the following:

    230,400 max pixels rule w/16 rule:
    720 x 304 (2.35:1)
    624 x 336 (1.85:1)
    624 x 352 (16:9)
    512 x 384 (4:3)
    2500 bitrate (I know, overkill)
    29.97/30 fps

    Always 2 pass for both formats.

    Yours would be the 1.85:1 one.

  39. cghera Says:

    Ok your advice is really helpfull. However for a reason I dont know videora ipod converter insists on resizing to 320X240 no matter what resolution I set in my profile. HOWEVER… I have just bumped into this http://www.erightsoft.com/SUPER.html which seems to me like a piece of FREE gold. I just added my avs file and chose some bullets (Apple ipod) and I had an H.264 file in the size I wanted along with the subs.
    I hope that you will also find this utility useful, please tell me if you do, so I could say that I also helped you.
    I have a 5G generation ipod which has latest firmware.
    Thank you so much.

  40. rob Says:

    Good job in finding that utility. It sounds from the disclaimers on the site that the author really wants the software to be FREE forever. I am going to try that next time I need to do some converting.

    I must admit that I haven’t been converting videos for iPod/PSP in a long time, and so I’m not really up on the latest tools. This SUPER program seems to live up to its name.

    As for Videora, I think that program is starting to show its age. Even when they update the program, I don’t think they upgrade the ffmpeg version they are using to do most of the conversion. This is starting to show because of the stupid bugs you mention — the size not changing, etc.

    I’m glad you finally got things to work out, though! And you seem to now have a good feel for AVS files, which will make you succeed in the long run. Those scripts can really do a lot.

  41. eternallypuzzled Says:

    Hi. Thanks for the nifty tutorial. I, too, was hoping to make a script using an avi (xvid) source. I’m new to avisynth, so I’m having a bit of difficulty. When I attempt to convert with Videora, I get a 10 second shot with some red jibberish of writing on the screen. The video doesn’t open up. Basically, it didn’t convert. The conversion takes about 5 seconds! I’m obviously doing something wrong. But what? Maybe a missing plugin? A missing .dll? Could you walk me through it, as if I were a 3 year old? Thanks. Here is what I have for a script:
    —————————————-
    LoadPlugin (“C:temp\VSFilter.dll”)

    # SOURCE

    video = AviSource (“C:\temp\video.avi”)

    audio = WavSource (“C:temp\audio.wav”)

    AudioDub (video, audio)

    # SUBTITLES

    TextSub (“C:temp\subs.srt”)
    —————————————————

  42. cghera Says:

    Update… 🙂
    Well this utility made it on a smaller size file. When I try it on movie files it always produces an error which I cannot really find. I will try further however.
    have a nice day

  43. rob Says:

    eternallypuzzled, the behavior you describe is what happens when an AviSynth error occurs. It produces a very short black video with red text explaining the problem.

    Check out this comment above that I posted to Sneaker. First, as it says, run the AVS script in VLC Media Player. This should give you the black screen with red text, but you should be able to read what it says. There should be an error of sorts. Let me know what the error says. Also, as the comment says, you can enable the debug console and that should produce a similar error in the Videora. Let me know any errors you see.

    While you wait for my response to those errors, consider trying to SUPER utility mentioned by cghera a few comments up. It sounds like a much easier way to do this complicated task.

  44. eternallypuzzled Says:

    Thanks, Rob. I couldn’t use your procedure having the video and audio as separate files and then recombining them after. kept getting an error, as if avisynth wouldn’t recognize them. weird, cos i followed your example perfectly. i won’t worry about this because:

    I did manage to convert the video with subs burned on, but as one file (video and audio, as one). no sync issues at all! worked out sweet. thanks again for the help. i now have this little script permanently saved for future use 🙂

    Take care

  45. cghera Says:

    A few months later I come back just to tell that now the free utility videora ipod video converter is converting your videos to ipod format (MP4 or H264) along with subtitle support (embedded in the video). Only thing you do is having a .srt file along with your .avi having the same name both of them in the same folder.
    Ipod Classic is also supporting closed captions in the latest firmware.

  46. rob Says:

    Yeah this method is quite obsolete now, but back in the day it was the only way. :p