Painkiller90
26th January 2006, 15:57
Hello, this is my first post to DOOM9 forum and I would like to offer some help with something that bothered me for a while and that is conversion of .rm and .rmvb files to avi using VirtualDubMod and Avisynth 2.56. There are other similar posts but I wish to share my solution to that problem too and I hope people will find my guide useful. Okay here we go.
First of all, you need to install the latest versions of Avisynth and VirtualDubMod, which can be found at the software section of Doom9.org,Real Player and Gabest's directshowsplitter (http://prdownloads.sourceforge.net/guliverkli/realmediasplitter_20051125.7z?download).After decompressing the file (the .7z format can be decompressed with the latest WinRAR or 7-Zip, you need to register the filter file, which has .ax extension.Extract the file in C:\windows\system directory.Go to Start>>Run>>Type :regsvr32.exe C:\windows\system\RealMediaSplitter.ax - Then Hit Enter.It should give a successful registration message. I also recommend using RMMuxer (http://elwood.webz.cz/RMMuxer.zip) to separate and encode separately the audio and the video part of the real media file you wish to process.
Step 1: Extracting video from the Real Media File
Unzip RMMuxer, run GUIMux.exe, press "Add" and select the .rm or .rmvb file. At the file tree, select the video stream and press Merge.Select the folder you want to save your file and add the .rmvb extension to the filename cause the program doesn't do it for you. See the pictures below:
5346
5347
Step 2. Opening the file in VirtualDubMod
Create a text file with Notepad and type the following:
#ASYNTHER RMVB 23.976
DirectShowSource("%f", fps=23.976 , convertfps=true)
Save the script in the Template folder of VirtualDubMod as "RMVB 23.976.avst".This script is to be used for rmvb files that have 24 fps.
Start VirtualDubMod. Go to "Tools", select "Script editor". Go to the template folder and open the script.
Then press "Edit", select "script handling" and choose avisynth, otherwise virtualdubmod will not recognise the "convertfps=true" line and it will result in badly desync video.
Then do the same but instead of 23.976 use 29.97. That template is to be used for files that are 30fps. Save that template and now it's time to open the file we extracted.
In VirtualDubMod, go to "file"->"Open file..", choose "all files" at "Files of type", choose the file choose the appropriate template according to the frame rate from "Use Avisynth template" at the bottom.See pictures below:
5349
5350
5348
Now use your favorite codec to encode the avi file. I will not give instructions on avi encoding as there are very good guides about that in Doom9.org.
Step 3: extracting and encoding the audio
Open the original .rmvb file (the one with the sound) in VirtualDubMod as described above. Go to "Streams"-> "stream list" and choose the audio track. Press "Save Wav". Encode the wav file with Besweet to whatever you want (mp3,ogg etc.) and then use Nandub or VirtualdubMod to join the two files( don't forget to choose "direct stream copy" for both). Before joining, go to "Video"->"Frame Rate" and check "change frame rate so video and audio duration match" so the video will be completely sync.
That's it. All done.
You can also encode the audio through VirtualDubMod with a simple procedure and without having to extract the video with RMMuxer. Open the original .rmvb file and go to "stream list" like before.Right-click on the audio file and choose "Full processing mode" and then compression. So VirtualDubMod will do both video and audio encoding. Though it's much simpler, it gave me a badly desync file...maybe I did something wrong. If you try it and it succeeds, let me know please.
I hope I've been helpful to the newcomers in the world of encoding.
Painkiller90
First of all, you need to install the latest versions of Avisynth and VirtualDubMod, which can be found at the software section of Doom9.org,Real Player and Gabest's directshowsplitter (http://prdownloads.sourceforge.net/guliverkli/realmediasplitter_20051125.7z?download).After decompressing the file (the .7z format can be decompressed with the latest WinRAR or 7-Zip, you need to register the filter file, which has .ax extension.Extract the file in C:\windows\system directory.Go to Start>>Run>>Type :regsvr32.exe C:\windows\system\RealMediaSplitter.ax - Then Hit Enter.It should give a successful registration message. I also recommend using RMMuxer (http://elwood.webz.cz/RMMuxer.zip) to separate and encode separately the audio and the video part of the real media file you wish to process.
Step 1: Extracting video from the Real Media File
Unzip RMMuxer, run GUIMux.exe, press "Add" and select the .rm or .rmvb file. At the file tree, select the video stream and press Merge.Select the folder you want to save your file and add the .rmvb extension to the filename cause the program doesn't do it for you. See the pictures below:
5346
5347
Step 2. Opening the file in VirtualDubMod
Create a text file with Notepad and type the following:
#ASYNTHER RMVB 23.976
DirectShowSource("%f", fps=23.976 , convertfps=true)
Save the script in the Template folder of VirtualDubMod as "RMVB 23.976.avst".This script is to be used for rmvb files that have 24 fps.
Start VirtualDubMod. Go to "Tools", select "Script editor". Go to the template folder and open the script.
Then press "Edit", select "script handling" and choose avisynth, otherwise virtualdubmod will not recognise the "convertfps=true" line and it will result in badly desync video.
Then do the same but instead of 23.976 use 29.97. That template is to be used for files that are 30fps. Save that template and now it's time to open the file we extracted.
In VirtualDubMod, go to "file"->"Open file..", choose "all files" at "Files of type", choose the file choose the appropriate template according to the frame rate from "Use Avisynth template" at the bottom.See pictures below:
5349
5350
5348
Now use your favorite codec to encode the avi file. I will not give instructions on avi encoding as there are very good guides about that in Doom9.org.
Step 3: extracting and encoding the audio
Open the original .rmvb file (the one with the sound) in VirtualDubMod as described above. Go to "Streams"-> "stream list" and choose the audio track. Press "Save Wav". Encode the wav file with Besweet to whatever you want (mp3,ogg etc.) and then use Nandub or VirtualdubMod to join the two files( don't forget to choose "direct stream copy" for both). Before joining, go to "Video"->"Frame Rate" and check "change frame rate so video and audio duration match" so the video will be completely sync.
That's it. All done.
You can also encode the audio through VirtualDubMod with a simple procedure and without having to extract the video with RMMuxer. Open the original .rmvb file and go to "stream list" like before.Right-click on the audio file and choose "Full processing mode" and then compression. So VirtualDubMod will do both video and audio encoding. Though it's much simpler, it gave me a badly desync file...maybe I did something wrong. If you try it and it succeeds, let me know please.
I hope I've been helpful to the newcomers in the world of encoding.
Painkiller90