Wowza Community

mp4 streaming from application sub directory?

It’s not necessary in Wowza because you can set the StorageDir in each Application.xml.

By default all applications have the same StorageDir: [wowza-install-dir]/content, i.e., resources are already shared.

Note that if you make the Application.xml /StorageDir empty, Wowza willl use the same scheme as FMS, using application instance specific location for media, i.e., resources not shared.

Richard

Check this post out, see if it helps:

http://www.wowza.com/community/t/-/226

Unfortunately this only works for flv’s. I also tried one new path based on response #2 from Charlie in that thread, where the application name was entered twice, one time on either side of definst, however this did not work either.

rtmp://localhost/echo360/definst/echo360/dev/mp4:vga02.mp4

I get the following -

ERROR server comment - MediaReaderFactory: getInstance: Missing definition for echo360/dev/mp4

So basically sub-directory content access is fine for just flv’s but not for other file formats such as mp4 and mp3.

We need to be able to stream mp4’s from sub-directories.

So is this a bug or is there something else I can do?

Further information that may help -

Wowza Media Server Pro10 1.5.0-preview2 build5930 running on Mac OS X.

Cheers…

If you have Flash player 9.0.124, it could be this problem, which is under re-development:

http://www.wowza.com/forums/showthread.php?t=1223

I can stream mp4’s fine when the file exists within the root of the applications content directory. When an mp4 file exists within a sub-directory of that the server fails to find the file, however flv’s work fine coming out of the same sub-directories that I am testing the mp4’s in.

Also to be sure that the file works fine I am actually using the same mp4 file and have simply changed the name so that the server does not find the one in the root and ‘appear’ to serve up the one from the sub-directory.

Have you tried using an absolute path for storageDir?

I’m not sure, but I think definst is only meaningful if storageDir is blank.

Yeah it is absolute. echo360 is a directory in the root of my hard drive.

default

/echo360

definst seems to be required when there are subdirectories rather than serving everything out of the root of the storageDir.

So to sum it up,

  • flv’s stream out of the root of the storageDir

  • flv’s stream out of sub-directories of the root of the storageDir when using definst in the path

  • mp4’s stream out of the root of the storageDir

  • mp4’s don’t stream out sub-directories of the root of the storageDir even when using definst in the path

I appreciate your attempts to help me out on this :slight_smile:

Also, if you leave storageDir blank, then content will be stored in:

wowza_install/applications/yourApp/streams/someInstance/someStream.flv

…which is another way to organize content.

Excellent, this resolved the problem, much appreciated :slight_smile:

So for others following this thread or also looking for a solution…

The end solution came together following the above instructions and leaving the storageDir blank. The default behaviour of Wowza just works now in particular with serving mp4 content from within a sub-directory.

So I changed my Application.xml file to have a blank storageDir,

default

I noticed that Wowza had created a streams directory in my application directory.

/Library/WowzaMediaServerPro/applications/echo360/streams/

So I created a directory called ‘test’ inside my streams directory, and copied vga06.flv and vga05.mp4 into that ‘test’ directory. Now both of the following content paths just worked,

  • rtmp://localhost/echo360/test/vga06.flv

  • rtmp://localhost/echo360/test/mp4:vga05.mp4

Note: I had to actually drop the definst directory from my content paths, which in previous tests noted earlier in the thread seemed to be required when serving content from sub-directories.

From here I tested using a symlink in place of the ‘streams’ directory, which pointed at my original ech360 directory in the root of my hard drive, and sure enough that just worked too. This can be important for anyone wanting to use storage other than there boot volume, and/or outside of their Wowza server directory structure.

So doing an ls on the following directory,

/Library/WowzaMediaServerPro/applications/echo360

shows the following,

drwxr-xr-x 8 shaun admin 272 14 Apr 19:21 sharedobjects

lrwxr-xr-x 1 shaun admin 9 14 Apr 19:23 streams -> /echo360/

So now I was able to simply stream a file on my system with the following absolute path on my hard drive,

/echo360/dev/vga02.mp4

Using the following content path,

rtmp://localhost/echo360/dev/mp4:vga02.mp4

My head is exploding. I still cannot get wowza running on win 2003server to stream from subdirectories. I’ve looked through these posts and have tried the suggestions. Here is my current state of affairs.

  • System: Windows 2003 server, Wowza Pro 1.7

  • Application.xml file with empty storage dir

  • Using linkd.exe I’ve created a symbolic link from music library to the /applications/musicStreaming/sharedobjects/music folder

  • I’ve copied a file test.m4a into root of this folder

  • I’ve created a subfolder /test in the root folder and copied Extremists.m4v and hello.m4a into this folder

    What works:

    using the simplevideostreaming.swf included in the wowza example clients

  • I can stream mp4:test.m4a from rtmp://server.ip/musicStreaming/music

  • I can stream mp4:Extremists.m4v from rtmp://server.ip/musicStreaming/music/test

    What doesn’t work:

    using the simplevideostreaming.swf included in the wowza example clients

    Trying to stream mp4:hello.m4a from rtmp://192.168.2.1/musicStreaming/music/test FAILS:mad:

    I get “Failed to play hello.m4a; stream not found.”

    both Extremists.m4v and hello.m4a are in the same folder so WHY can’t wowza stream m4a files but is OK with m4v files???

    I can’t believe this is so difficult…surely there must be a way for wowza to stream from content subdirectories:confused:

I’ll change my link to music into a streams directory but why was wowza able to find the 2 of the 3 streams in the first place?

Using linkd.exe I’ve created a NEW symbolic link from music library to the /applications/musicStreaming/streamss/music folder

same problem…can’t stream m4a from subdirectory.

check access.log file.

hello.m4a MediaReaderH264.open[1]: java.io.FileNotFoundException: C:\Program Files\Wowza Media Systems\Wowza Media Server Pro 1.7.0\content\hello.m4a (The system cannot find the file specified)

this is the Steams section of the Application.xml

default

  • <!-- Properties defined here will override any properties defined in conf/Streams.xml for any streams types loaded by this application

–>

  • <!--

–>

why is wowza trying to find hello.m4a in content directory?

I moved my Application.xml file from …\applications\musicStreaming\Application.xml to …\conf\musicStreaming\Application.xml.

It now streams mp4:test\hello.m4a with rtmp://server.ip/musicStreaming/music

seems strange that I have to chop up the path that way, but at least it works:D

There is the possibility to create VirtualDirectory for application as in FMS?

Thanks