Log in

View Full Version : RealVideo playback options, incl subtitles


karl_lillevold
6th September 2004, 20:01
This is a new thread covering various topics related to playback of RealVideo. It is not specifically about any player, but issues related to access to and playback of RealMedia. If you have suggestions for additional information, please post a reply.

Playback

There are two main methods of accessing RealMedia content.

1. RealPlayer
RealPlayer is the easiest way to get started, and if there is any media player in the world, almost anyone has something to say about, this is it :) It has had some issues in the past, but I would suggest to give it another chance. Please go to thread (http://forum.doom9.org/showthread.php?s=&threadid=68399) for all the details. It may have been a little hard to find the free player in the past, and special links and instructions were required. Now it is as easy as going to http://www.real.com, and follow easily visible links. Currently there is a one click access from the front page.

RealPlayer enables playback of all known RealMedia types, as well as most other media types. If you have enough other SDKs installed, I think it pretty much supports everything, this includes both secure MS and iTunes content, played via their respective SDKs. The Real music store via RealPlayer 10.5 with Harmony, is the only known alternative to iTunes for enabling secure content on the iPod.

RealPlayer has much more functionality than just media playback, CD ripping, media conversion, jukebox, media library, too much to go into here. It comes with free encoding (ripping) of AAC at all bitrates, and a couple of clicks, but still free, access to high bitrate MP3 encoding.

2. DirectShow

With Gabest's realmediasplitter (http://sourceforge.net/projects/guliverkli/) any DirectShow based media player, of which there are many, can play most forms of RealMedia. This is an awesome alternative since it allows everyone to use their favorite media player, as well as Avisynth and other forms of access to RealMedia. The realmediasplitter works by hooking up to existing RealVideo and RealAudio codecs on your system. This means you either have to have RealPlayer installed, or a so-called codec-pack *).

Gabest's Media Player Classic has a built-in version of realmediasplitter, which enables RealMedia playback in MPC without a specific installation of realmediasplitter. Any other DirectShow use of RealMedia (via Avisynth, re-coding in Producer, other players) requires the standalone realmediasplitter. You can have both MPC and realmediasplitter installed.

For playback of RealVideo or RealAudio inside the Matroska container, the DirectShow method is required, since RealPlayer does not support DirectShow playback. To convert from Matroska back to RM, you can use mkvextract from mkvtoolnix.

Known problems with realmediasplitter:
- No local playback of SureStream files.
- No support for some RM types, SMIL, RealText, RealPix ...

Subtitles

Again, there are two main methods to play back RealVideo with proper subtitles (not encoded with the video).

1. RealPlayer

SMIL/RealText. This method involves the creation of a text file in the RealText format. Subtitle Workshop can convert most known subtitle formats to RealText. You also need a SMIL file that references the video clip and the RealText clip, combining them into one presentation. Example coming shortly. AutoRV10 can create all of these files automatically. A SMIL presentation of RealVideo with RealText consists of three files, .rmvb + .smil + .rt

2. DirectShow

With the DirectShow method, any known DirectShow based subtitle method works along with RealVideo. I will have to ask others with more expertise for input on this topic, but I have personally used Gabest's VSFilter (http://sourceforge.net/projects/guliverkli/) with great success. When you have for example a .srt file with the same filename as your .rmvb file, vsfilter will auto-load the subtitles. Similarly, if you have a native DVD subtitle file (.idx + .sub).

Also, if you have subtitles embedded in a Matroska file with RealVideo and/or RealAudio, VSFilter will display the subtitles flawlessly.

More later...

Linux

TODO: finish this section.
Options: Helix Player, mplayer

*) Note that the distribution of codec packs is not allowed since the DLLs are owned and copyrighted by RealNetworks. There have also been cases where a codec pack has messed up someone's system. If there is concern about what RealPlayer will do to your system, it has cleaned up. Please see this post (http://forum.doom9.org/showthread.php?s=&threadid=68399) on that topic. I recommend the RealPlayer method, for two reasons: (i) system stability and (ii) problem solving. If something does not work in one player, it may in the other.

tiki4
7th September 2004, 15:12
Hi Karl,

thanks for collecting this valuable information. As a note:

