INDEX  F.A.Q.  SEARCH  LATEST POSTS     Rules  Register  Profile  Private messages  Login


Login:   Username:  Password:   Log me on automatically    
Register I forgot my password I forgot my username Resend the activation key

Handling RealMedia with VirtualDubMod

Forum Index -> Video -> Video Conversion Printer-friendly version
Goto page 1, 2  Next
Reply to topic
Author Message
gastorgrab
Member


Joined: 29 May 2004

Post Posted: Jul 25, 2004 18:04 Posts View users profile Send private message Reply with quote

Quote:
It seems to work now. Updated (with help) - 10oct05


I was just screwing around the other day with Gabest RealMedia Source / Splitter filter when i realized an easy way to open RealMedia files in VirtualDubMod.

I have (1)AviSynth 2.56 installed as well as the RealMedia Splitter filter that came with RealAlternative.

(1)edit - see below (Wilbert)

I made the template;

-----------------------
#ASYNTHER RealMedia 30fps
[DirectShowSource("%f",30)]
-----------------------

and saved as "RealMedia_30fps.avst" and placed it in the VDubMod / Template folder. (as an experiment)

Works like a charm, provided you get the framerate right!

Quote:
Whats needed:

1. AviSynth 2.56
2. RealAlternative or the combination of RealPlayer and Gabest RealMedia Splitter
3. VirtualDubMod
4. AviCodec, or any application that can view the video properties of a *.RAM file
5. Notepad


Install AviSynth, and unpack VirtualDubMod to the directory of your choice.

Install RealAlternative, or if you have RealPlayer you'll need the RealMedia Source/Splitter DShow filter by Gabest (of Media Player Classic fame). The filter is available from SourceForge.net, without an installer, but InMatrix has an installer version of the same filter.

To my knowledge, there is only one file for both Win98-Me (non-Unicode), and Win2k-XP (Unicode), but InMatrix has two different installers????

This conversion relies on a built in function of VirtualDubMod, AviSynther. It's basically an AviSynth script generator, and works by using simple templates that make use of very basic AviSynth functions.

Inside the VirtualDubMod directory is a folder named "templates".



You can open them with notepad to view the contents;



(1)To create a new template simply open NotePad and past the text (without the dashes);
--------------
#ASYNTHER DirectShow_NTSC
[DirectShowSource("%f", fps=29.97, convertfps=true)]
--------------
or
--------------
#ASYNTHER DirectShow_FILM
[DirectShowSource("%f", fps=23.976, convertfps=true)]
--------------
or
--------------
#ASYNTHER DirectShow_PAL
[DirectShowSource("%f", fps=25, convertfps=true)]
--------------

and save to the VirtualDubMod / template directory (Assuming your source is NTSC. To be sure, use an application like AviCodec that determine the video properties) and give it a file extension of *.AVST.

I chose "DirectShow_NTSC.avst" so i could accomidate more than one framrate ("DirectShow_FILM.avst", or "DirectShow_PAL.avst").

(1)edit - see below (Wilbert)

To open a RealMedia file in VirtualDubMod, set "Files of type" to "All files", and browse to your source file. In the lower menu "Use AviSynth Template", choose your newly created template.



*DirectShow usually has no problem displaying RealMedia through Windows Media Player (or MPC), but AviSynth requires that the framerate be included before it will frameserve *.RAM.

Encode!

---------observations----------

Slower machines may produce bad audio synch after encoding, but decoding the audio and then reloading the *.WAV file should avoid the issue

Occasionally i load *.RAM files into TMPGEnc using RealAlternative, and choosing "Open / All Files", but sometimes the audio doesn't come through. Using VirtualDubMod, i'm able to decode to *.wav.

I've since made a few templates to cover the common framerates (12, 23.976, 25, and 29.97).

Opening the generated AviSynth script in TMPGEnc sometimes produces bad audio synch. Using the *.wav file extracted with VirtualDubMod solves this problem.

And again, Matroska files with RealMedia streams seem to open just fine using the same template.

In the package MKVToolnix is a command line tool "mkvinfo.exe" that HAS a hidden GUI built in. To access the GUI use a "-g" at the command line or make a shortcut with;



to produce;



