View Full Version : Is there any directshow filter for realmedia?
gabest
5th July 2003, 03:34
Well, there is now :) A demuxer and a video decoder (by using real's codec dlls) can be found here:
http://sf.net/projects/guliverkli/
Limitations:
- no audio decoder filters yet
- rv10 fourcc unsupported
- no streaming (of course)
- can crash anytime! :P
Sirber
5th July 2003, 03:42
hum...
What is that good for? :confused:
ChristianHJW
5th July 2003, 03:47
Originally posted by Sirber What is that good for? :confused:
:sigh: .... you'll see ......
Kurosu
5th July 2003, 03:57
Originally posted by Sirber
hum...
What is that good for? :confused:
Now you can (or should be able to):
- import the video into avisynth and do whatever you want with the video (and do some compare())
by using DirectShowSource()
- feed it to what I'll simplify as "directshow compliant" software (ie all players)
- have a basis for a realmedia->matroska transcoder
- giving more time to Karl for working on improving other parts of RealVideo9 :D
So... This is GOOD! I don't have a real use for it, but I believe many people will be very interested in it.
karl_lillevold
5th July 2003, 04:05
it works! very impressive. but still a few problems with certain bitstreams, seek etc. i am, however, sure gabest will figure those out.
@Kurosu:
import the video into avisynth and do whatever you want with the video (and do some compare())
I would not trust those numbers just yet, due to potential accidental color conversions from I420 to RGB to YV12, as well as mismatched timestamps relative to original source. Maybe I will just have to make sure you can get accurate PSNR numbers now :rolleyes:
RadicalEd
5th July 2003, 04:22
my initial reaction:
HOLY S**T
O_O
my reaction 10 minutes later...
HOLY S**T
O_O
now if only there were a way to use it without realone installed, all those guys on amv.org could stop bitching about rm forever :/
EHQ + dupedrop + rm dshow filter + tweaks to the codec all at the same time = splooge all over the place XO
Atamido
5th July 2003, 04:26
Originally posted by Kurosu
Now you can (or should be able to):
- import the video into avisynth and do whatever you want with the video (and do some compare())
by using DirectShowSource() This could be very bad because AVISynth uses Constant-Framerate. If you use the Dupe-Drop filter, then your timecodes will get pooched.
Animaniac
5th July 2003, 05:00
Is there anything Gabest can't do? :D
RadicalEd
5th July 2003, 06:55
hmm... I'm trying to figure out why the video stream output pin from the ogg splitter refuses a connection to the realvideo decoder input while a regular rmvb file rendered as an output video stream will..
>_><_<
I'm not trying to mux realvideo in ogm :o no sir.. no.. >_<
Animaniac
5th July 2003, 07:22
I tried transmuxing an RMVB to MKV using this filter and your Matroska Muxer. GraphEdit let me do this, it also built the correct graph for playback, but when playing it just get a green screen. Using Tobias's filter I can mux an OGM with RV9, but the playback filter graph cannot be built.
gabest
5th July 2003, 07:33
Ogm won't work because the muxer does not save the appended data after VIDEOINFOHEADER, and matroska needs the not yet released muxer and splitter filters. But matroska will work surely as we have tested it.
For me it doesn´t work:
I can open realmedia now, it also show correct time and the window of wmp6.4 resizes to the video size, but there is no video. Just the moving wmp6.4 logo, like at the beginning of loading a asf-file.
What Dlls do I need to install? RealOne is installed and I copied the helix-dlls into the system32-directory (win2k SP3).
I don´t know if you already know that:
-ffmpeg decodes rv10, so maybe ffdshow supports it, too.
-The audio "dnet" (DolbyNet) is AC3, you can simply output it as ac3 stream, AC3Filter will decode it. Unfortunately all other decoders only decodes correctly with a samplerate of at least 32kHz.
-There is also a open-source decoder for 14_4 (RA1) and 28_8 (RA2) in ffmpeg.
Kurosu
5th July 2003, 13:14
Originally posted by Pamel
This could be very bad because AVISynth uses Constant-Framerate. If you use the Dupe-Drop filter, then your timecodes will get pooched.
Originally posted by karl_lillevold
I would not trust those numbers just yet, due to potential accidental color conversions from I420 to RGB to YV12, as well as mismatched timestamps relative to original source. Maybe I will just have to make sure you can get accurate PSNR numbers now
Well, I would assume RealProducer is being fed with a constant framerate videosource, and thus the frame dropping still preserve the timestamps of other frames. Now, what is needed is that if a non-existing frame is requested, the last valid frame is returned. That should solve the frame mismatch, unless there's a really particular thing done.
Now with the colorspace conversions... Drop the realmedia file into graphedit, and I hope the graph used to render the file should be displayed: if a color conversion occurs, you should be able to see it (unless it happens internally to one filter). On my setup with a RV9 file, here's what I get with the karl's encode of the anime trailer with dropedude filter:
RV9 file (stream 0) [Subtype unknown RV40, 712x380, 12bits]
-> RV decoder[Xform out: YUY2 712x380, 16bits)
-> AviDecompressor[out: RGB32 712x380 32bits]
-> Video rendered.
There's indeed colorspace conversion. If I open it via avisynth:
DirectShowSource("T03_RV9_EHQ_DD_2pass_211kbps.rmvb").Info()
I get the following info:
720x480,YUY2
So it's a no-go for a accurate comparison for now, as even I420->YUY2 can have various results, depending on the upsampling used (simple copy vs the typical 75/25% or 50/50%). In that regard, it could be interesting to know if the upsampling used by RV codec is one of those typical ones. Or maybe Gabest can do some more magic and manage to request YV12 on output (but maybe RV40 codec doesn't allow this).
Anyway, compare() aren't possible for now, as Karl's "T03_RV9_EHQ_DD_2pass_211kbps.rmvb" (see this thread (http://forum.doom9.org/showthread.php?s=&threadid=56392&perpage=20&pagenumber=4)) is reported as having 2460 frames (while it is really 2471). As I don't think there are only 11 frames dropped, I would think the current implementation maybe forgets one frame out of each segment where a framedrop occurs in the rmvb file.
In the end, I do agree that if it seems possible, it's far from sure that everything is going fine, as users' feedback in this thread shows it.
Sirber
5th July 2003, 14:15
RV9 in matroska... sounds great :D
Will we be able to store RA also?
kilg0r3
5th July 2003, 14:26
Subtitles with directvobsub (VSfilter) coming into view!
Thank you gabest. Beside being an able programmer, it seems you really have a feeling for what the current needs of the av community atm. Thx again.
EDIT:
Just did a short test with srt subtitles and VSfilter ,and,it worked quite well. Only some jerkyness and crashed only once in 10min.
Gabest, I very much hope that this project has a relatively high priority. I'd really love to postprocess 'real' output with some nifty ffdshow settings :D
Dark-Cracker
5th July 2003, 16:09
hi,
using directshow source in avisynth work like a charm .
however u need to enter manually the FPs of the video.
do u need add "assumefps(XX)" because rmvb was variableframerate ?
PS: u can get the fps using my rmvb shell extension :)
Bye.
gabest
5th July 2003, 16:18
The "RealVideo Decoder" outputs YUY2 or YV12 only, this might be a problem on older windows' where there is no vmr7 as the default renderer to connect yuv outputs directly. On those older OSs if the player is not using the overlay mixer (like wmp64) there will be a need for a colorspace converter codec (msyuv or huffyuv wrapped by avi decoder) just to build the graph (as Kurosu noticed). But this doesn't mean if you open with avisynth there will be a color conversion too. When avisynth opens something using directshow, it first removes everything after the decoder filter and connects its own renderer to capture the frames, which has no limitations in the color space, it can be YUY2 or YV12. But I'm not sure if it will choose YV12, because that's the secondary output media type, maybe v2.5 and above will, I'll need to check this. YV12 output would be lossless, and YUY2 is produced by doubling the resolution of the u/v planes by averaging the missing pixels from the surroundings.
S_O: Thanks for the codec list, this could make my work much easier! Also, there is ACELP.net sipro lab dshow decoder I wanted to try :)
Dark-Cracker: I can get the fps already, but avisynth can't find it out from the media type for some reason.
kastro68
5th July 2003, 16:34
Originally posted by Animaniac
Is there anything Gabest can't do? :D
I believe there is one thing I know of that Gabest can't do.
I am certain that Gabest cannot lick his elbow with his tongue.
This task should be impossible for nearly everyone.
...how many people out there actually tried licking their elbow?
Kurosu
5th July 2003, 16:51
Originally posted by gabest
But I'm not sure if it will choose YV12, because that's the secondary output media type, maybe v2.5 and above will, I'll need to check this.
Dark-Cracker: I can get the fps already, but avisynth can't find it out from the media type for some reason.
I postponed my study because of the number of frames issue, but DirectShowSource doesn't seem to have (contrary to AviSource - DirectShowSource is probably rather old) an option to try to force a colorspace. In fact, I wonder what it really retrieves from the infoheaders, as it doesn't read (o hardly get) the fps info, and you have to force it using the fps option.
YV12 output would be lossless, and YUY2 is produced by doubling the resolution of the u/v planes by averaging the missing pixels from the surroundings.
Karl will correct us on that, but I think RV9 outputs a particular YV12 called I420 (chroma planes inversed). Secondly, the chroma upsampling code is still unknown: chroma copy is as widely used as averaging.
The "RealVideo Decoder" outputs YUY2 or YV12 only, this might be a problem on older windows' where there is no vmr7 as the default renderer to connect yuv outputs directly.
Or messed up systems that, even with directX 9 installed, a rather decent (less than 2 years old and able to overlay in YV12) and VMR9 available, can't handle VMR9 (ie that have a black/green/NULL display when using this option in MediaPlayer Classic)
JagPanzer
5th July 2003, 16:51
Originally posted by kastro68
I believe there is one thing I know of that Gabest can't do.
I am certain that Gabest cannot lick his elbow with his tongue.
This task should be impossible for nearly everyone.
...how many people out there actually tried licking their elbow?
LOL! :D
And Gabest, nice work. ;)
gabest
5th July 2003, 17:27
Karl will correct us on that, but I think RV9 outputs a particular YV12 called I420 (chroma planes inversed). Secondly, the chroma upsampling code is still unknown: chroma copy is as widely used as averaging.Yes, the output is I420 and I swap the color planes for YV12, there is no info loss here, the data remains the same what the codec output.Or messed up systems that, even with directX 9 installed, a rather decent (less than 2 years old and able to overlay in YV12) and VMR9 available, can't handle VMR9 (ie that have a black/green/NULL display when using this option in MediaPlayer Classic) VMR9 can't do overlay and will only accept the formats the video card can color convert to RGB, typically YUY2 (and its variations) is the only one today. VMR7 however can use overlay and accepts YV12 just like the overlay mixer, but since YUY2 gets enumerated first on the rv filter's output pin they will all connect with YUY2 too. But that was not without a reason, I find YUY2 rendering faster somehow...
karl_lillevold
5th July 2003, 17:45
On the topic of I420 and YV12, and the conversion to and from these formats, I just posted information about the Helix YV12/I420 VFW codecs (http://forum.doom9.org/showthread.php?s=&threadid=56972), in case these are of use to anyone. I use them daily, and figured others might find them useful too, so I cleaned them up, made sure there is no loss going between the two formats ("Fast recompress" in VirtualDub), and added an installer.
midiguy
6th July 2003, 03:00
Yes! Thank you Gabest! Now that there is a directshow decoder, does that mean that the realvideo renderer will not be used?
midiguy
6th July 2003, 03:09
ummm, call me an idiot, but what exactly do I do with the .ax file?
Schultz
6th July 2003, 03:12
Originally posted by midiguy
ummm, call me an idiot, but what exactly do I do with the .ax file?
Just put it into your system dir (Win9x) or system32 (Win2k/XP) and then just run
regsvr32 filename.ax
midiguy
6th July 2003, 04:48
Originally posted by Schultz
Just put it into your system dir (Win9x) or system32 (Win2k/XP) and then just run
regsvr32 filename.ax
works, thanks.
phrentec
6th July 2003, 19:25
Is this going to allow openning of realvideo files directly into virtualdub because i just tried it and it didn't recognize it but wmp6.4 was still able to open it just fine. but yeah still a great work in progress Gabest. They said that this was possible in the helixcommunity irc and sure enough it's been done. Thanks.
bill_baroud
6th July 2003, 20:14
VirtualDub is VFW _only_ :rolleyes: ... this is a _directshow_ filter.
use an avisynth script if you want to use it.
For me it still doesn´t work! In graphedit I can play the videos fine now, but in wmp6.4 it won´t work, no picture just the moving logo. What do I have to do?
phrentec
7th July 2003, 07:10
S_O, what version of windows are you using? could give more specs on you computer. that could help to solve.
midiguy
7th July 2003, 07:28
so by using graphedit, which container formats can you mux realvideo into (currently, not eventually)? And also, since it is a directshow filter, does that mean that the Realvideo renderer is not being used?
kilg0r3
7th July 2003, 08:31
The splitter doe not decode or render the data. The splitter just hands the video/audio/etc. data to the relevant decoders or muxers. The xvid.dll e.g. is able to handle data within directshow, it seems, the same is true for the real dlls. So the real video renderer is still being used.
HomiE FR
7th July 2003, 10:27
First of all, thanks for all of this! :) I'm really looking forward to using RV9 video within a Matroska container, along with some soft ASS subtitles...
I've tried to use the splitter. I registered the DLL, and I tried to play a RV9 clip (with RA8 audio, not decoded which is perfectly normal). This clip has a variable framerate (DropDupe used) but it seems that the splitter handles it right (I'll do another tests to be sure). It works (at least for some time ;) ).
But I've got some memory crashs with WMP 6.4: if I try to seek, I often get a memory crash with something which cannot be read according to my WinXP SP1. But even if I let the clip play without doing anything else, I've got some crashs (again those instructions which cannot be read) after about 1 minute. I don't know where it comes from.
kilg0r3
7th July 2003, 11:59
Did I say thank you already?
Ah, yeah I did. Well, anyways, THANK YOU. For me, a working Splitter is THE requirement to use RV9, because I want/need my subtitles on overlay, and, I want to add noise to overly smoothed clips, and, I don't want to pay for being able to sharpen my clips, adjust gamma etc, when there is a free solution for these things.
gabest
7th July 2003, 19:34
There has been a lot of cleanup and fixes in tha past few days, expect a new build around tomorrow.
Originally posted by kilg0r3
The splitter doe not decode or render the data. The splitter just hands the video/audio/etc. data to the relevant decoders or muxers. The xvid.dll e.g. is able to handle data within directshow, it seems, the same is true for the real dlls. So the real video renderer is still being used. Well said. How it works is very similar to "AVI Decompressor" in this aspect, they both just wrap another API to decode the frames.
midiguy
7th July 2003, 21:44
well the RV9 renderer isn't perfect when it comes to jitter (although it has been very improved if you test the alpha renderer). Are you saying that DivX has its own renderer? and XviD has its own renderer? etc. I always thoguht directshow was rendering the clips (meaning directshow was controlling the jitter, etc.) I hope that makes sense! I know I'm a newb when it comes to this stuff...
Didée
8th July 2003, 08:12
Originally posted by kilg0r3
For me, a working Splitter is THE requirement to use RV9, because I want/need my subtitles on overlay, and, I want to add noise to overly smoothed clips, and, I don't want to pay for being able to sharpen my clips, adjust gamma etc, when there is a free solution for these things.
Or, to put it in other words:
"If ffdshow can't be connected to a particular thing, the thing is unusable."
:)
kilg0r3
8th July 2003, 08:23
"If ffdshow can't be connected to a particular thing, the thing is unusable."
Fullstop. :D
gabest
9th July 2003, 02:24
Some test files for you all:
Filters for the latest rm splitter, realvideo decoder, realaudio decoder, matroska splitter, matroska muxer:
http://gabest.org/filters.rar
And something to test, blade 2 trailer in realmedia and matroska container:
http://gabest.org/Blade2_640_1Mbps.rm
http://gabest.org/Blade2_640_1Mbps.mkv
Updates:
- most of the audio formats play, exceptions: 14.4, 28.8, dnet (plays with ac3filter more or less).
- the way of storing realvideo and audio in matroska is beginning to finalize but don't expect this to be the final one. (though it might be)
- and lots of fixes of course, but anamorphic encodings still doesn't stretch to full display size.
Animaniac
9th July 2003, 04:15
Originally posted by gabest
- most of the audio formats play, exceptions: 14.4, 28.8, dnet (plays with ac3filter more or less).
Could those be added, if it's not too much trouble? Since, the upcoming ffdshow build can handle AC3 audio, so I was just going to use this with MatrixMixer instead of AC3Filter.
gabest
9th July 2003, 04:26
If ac3filter can play dnet (which is ac3 after all), I'm sure ffdshow will be able to play it as well. The "native" codec dll for this compression type doesn't want to work for me, and the two other (very old) types just produce noise as the output.
Animaniac
9th July 2003, 04:27
Originally posted by gabest
If ac3filter can play dnet (which is ac3 after all), I'm sure ffdshow will be able to play it as well. The "native" codec dll for this compression type doesn't want to work for me, and the two other (very old) types just produce noise as the output.
Ah, ok. Thanks. ^^
ChristianHJW
9th July 2003, 04:46
Originally posted by gabest
- the way of storing realvideo and audio in matroska is beginning to finalize but don't expect this to be the final one. (though it might be)
´
:D :D ... this guy is so quick !!!
There were discussions internally if we should make and use a planned feature of the specs that will have to be introduced for h.264 NALUs, when one single frame is cut into several packets and those had to be stored in one block in the MKV.
But it seems Gabest has find a way to assemble the rv9 packets and put them into one block in a standard way, so we would prefer this solution if we find its feasible on Linux also ( no reason why it wouldnt ).
Anyhow, handle the use of the filters above with some care, at least until Gabest' way is confirmed by robux4 and Mosu ..... great job Gabest !!!!
kilg0r3
9th July 2003, 07:52
but don't expect this to be the final one. (though it might be)
Christmastime in northhemispheriean summer! :)
HomiE FR
9th July 2003, 08:31
:eek: This one works perfectly! I just tried to put a Vorbis soundtrack with a RealVideo 9 video stream inside Matroska and the playback is just perfect. Seeking is lightning fast, there is no crash anymore, the sound is in synch with the video, I really can't see any drawback yet.
Great work again! This was what I waited for in order to use RV9 video streams for animes.
Thanks again.
-=Stan=-
9th July 2003, 08:35
Just wanted to report that Real in Matroska works like a charm here as well.
Cud'nt load the video in VdubMod .
Not that i am complaining .
This is great stuff :D
realvideo decoder 1001 doesnt work for me
when i open the *.rmvb test file (blade2) in graphedit i get the message that there is no usable decompressor available. if i use filter 1000 it connects to avi decompressor -> video renderer, although if i try that with the new version it cant connect
audio works fine
gabest
9th July 2003, 10:20
Hm, I switched yv12 with yuy2, but I don't understand why this would cause such a problem. Try with the overlay mixer till I can figure it out.
matroska and rmvb work both fine with overlay mixer
kilg0r3
9th July 2003, 12:35
I don't know how good the realAudio codecs are, but, we could use them know in any container right?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.