Dark-Cracker posted a tool that can mux .srt subtitles directly to the .rmvb container. It can be found in this thread (http://forum.doom9.org/showthread.php?s=&threadid=70829&highlight=Subtitle+Muxer) .

tiki4

victorhooi
8th September 2004, 07:57
Hi,

I'm currently trying to get subtitles working on an anime rip (Wicked City - a bit icky, but apart from that it's pretty cool). Firstly, I used SubRip (http://zuggy.wz.cz/) to OCR the subtitles.

I tried Subtitle Workshop (http://www.urusoft.net/home.php?lang=1) as Karl recommended, but this doesn't seem able to save in RealText format. The closest it can do is RealTime (never heard of this), extention .rt, but the output doesn't to be a valid RealText file. Anyway, I used Subtitle Workshop to convert the .srt into a .smi (MS SAMI) file, then used makesami to convert this into a .rt document (extract below):

<window duration="01:19:07.9" width="720" height="50" wordwrap="true" loop="true" bgcolor="black">
<font color="white" face="Arial" size="+ 3">
<center>
<b>
<time begin="00:00:14.0"/><clear/>
<i>Its body is armored<br>in iron and concrete.</i>
<time begin="00:00:17.0"/><clear/>
...
<time begin="01:18:57.9"/><clear/>
<i>as a Black Guard won't end,<br>until that day comes.</i>
<time begin="01:19:02.4"/><clear/>&nbsp;
</b>
</center>
</font>
</window>

Anyway, I then used a .smil file to link the .rmvb (audio/video) file with realtext (extract below):

<smil>
<head>
<layout>
<root-layout backgroundColor="black" width="720" height="604"/>
<!-- on prev. line, add 50 to the actual movie heigth to get "338" -->
<region id="video_region" top="5" z-index="1"/>
<region id="text_region" top="554" z-index="2"/>
<!-- top is = height minus 50, i.e. actual movie heigth -->
</layout>
</head>
<body>
<par>
<video src="..\..\Wicked City.rmvb" region="video_region" fill="remove"/>
<textstream src="Edited RealText.rt" region="text_region" fill="freeze"/>
</par>
</body>
</smil>

This part works fine - the subtitle plays below the movie, although the text size is kinda small, and sometimes the first few words of a line aren't visible (I assume this is a bug in RealPlayer, right?)

Next, I tried to overlay the subtitles transparenly over the movie (extract below):

<smil xmlns="http://www.w3.org/2001/SMIL20/Language"
xmlns:rn="http://features.real.com/2001/SMIL20/Extensions">
<head>
<meta name="title" content="Wicked City"/>
<layout>
<root-layout width="720" height="544" backgroundColor="black"/>
<region id="video_region" z-index="1"/>
<region id="text_region" height="50" bottom="0" left="10" z-index="2"/>
</layout>
</head>
<body>
<par>
<video src="..\..\Wicked City.rmvb" region="video_region" fill="remove"/>
<textstream src="Edited RealText.rt" region="text_region" rn:backgroundOpacity="0%" fill="hold"/>
</par>
</body>
</smil>

The movie seems fine playing at 100% in it's small little window, but when you tyr to change the size (eg go to fullscreen), the text looks really jagged and alised, quite nasty. (Also, if you set opacity to anything other than 0, it just defaults to a black background, without any opacity at all). Personally, I'd prefer playing the subtitles overlaid over the movie, so it'd be great if somebody could suggest some way of getting it to work properly.

Thanks a lot,
Victor

NB: Oh yeah, forgot to say - RV10 rocks =) - one of the best codecs I've used so far for low to medium bitrate encoding of anime.

karl_lillevold
8th September 2004, 17:14
victorhooi: RV10 rocks =) Thanks!
It seems what Subtitle Workshop calls RealTime is actually RealText, so the intermediate step you mention is not needed. It would probably be necessary to edit the beginning of the resulting file. I looked at one of my Smil/RT presentations, and the format created by AutoRV10 looks like this:

RealText:

<window duration="1:34:03.00" width="704" height="50"
wordwrap="true" loop="true" bgcolor="black">
<font color="white" face="Arial" size="+2">
<center>
<b>
<Time Begin="0:01:59.49" End="0:02:03.29" /><clear/> <i>This..</i> ...


This should take care of the text size problem. Then you have the SMIL code, which you seem to have almost the same as me.

SMIL:

<smil xmlns="">
<head>
<layout>
<root-layout backgroundColor="black" width="704" height="404"/>
<region id="video_region" z-index="1"/>
<region id="text_region" height="50" bottom="0" z-index="2"/>
</layout>
</head>
<body>
<par>
<video src="presentation.rmvb" region="video_region"
regPoint="center" regAlign="center" fill="remove"/>
<textstream src="presentation_Subtitle.rt"
region="text_region" fill="freeze"/>
</par>
</body>
</smil>


I am afraid there is no way to make RealText appear transparently on top of your video in SMIL with RealPlayer. For that you will have to use subtitles in DirectShow for instance via VSFilter, like mentioned above. I tried to convert my .rt file to .srt (SubRip) using Subtitle Workshop. This plays wonderfully in Media Player Classic, opaquely on top of the video, with shadows and everything. I have to admit RealPlayer with SMIL and RealText does not offer such a compelling solution. I will add this limitation to the info above.