List Info

Thread: Streaming out of truly custom directories (eg. NFS mounted array)




Streaming out of truly custom directories (eg. NFS mounted array)
user name
2007-06-26 13:30:23

Hello red5 Devs!

 

At Yahoo̵7;s Research Labs in Berkeley, CA we’ve been playing with Red5 and making some modifications here and there.

Let me firstly comment on the excellent server you’ve all put together. Its stable as solid and definitely outperformed all our expectations.

 

I’ve been working on several changes around Red5’;s FLV and MP3 handling, some of which might be worth discussing with the Red5 team.

Currently, I’ve worked in a small fix that I think could be useful to others.

 

We want to have the ability to stream out of truly custom directories, so that we can use our NFS mounted disk array for video storage without having to mount that as a path under a Red5 application. My simple fix for this is to add a flag to the IStreamFilenameGenerator like this:

 

           ; /**

           ;  * True if returned filename is an absolute path, else relative to application.

           ;  * If relative to application, you need to use scope.getContext().getResources(fileName)[0].getFile(); to

           ;  * resolve this to a file. If absolute (ie returns true) simply use new File(generateFilename(scope, name))

           ;  * return

           ;  */

           ; public boolean resolvesToAbsolutePath();

 

In ProviderService’; getVODProviderInput, you can then make a decision whether to use SpringR17;s getResources or simply create a new file from the path returned, such as:

 

   public File getVODProviderFile(IScope scope, String name) {

           ; File file = null;

           ; try {

           ;       IStreamFilenameGenerator filenameGenerator = (IStreamFilenameGenerator)

           ;           ;  ScopeUtils.getScopeService(scope, IStreamFilenameGenerator.class, DefaultStreamFilenameGenerator.class);

           ;       String fileName = getStreamFilename(scope, name);

           ;       if (filenameGenerator.resolvesToAbsolutePath()) {

           ;           ;  file = new File(fileName);

           ;       } else {

           ;           ;  file = scope.getContext().getResources(fileName)[0].getFile();

           ;       }

 

 

Is there any compelling reason why this would be a bad idea?

 

Thanks! I’m sure we’ll talk again.

 

-Niels Joubert

Yahoo Research Berkeley

Re: Streaming out of truly custom directories (eg. NFS mounted array)
user name
2007-06-26 14:03:28
Hi Niels,

Niels Joubert schrieb:
> At Yahoo’s Research Labs in Berkeley, CA we’ve been
playing with Red5
> and making some modifications here and there.
> 
> Let me firstly comment on the excellent server you’ve
all put together.
> Its stable as solid and definitely outperformed all our
expectations.

thanks 

> I’ve been working on several changes around Red5’s
FLV and MP3 handling,
> some of which might be worth discussing with the Red5
team.

Well, feel free to post any suggestions to this list or add
tickets at
http://jira.red5.org.
Patches are of course welcome, too ;)

> Currently, I’ve worked in a small fix that I think
could be useful to
> others.
>
> We want to have the ability to stream out of truly
custom directories,
> so that we can use our NFS mounted disk array for video
storage without
> having to mount that as a path under a Red5
application. My simple fix
> for this is to add a flag to the
IStreamFilenameGenerator like this:
[...]
> Is there any compelling reason why this would be a bad
idea?

No, looks like a good extension to me. I'm going to add this
to the
repository later.

Joachim


_______________________________________________
Red5devs mailing list
Red5devsosflash.org
http://osflash.org/mailman/listinfo/red5devs_osflash.org

Re: Streaming out of truly custom directories (eg. NFS mounted array)
user name
2007-06-26 14:32:05
Hi,

Joachim Bauch schrieb:
[...]
> No, looks like a good extension to me. I'm going to add
this to the
> repository later.

slightly modified change applied in r2144 [1]. The new
method is now
also evaluated when recording or having a serverside
stream.

Joachim

[1] http://mirror1.cvsdude.com/trac/osflash/red5/changese
t/2144

_______________________________________________
Red5devs mailing list
Red5devsosflash.org
http://osflash.org/mailman/listinfo/red5devs_osflash.org


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )