Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Streaming Oracle9i based RealVideo with RealServer and interMedia
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:
The script used to create a database table:
-- -- 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, GermanyReceived on Wed Sep 17 2003 - 18:51:07 CDT