Last edited by gastorgrab on Oct 10, 2005 15:46, edited 22 times in total


gastorgrab
Member


Joined: 29 May 2004

Post Posted: Jul 27, 2004 20:22 Posts View users profile Send private message Reply with quote

It seems to work with MKV's with RealVideo as well!

Tommyknocker
Banned


Joined: 27 Apr 2002
Location: The State of Frustration

Post Posted: Jul 27, 2004 20:53 Posts Comp View users profile Send private message Reply with quote

I followed your guide, and got this error:


_________________
Deck the halls with boughs of holly;
Fa la la la la la la la la!!!


Last edited by Tommyknocker on Sep 11, 2004 06:16, edited 1 time in total


gastorgrab
Member


Joined: 29 May 2004

Post Posted: Jul 27, 2004 21:25 Posts View users profile Send private message Reply with quote

Hmmm, i wonder whats different?

Does the generated AviSynth script play through DShow?

Well, i thought it might have something to do with difference in *.rm files so i downloaded a few off the web..............Mine still works fine, i don't know what to tell you.

Try this one; http://www.bunkus.org/videotools/mkvtoolnix/samples/real/VC-RV40/ ... 0_1Mbps.rm

Here's what i see;



Last edited by gastorgrab on Aug 10, 2004 17:35, edited 1 time in total


gastorgrab
Member


Joined: 29 May 2004

Post Posted: Jul 27, 2004 21:29 Posts View users profile Send private message Reply with quote

Tommyknocker wrote:
I followed your guide, and got this error:



I see the problem, if VirtualDub didn't like anything, it wouldn't like a file with a *AVS file extension. Your pic shows VirtualDubMod has identified a *.RM file extension.

You couldn't have loaded the template (see bottom menu in blue)





Last edited by gastorgrab on Jul 27, 2004 21:36, edited 2 times in total


Tommyknocker
Banned


Joined: 27 Apr 2002
Location: The State of Frustration

Post Posted: Jul 27, 2004 21:36 Posts Comp View users profile Send private message Reply with quote

AviSynth gives me an "Unspecified error".
_________________
Deck the halls with boughs of holly;
Fa la la la la la la la la!!!


gastorgrab
Member


Joined: 29 May 2004

Post Posted: Jul 27, 2004 21:38 Posts View users profile Send private message Reply with quote

and you have Real Alternative installed? (with Source / Splitter filter)

Tommyknocker
Banned


Joined: 27 Apr 2002
Location: The State of Frustration

Post Posted: Jul 27, 2004 22:20 Posts Comp View users profile Send private message Reply with quote

No, I didn't. Thanks.
_________________
Deck the halls with boughs of holly;
Fa la la la la la la la la!!!


ruger44
Member


Joined: 11 Nov 2003

Post Posted: Aug 13, 2004 09:22 Posts Comp View users profile Send private message Reply with quote

Hi, Thanks for the guide, I cannot get the audio to work though... sad.gif
And I do not see how to get it out other than recording it with aa-recorder and join it (which is hard to sync), as properties says there is no audio in my clips...


gastorgrab
Member


Joined: 29 May 2004

Post Posted: Aug 13, 2004 15:23 Posts View users profile Send private message Reply with quote

This is my first guide and some of the instructions may not be as clear as i intended.

As i said in the "observations" section of the guide, audio sometimes does not work correctly unless you extract the *.WAV file first and then load it as your audio source. (it looks like i only said it for TMPGEnc, sorry)

If the audio will play through your media player then try this;

1. Reopen the file by browsing for the *.AVS file.
2. Under the Streams Menu, see if the audio appears.



If the audio appears then;

3. "Save WAV"



4. When the "Save WAV" is finished, reload the WAV file as audio source.



5. Now highlight the original audio (Gray), and select "Disable".



6. Click "OK", and try your project again.

I havn't figured out yet why this is happening but hopefully this workaround will take care of the problem.


ruger44
Member


Joined: 11 Nov 2003

Post Posted: Aug 14, 2004 01:16 Posts Comp View users profile Send private message Reply with quote

Thank you for your help, but the problem is that the audio does not appear in Virtualdubmod properties at all!
When checked with AVICodec, that program sees the is audio.
I think your way of converting has potential, so I'll try to sort things out too!


