# mp4 streaming from application sub directory?

**URL:** https://community.wowza.com/t/mp4-streaming-from-application-sub-directory/334
**Category:** Wowza Streaming Engine
**Created:** [April 13, 2008, 1:27pm UTC](https://community.wowza.com/t/mp4-streaming-from-application-sub-directory/334 "2008-04-13T13:27:20Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/system/32/447_2.png) [@system](https://community.wowza.com/u/system)
#### Post date: [April 13, 2008, 1:27pm UTC](https://community.wowza.com/t/mp4-streaming-from-application-sub-directory/334/1 "2008-04-13T13:27:20Z")

</div>

I am unable to stream mp4 and mp3 content from directories which are sub directories of my applications Streams \> StorageDir, not matter what I try to do with the paths.

Our application generates massive amounts of content and requires the content to be organised in sub directories rather than simply stored in the root of the applications content directory.

Some background.

For testing I am using the CS3 FLVPlayback component.

My applications My Streams \> StorageDir is set to /echo360

I am able to stream mp4 content that exists within the root of application content directory by simply pre-pending mp4: to the filename

ie,

rtmp://localhost/echo360/mp4:vga01.mp4

And I am able to stream flv content from a sub directory by using _definst_ in the path

ie,

rtmp://localhost/echo360/_definst_/dev/vga03.flv

However all of the following fail.

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

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

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

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

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

I even tried dropping the file extension from the call to the file and these fail too.

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

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

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

Any suggestions to resolve this problem without storing everything in the root of the applications content directory will be much appreciated 🙂

---

<div class="post-metadata">

### Author: ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)
#### Post date: [July 15, 2009, 2:05pm UTC](https://community.wowza.com/t/mp4-streaming-from-application-sub-directory/334/2 "2009-07-15T14:05:48Z")

</div>

Take a look at NTFS junctions:

[http://en.wikipedia.org/wiki/NTFS\_junction\_point](http://en.wikipedia.org/wiki/NTFS_junction_point)

Charlie

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [April 13, 2008, 1:57pm UTC](https://community.wowza.com/t/mp4-streaming-from-application-sub-directory/334/3 "2008-04-13T13:57:12Z")

</div>

Check this post out, see if it helps:

[http://community.wowza.com/t/-/226](http://community.wowza.com/t/-/226&highlight=subfolders)

---

<div class="post-metadata">

### Author: ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)
#### Post date: [September 18, 2009, 9:26am UTC](https://community.wowza.com/t/mp4-streaming-from-application-sub-directory/334/4 "2009-09-18T09:26:39Z")

</div>

I am going to guess that the Application.xml is in the wrong folder. The Application.xml file should be in:

[install-dir]/conf/[application]/Application.xml

It will not be read if it is in:

[install-dir]/applications/[application]/Application.xml

If you still can’t sort this out zip up conf and logs folder and send to support@wowza.com.

Charlie

---

<div class="post-metadata">

### Author: ![Janine\_Hempy](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@Janine\_Hempy](https://community.wowza.com/u/Janine_Hempy)
#### Post date: [July 15, 2009, 9:59pm UTC](https://community.wowza.com/t/mp4-streaming-from-application-sub-directory/334/5 "2009-07-15T21:59:24Z")

</div>

This is a great write-up. I’m having the same problem and your instructions get me a lot closer to a solution. Thanks!

What about us poor souls in Windows, though? We can’t use symbolic links to map directories in /Applications to a centralized network location. What are my options if I want both subdirectory access and all my video to be located somewhere other than my Wowza server?

---

<div class="post-metadata">

### Author: ![Janine\_Hempy](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@Janine\_Hempy](https://community.wowza.com/u/Janine_Hempy)
#### Post date: [July 15, 2009, 10:47pm UTC](https://community.wowza.com/t/mp4-streaming-from-application-sub-directory/334/6 "2009-07-15T22:47:53Z")

</div>

> In Windows you can use UNC path or mapped drive in Application.xml /Streams /StorageDir.
> 
> Richard

Sure, I do that with other projects, but I thought the gotcha here was that subdirectories didn’t work if StorageDir was filled out. Am I reading that wrong? (Totally possible - I’ve been at this for hours and I’m fried.)

---

<div class="post-metadata">

### Author: ![Janine\_Hempy](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@Janine\_Hempy](https://community.wowza.com/u/Janine_Hempy)
#### Post date: [July 15, 2009, 10:48pm UTC](https://community.wowza.com/t/mp4-streaming-from-application-sub-directory/334/7 "2009-07-15T22:48:43Z")

</div>

> Take a look at NTFS junctions:
> 
> [http://en.wikipedia.org/wiki/NTFS\_junction\_point](http://en.wikipedia.org/wiki/NTFS_junction_point)
> 
> Charlie

Nifty! Thanks!

---

<div class="post-metadata">

### Author: ![Janine\_Hempy](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@Janine\_Hempy](https://community.wowza.com/u/Janine_Hempy)
#### Post date: [July 15, 2009, 11:00pm UTC](https://community.wowza.com/t/mp4-streaming-from-application-sub-directory/334/8 "2009-07-15T23:00:28Z")

</div>

> This is a great write-up. I’m having the same problem and your instructions get me a lot closer to a solution. Thanks!
> 
> What about us poor souls in Windows, though? We can’t use symbolic links to map directories in /Applications to a centralized network location. What are my options if I want both subdirectory access and all my video to be located somewhere other than my Wowza server?

Update: It seems like one level of subdirectories works for me but two doesn’t.

In a nutshell, I can stream this video:

/applications/myapp/streams/topdir/file.f4v

but not:

/applications/myapp/streams/topdir/bottomdir/file.f4v

This second option generates a Java.io.FileNotFoundException saying that /applications/myapp/streams/topdir/file.f4v can’t be found. “bottomdir” is absent from the error message.

I’m using JW Player 4.5, Wowza 1.5.3, if either of those things figure in the equation.

---

<div class="post-metadata">

### Author: ![Janine\_Hempy](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@Janine\_Hempy](https://community.wowza.com/u/Janine_Hempy)
#### Post date: [July 15, 2009, 11:14pm UTC](https://community.wowza.com/t/mp4-streaming-from-application-sub-directory/334/9 "2009-07-15T23:14:47Z")

</div>

Richard, thanks for your help. I was tacking the subdirectories on the end of my streamer variable, not the front of my file variable. Now things are working as they should.

You rock!

---

<div class="post-metadata">

### Author: ![Janine\_Hempy](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@Janine\_Hempy](https://community.wowza.com/u/Janine_Hempy)
#### Post date: [July 15, 2009, 11:16pm UTC](https://community.wowza.com/t/mp4-streaming-from-application-sub-directory/334/10 "2009-07-15T23:16:39Z")

</div>

> What is in StorageDir?
> 
> Richard

It was //server/proxy/collection/project.

I was putting the subdirectory stuff in the wrong place - thanks for helping me figure that out!

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [April 14, 2008, 12:47am UTC](https://community.wowza.com/t/mp4-streaming-from-application-sub-directory/334/11 "2008-04-14T00:47:50Z")

</div>

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

[https://www.wowza.com/forums/showthread.php?t=1223](https://www.wowza.com/forums/showthread.php?t=1223)

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [April 14, 2008, 10:48am UTC](https://community.wowza.com/t/mp4-streaming-from-application-sub-directory/334/12 "2008-04-14T10:48:32Z")

</div>

Have you tried using an absolute path for storageDir?

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

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [April 14, 2008, 10:54am UTC](https://community.wowza.com/t/mp4-streaming-from-application-sub-directory/334/13 "2008-04-14T10:54:46Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [April 14, 2008, 11:38am UTC](https://community.wowza.com/t/mp4-streaming-from-application-sub-directory/334/14 "2008-04-14T11:38:56Z")

</div>

Right, that is absolute – I was thinking windows server (pre-coffee).

It’s confusing because appInstance and sub-directory look similar. Which is which is not obvious. For myself, if I want to organize content I use blank in storageDir, and if I want to centralize content I use a path in storageDir.

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [April 14, 2008, 12:11pm UTC](https://community.wowza.com/t/mp4-streaming-from-application-sub-directory/334/15 "2008-04-14T12:11:51Z")

</div>

that’s great, I’m glad I could help

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [July 15, 2009, 10:09pm UTC](https://community.wowza.com/t/mp4-streaming-from-application-sub-directory/334/16 "2009-07-15T22:09:45Z")

</div>

In Windows you can use UNC path or mapped drive in Application.xml /Streams /StorageDir.

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [July 15, 2009, 11:02pm UTC](https://community.wowza.com/t/mp4-streaming-from-application-sub-directory/334/17 "2009-07-15T23:02:24Z")

</div>

You can use subdirectories with StorageDir not empty. For example:

> //server1/content

With a video located here:

```auto
server1/content/folder1/video.flv

```

The stream (or file in JW Player) would be:

> folder1/video.flv

Other players might need something like this, and you must have a appInstance part:

> rtmp://wowzaIP/simplevideostream/_definst_/folder1/video.flv

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [July 15, 2009, 11:07pm UTC](https://community.wowza.com/t/mp4-streaming-from-application-sub-directory/334/18 "2009-07-15T23:07:13Z")

</div>

What is in StorageDir?

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [September 18, 2009, 11:41am UTC](https://community.wowza.com/t/mp4-streaming-from-application-sub-directory/334/19 "2009-09-18T11:41:18Z")

</div>

To debug this, it is very helpful to look at the Wowza logs to see where Wowza is looking for the video.

Using your example:

rtmp://server.ip/musicStreaming/music/test

if you make Application.xml /Streams /StorageDir empty, Wowza will look for the video (in your case) here:

[wowza-install-dir]/applications/musicStreaming/ **streams** /music/test

“music” is the ApplicationInstance, and it is part of the physical path in the case where StorageDir is empty.

It would work a little differently if you StorageDir is not empty, for example:

C:\content

Using the same rtmp url:

rtmp://server.ip/musicStreaming/music/test

Wowza would look here:

c:\content\test

ApplicationInstance in this case is not part of the physical location.

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [September 18, 2009, 2:49pm UTC](https://community.wowza.com/t/mp4-streaming-from-application-sub-directory/334/20 "2009-09-18T14:49:06Z")

</div>

Not sure, but this is what you were doing wrong:

> … 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

Richard

[Next page](https://community.wowza.com/t/mp4-streaming-from-application-sub-directory/334.md?page=2)
