[FFmpeg-devel] Realmedia patch

Luca Abeni lucabe72
Fri Aug 22 23:01:21 CEST 2008


Ronald S. Bultje wrote:
[...]
>>> +                       "RegionData: 0\r\n"
>>> +                       "ClientID: Linux_2.4_6.0.9.1235_play32_RN01_EN_586\r\n",
>>> +                       sizeof(cmd));
>> Is this really needed? I mean: claiming to be RealMedia Player, sending
>> a random Starttime, etc...
>> Are all these tags needed? (what happens if you remove ClientID,
>> User-Agent, etc...?)
[...]
>>> +                   "SupportsMaximumASMBandwidth: 1\r\n"
>>> +                   "Language: en-US\r\n"
>>> +                   "Require: com.real.retain-entity-for-setup\r\n",
>>> +                   sizeof(cmd));
>> Again, it would be better to avoid sending fake information.
> 
> I've tested a few of them, and the servers would refuse to work
> without it. However, I haven't done systematic testing

Ok; I applied your "rtsp-realmedia.patch", and after fixing some
bugs I tried some tests with the
rtsp://helix1.smgradio.com/encoder/VirginRadioAAC.rm
you suggested.

Results:
+        snprintf(cmd, sizeof(cmd),
+                 "OPTIONS %s RTSP/1.0\r\n", s->filename);
+        if (is_real_datatype)
+            av_strlcat(cmd,
+                       "User-Agent: RealMedia Player Version 6.0.9.1235 (linux-2.0-libc6-i386-gcc2.95\r\n"
+                       "ClientChallenge: 9e26d33f2984236010ef6253fb1887f7\r\n"
+                       "PlayerStarttime: [28/03/2003:22:50:23 00:00]\r\n"
+                       "CompanyID: KnKV4M4I/B2FjJ1TToLycw==\r\n"
+                       "GUID: 00000000-0000-0000-0000-000000000000\r\n"
+                       "RegionData: 0\r\n"
+                       "ClientID: Linux_2.4_6.0.9.1235_play32_RN01_EN_586\r\n",
+                       sizeof(cmd));
here, only the "ClientChallenge", "PlayerStarttime", "CompanyID", and "GUID"
tags are needed. So, the above can be reduced to:
             av_strlcat(cmd,
                        "ClientChallenge: 9e26d33f2984236010ef6253fb1887f7\r\n"
                        "PlayerStarttime: [28/03/2003:22:50:23 00:00]\r\n"
                        "CompanyID: KnKV4M4I/B2FjJ1TToLycw==\r\n"
                        "GUID: 00000000-0000-0000-0000-000000000000\r\n"
                        ,sizeof(cmd));

Now, the scary thing is that "[28/03/2003:22:50:23 00:00]" is not
just a random time, but seems to be the only value that allows the
stream to work... If I change the date or the time, the stream does
not start.
I do not feel too confortable with this... Has anyone any idea on
what this "PlayerStarttime" is and why it has to be set to this
value? Ah, the joy of proprietary undocumented protocols... ;-)


+    if (is_real_datatype)
+        av_strlcat(cmd,
+                   "Bandwidth: 250000\r\n"
+                   "GUID: 00000000-0000-0000-0000-000000000000\r\n"
+                   "RegionData: 0\r\n"
+                   "ClientID: Linux_2.4_6.0.9.1235_play32_RN01_EN_586\r\n"
+                   "SupportsMaximumASMBandwidth: 1\r\n"
+                   "Language: en-US\r\n"
+                   "Require: com.real.retain-entity-for-setup\r\n",
+                   sizeof(cmd));
Here, only the "Require: com.real.retain-entity-for-setup\r\n"
part is really needed. So, this can become
         av_strlcat(cmd,
                    "Require: com.real.retain-entity-for-setup\r\n"
                    ,sizeof(cmd));

As a side note, the stream works well with ffplay, but ffmpeg
crashes with a floating point exception... But maybe this is an
unrelated problem.


				Luca




More information about the ffmpeg-devel mailing list