mgh
Member


Joined: 12 Jan 2003
Location: India

Post Posted: Aug 14, 2004 22:19 Posts Comp View users profile Send private message Reply with quote

Does not work with rm files encoded with older versions . Use Real7ime convertor for those.

gastorgrab
Member


Joined: 29 May 2004

Post Posted: Aug 15, 2004 15:32 Posts View users profile Send private message Reply with quote

Oh, it's not foolproof!

Has the same limitations as RealAlternative. (even if you have the RealPlayer / RealMedia DShow Splitter combo)

RV10 won't play through RealAlternative (for me)

RV20 - works (for me)

RV30 - works (for me)

RV40 - works (for me)

Matroska format (MKV) - must use only 1 video, and 1 audio stream (remux to new file).

TMPGEnc seems to have fewer problems with audio synch, but you must load the audio stream separately (VDubMod - extract *.WAV). Yes, you can export AVI's from TMPGEnc!

Even if this guide goes nowhere, i hope the info will lead this community to a better solution.


Videomania
Member


Joined: 29 Apr 2001

Post Posted: Aug 16, 2004 01:44 Posts View users profile Send private message Reply with quote

I'm using Realalternative 1.23 and TMPG plus 2.52. I convert to mpeg 2. Same, no audio. I can't load the audio stream separately because I don't know how to demux real media file. How to solve the audio problem?
Thanks


gastorgrab
Member


Joined: 29 May 2004

Post Posted: Aug 16, 2004 15:21 Posts View users profile Send private message Reply with quote

When i encode MPEG's from RealMedia i do almost the same thing, but i use the method above (VirtualDubMod / AviSynth / RealAlternative) to extract the audio to WAV. I've never had a synch problem this way.

This method doesn't demux, it decodes. Even if you can demux the stream you still have to decode it.

I don't get audio from RealMedia using TMPGEnc either, but TMPGEnc handles the video much better than AviSynth.

Sometimes with AviSynth, even if the correct framerate is specified, the video runs too fast. This has the effect of adding blank frames to the video.

GraphEdit seems like the obvious solution but some people are intimidated by it.


Videomania
Member


Joined: 29 Apr 2001

Post Posted: Aug 17, 2004 06:43 Posts View users profile Send private message Reply with quote

I've solved it in another way. Decode the audio stream to wav using EO Video 1.36 to wav (takes few minutes) then to MP2 using Besweet, and remux with TPMG Mpeg tool. It works as well.
Yours method is good because most of softwares are free.


gastorgrab
Member


Joined: 29 May 2004

Post Posted: Aug 17, 2004 15:48 Posts View users profile Send private message Reply with quote

Videomania wrote:
Yours method is good because most of softwares are free.


It's the only reason i'm looking into a different method.


mgh
Member


Joined: 12 Jan 2003
Location: India

Post Posted: Aug 23, 2004 00:40 Posts Comp View users profile Send private message Reply with quote

load avisynth file
under frame rate
Source rate adjustment
tick
Change so video and audio durations match

or else- adjust the fps in the avisynth file so that the video and audio durations are shown equal in File Information


gastorgrab
Member


Joined: 29 May 2004

Post Posted: Aug 23, 2004 17:54 Posts View users profile Send private message Reply with quote

When the problem occurs, "Video Plays to fast", AviSynth fills the end of the file with black frames to make the Audio and Video durations match.

For some reason, changing the framrate in AviSynth has no effect. Remember its using the Directshow filter "RealMediaSplitter.ax", which is both RealMedia Source, and RealMedia Splitter.

I don't believe this filter is correctly passing the framrate through AviSynth.


DaMo
Member


Joined: 19 Nov 2001
Location: New Zealand

Post Posted: Jan 18, 2005 19:45 Posts Comp View users profile Send private message Reply with quote

I found your guide to be easy for short clips that I could then transfer to TMPGEnc and so far its worked on a majority of files that havent worked through other software like Boilsoft's RM Converter.

Some files are proving to be a little troublesome but I'm not gonna bother about that too much at the moment.

BTW, if anyone has a problem with audio/video synch issues then just look closely at a point in the file where someone says something and a scene cut occurs.

