Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Streaming Oracle9i based RealVideo with RealServer and interMedia

Streaming Oracle9i based RealVideo with RealServer and interMedia

From: Roman Zhovtulya <roman_at_fh-offenburg.de>
Date: Wed, 17 Sep 2003 16:51:07 -0700
Message-ID: <bk9se1$dj1$1@news.BelWue.DE>


Hello all,
If anyone tried this before and could give me a hand on how to get it to work, I would highly appreciate it.
I was trying to follow the instructions under:

http://otn.oracle.com/sample_code/products/intermedia/htdocs/realnetworks/realvideo_readme.htm

to configure Helix Universal Server (Basic Real streaming server) to take audio/video from the Oracle 9i tables, but the Real player still cannot find the data (actually, the instructions are for Oracle8i, and I'm using 9i - any differences?)

I'm using Oracle 9i under Suse linux 8.0, Helix Universal Basic Server 9.0.2.802 (installed on the same PC) and Oracle interMedia Plug-in 2.1 for RealNetworks Streaming Servers.

I've uploaded the video into the database, created all the Oracle PL/SQL procedures, mounted the Oracle points under the streaming server, but the Real player still fails to find the video.

Here is the excerpt from "rmserver.cfg" with configuration of Oracle mount points:



<List Name="Oracle Content">
<Var SQL="begin get_video('$url1$', :MIMETYPE, :DATA); end;"/>
<Var HeaderCacheSize="2048"/>
<Var MountPoint="/videodb/"/>
<Var LobFetchSize="32768"/>
<Var

Database="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(PORT=1521)(HOST=localhost))(C ONNECT_DATA=(SID=DBLAB)))"/>
<Var Password="dGlnZXI="/>
<Var ShortName="pn-oracle"/>
<Var MaxCachedConnections="5"/>
<Var Username="scott"/>
</List>

The script used to create a database table:



set define on;
set echo on;
--
-- Connect database as system
--
connect system/manager
--
-- Specify the directory for the movie clips
--
grant create any directory to scott;
connect scott/tiger
create or replace directory videodir as
'/data/httpd/htdocs/videodb/realvideo-demo';
--
-- Forced cleanup
--
drop table movies;
-- 
-- Create table
--
CREATE TABLE MOVIES
(
Item_ID number not null PRIMARY KEY,
Video ordsys.ordvideo
);
show errors;
commit;
******************** // worked fine

Script used to create the PL/SQL procedure to load the videos:
********************
create or replace procedure load_video (id integer, filename in varchar2) as
obj ORDSYS.ORDVideo;
ctx RAW(4000) := NULL;
begin
INSERT INTO MOVIES VALUES(ID,
ORDSYS.ORDVideo('',ORDSYS.ORDSource(EMPTY_BLOB(),NULL,NULL,NULL,NULL,NULL),
'', '', EMPTY_CLOB(), NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL));
SELECT video into obj from Movies
where item_id = id FOR UPDATE;
obj.setSource('FILE','VIDEODIR', filename);
Obj.setDescription('A movie trailer');
Obj.setMimeType('audio/x-pn-realaudio');
Obj.setFormat('Real Media File Format');
obj.import(ctx);
UPDATE Movies
SET video=obj WHERE item_id=id;
COMMIT;
END;
/
show errors;
truncate table movies;
exec load_video(1,'autorace.rm');
exec load_video(2,'mediterraneo.rm');
commit;
show errors;
***************************

The procedure to retrieve video from the database:
***************************
create or replace procedure get_video(
video_id in varchar2,
mimetype out varchar2,
data out blob) as
tempBLOB BLOB;
s varchar2(200);
begin
--
-- Deliver audio and mimetype
--
select t.video.getcontent(), t.video.getmimetype()
into tempBLOB, s
from movies t where t.item_id = video_id;
data := tempBLOB;
mimetype := s;
end;
/
show errors;
***************************

Any ideas/hints would be highly appreciated.

Thanks a lot,
Roman Zhovtulya
Offenburg University, Germany
Received on Wed Sep 17 2003 - 18:51:07 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US