I tried this on a TV network ident and I judged it spot on where with other methods it had proved to be a major headache.


supergoku
Member


Joined: 13 Oct 2004

Post Posted: Oct 04, 2005 10:17 Posts View users profile Send private message Reply with quote

can any1 solve the audio/video synch problem? the above methods seems can't solve the audio/video synch issues.... if the problem solved, this will be the great for RM, RMVB to avi... smile.gif

Wilbert
Member


Joined: 17 Jan 2003

Post Posted: Oct 05, 2005 10:37 Posts View users profile Send private message Reply with quote

AviSynth v2.56rc1:

DirectShowSource("file.rmvb", fps=xxx, convertfps=true)

that preserves sync.


supergoku
Member


Joined: 13 Oct 2004

Post Posted: Oct 05, 2005 15:23 Posts View users profile Send private message Reply with quote

Wilbert wrote:

DirectShowSource("file.rmvb", fps=xxx, convertfps=true)

that preserves sync.


where should I write in this "DirectShowSource("file.rmvb", fps=xxx, convertfps=true)" line? in what file? how? Thanks


junkmalle
Member


Joined: 10 Feb 2004

Post Posted: Oct 05, 2005 18:58 Posts View users profile Send private message Reply with quote

I put it in the template file as gastorgrab suggested in the first post. Upon opening an RMVB file in VirtualDubMod AVISynth complained that "DirectShowSource does not have a named arguement "convertfps".

supergoku
Member


Joined: 13 Oct 2004

Post Posted: Oct 05, 2005 23:07 Posts View users profile Send private message Reply with quote

Do u mean that just replace "[DirectShowSource("%f",29.97)]" with this line "DirectShowSource("file.rmvb", fps=xxx, convertfps=true) "?

Thanks


junkmalle
Member


Joined: 10 Feb 2004

Post Posted: Oct 06, 2005 00:02 Posts View users profile Send private message Reply with quote

supergoku wrote:
Do u mean that just replace "[DirectShowSource("%f",29.97)]" with this line "DirectShowSource("file.rmvb", fps=xxx, convertfps=true) "?

Yes, but I left in the "%f" so you can use the template to open whatever file is selected from the Open File dialog. And of course the fps=xxx argument was changed to reflect the correct speed. I made two different templates one with fps=29.97, the other with fps=23.976:

-------------------------
#ASYNTHER RMVB 23.976fps
DirectShowSource("%f", fps=23.976, convertfps=true)
-------------------------
#ASYNTHER RMVB 29.97fps
DirectShowSource("%f", fps=29.97, convertfps=true)
-------------------------

But neither works because AVISynth rejects the convertfps=true argument. If I remove that argument the templates work but the resulting AVI file has audio sync errors.


Abond
Member


Joined: 05 May 2004

Post Posted: Oct 06, 2005 05:11 Posts View users profile Send private message Reply with quote

Maybe you can try with changefps=true.

Wilbert
Member


Joined: 17 Jan 2003

Post Posted: Oct 07, 2005 07:49 Posts View users profile Send private message Reply with quote

No, it's convertfps=true, and you need the latest AviSynth v2.56.

junkmalle
Member


Joined: 10 Feb 2004

Post Posted: Oct 07, 2005 11:04 Posts View users profile Send private message Reply with quote

Wilbert wrote:
No, it's convertfps=true, and you need the latest AviSynth v2.56.

I was using 2.5.5. After updating to 2.5.6 it is working. And indeed the problems with audio sync are gone! Thanks Wilbert.


supergoku
Member


Joined: 13 Oct 2004

Post Posted: Oct 07, 2005 18:47 Posts View users profile Send private message Reply with quote

the audio sync problem are solved! THanks

What is the best codec for video compression to avi(fast and good quality)? alparysoft? huffyuv? xvid? or other? any suggestion? Thanks smile.gif


Reply to topic All times are GMT - 6 Hours
Goto page 1, 2  Next
Forum Index -> Video -> Video Conversion Page 1 of 2





You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Jump to:  
Display:   
DVDFab DVD to DVD and Blu-ray to Blu-ray offers a 20% discount until Nov 22, 2009. More info or download trial!
About   Advertise   Forum Archive   RSS Feeds   Statistics