Video will not play

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
10/18/2013 5:24:10 PM
Gravatar
Total Posts 77

Video will not play

None of the videos that I have uploaded will play.

This is a typical error from the system log:

2013-10-18 15:13:59,042 ERROR 146.90.81.106 - en-GB - /home - mojoPortal.MediaPlayerUI.VideoPlayer -      System.ArgumentException: No Supported Video File Extension Found
   at mojoPortal.MediaPlayerUI.VideoPlayer.SetupScripts()
   at mojoPortal.MediaPlayerUI.VideoPlayer.Page_Load(Object sender, EventArgs e)

Any clues?

Thanks

Ken

10/18/2013 9:34:03 PM
Gravatar
Total Posts 2253

Re: Video will not play

Make sure the MIME types are correct either in the server configuration or in your web.config. See the Audio and Video Player troubleshooting info for more on the MIME types.

HTH,
Joe D.

10/19/2013 9:00:53 AM
Gravatar
Total Posts 77

Re: Video will not play

Thanks Joe D.

I looked at the "Troubleshooting" section and at the web.config.

In my web.config:

the <staticContent> section:
- is NOT commented out. (contrary to what it says in the comments at web.config line 1099)
- does NOT include the .wmv format.

Might this have something to do with it?

(I'm using .wmv because I get smaller file sizes.
e.g. for a sample 12 second clip, PowerDirector produces a 12 Mb file in .mp4 but it is only 580 Kb in .wmv.)

And: when I tried to upload the 12 Mb .mp4, the mojoPortal up-loader gave an error message.

============

Lastly, the error message seems to be pointing to the "mojoPortal.MediaPlayerUI.VideoPlayer.SetupScripts()" as the cause.
What is the relationship between the <staticContent> section in the web.config and the "mojoPortal.MediaPlayerUI.VideoPlayer.SetupScripts()"

Thanks

Ken

 

 

 

10/19/2013 9:12:47 AM
Gravatar
Total Posts 18439

Re: Video will not play

Hi Ken,

wmv is not supported by jPlayer, it is a windows only format that will not work for users with other devices like ipad or linux or mac. jPlayer is based on standards and html 5 and is meant for use with formats that should work on all devices, wmv is not one of those.

Hope that helps,

Joe

10/19/2013 9:17:19 AM
Gravatar
Total Posts 18439

Re: Video will not play

Note that if you really want to use a wmv file I think you can embed on in the page using the standard html content feature and using the media toolbar item in the editor to upload it. But I recommend using a format that is more compatible. Our audio and video features are built on jplayer so they are not going to use that format.

10/19/2013 1:37:30 PM
Gravatar
Total Posts 77

Re: Video will not play

Hi Joe,

This helped me to find a procedure to make the videos work.
I have added some more info to this post that may help other readers to solve a similar problem.

I'd also appreciate your comments on my observations.

Thanks

Ken

==============================

This is the procedure that I finally used to make the videos work:
1: Use Camtasia Studio 8.1 to generate an mp4 file cut down to 500*264
2: Use FileZilla to upload the mp4 file to a sub-folder under GalleryImages

        /wwwroot/Data/Sites/1/GalleryImages/home-page-images

3: Use "Edit Media Player" to add the mp4 file to a media track.
4: Set the Video Player Feature Instance Settings to "Auto Start", "Disable Shuffle" and "Allow Full Screen Playback"

5: Navigate to the page in the menu - and there was my video playing!

Great!

Observations.

"Producing" the a 10 second video clip gave the following results:

Cyberlink PowerDirector 12:
avi - 36.3 Mb
mkv - 21.6 Mb
mpg - 10.7 Mb
mp4 - 10.3 Mb   (640* 480 @ 25 FPS  - 6 Mbps - this was the minimum that I was able to set)
mov - 1.7 Mb
wmv - 0.5 Mb smiley

Camtasia studio 8.1:
mp4 - 1.6 Mb  (500 * 280)


Plans

The website that I am now building is a prototype for a much larger website.
Amongst other things, the larger website will have a lot of videos and each video will be up to 4 minutes in length so file sizes are important.

Projecting from my tests suggests that each 4 minute mp4 file produced by Camtasia could be about 24 times bigger than my 10 second test file (.i.e. about  38 Mb) so 100 such files will require about 3.8GB.

I have not yet made any "4 minute/ 38 Mb tests" however it would be very helpful if you could let me know if mojoPortal has any limits on the video file sizes before I stumble into a file size problem.

Video software differences
I'm rather surprised by the difference in mp4 file sizes produced by Camtasia and PowerDirector.
In addition, wmv gives file sizes that are only about 30% of the best I could get with mp4.
It seems to me that wmv could improve the user experience by reducing transmission time by up to 70%.
But maybe I am missing some cool feature of mp4 that mitigates this risk?

10/19/2013 4:00:12 PM
Gravatar
Total Posts 18439

Re: Video will not play

Hi,

Yes Windows Media format is very efficient but unfortunately proprietary to windows. 

The thing to understand is that mojoPortal is not involved in processing video requests. All mojoportal does is deliver html to the web browser and that html may have links to video or javascript video players that link to video. When a user clicks the link it is the web server (ie IIS) that delivers the video file or stream without any processing or influence from mojoPortal. We do provide some ways to upload the files but we don't limit that either in terms of file size it is all done by configuration in terms of what IIS will allow.

Beyond configuration the limits are whatever the machine and bandwidth are able to handle.

Video files are large and serving a lot of large files to a lot of simultaneous users adds up quickly to a heavy load.

Whenever possible I recommend off load the serving of the video to the infrastructure of free services such as youtube and just embed the youtube video in the web page so it plays on your site pages like I did on this page for example.

When you upload a video to youtube they convert it to a variety of formats to support different devices and different levels of bandwidth. For youtube you should upload the highest quality file you can create and not worry too much about compression to make the file smaller as that also can degrade the quality. Let them worry about compressing it and optimizing it.

For self hosted video files it definitely makes a difference about the tools used, some encoding tools do work better than others as far as compressing the video and audio.

Hope that helps,

Joe

10/19/2013 6:00:55 PM
Gravatar
Total Posts 77

Re: Video will not play

Hi Joe,

That information was very helpful.

The environment I want to create is where I use the permissions in MS SQL Server to control access to the videos.
So I suppose that this means that I can't use YouTube and I'm stuck with uploading them to a "permission controlled folder" on the hosting service.

Is my understanding correct?

 

Also, whilst the jplayer functionality is very nice, I find that the "control area" below the video itself takes up too much vertical space.
Is there any way to reduce the height of the jplayer control area? 

Thanks

Ken

10/21/2013 11:28:15 AM
Gravatar
Total Posts 18439

Re: Video will not play

Hi,

The thing to understand is that you cannot use file system permissions to protect the files. File system permissions are for Windows user accounts, web visitors are not logged into windows even if they are logged into mojoPortal.

The IIS web site runs in the context of a windows user that is the identity on the application pool and all web requests by all users whether authenticated or not are running as the same windows user. To serve the files at all this windows user must have read permission on the files.

To protect video files in a specific folder in a web site would require custom development. One could implement a custom http module and plug it in via web.config. As I said before generally static files are served directly by IIS without and involvement from mojoPortal or asp.net code. However it is technically possible to make an http module that intervenes in requests for file in a specific folder, check the users role cookie and if not in a granted role the http module could return a 404 or 401 status code to prevent IIS from completing the request and serving the file. Such a custom http module could not be based on page view roles since the request for the video file has not page id in the url and nothing to tie the file to a page in the site. It could only check the role cookie efficiently, one would not want to do database lookups in such a module for example. So the allowed roles would need to be hard coded somewhere or in a config settings and the module would inspect all requests and if the url for the request has the folder that you want to protect then you would check the role cookie and if the user is not in the role return the status code to prevent access otherwise do nothing and let IIS serve the file. http modules run for every single request so they need to be very efficient in figuring out if the current request is one it cares about or not and in any other processing they do.

Hope that helps,

Joe

 

10/21/2013 1:59:20 PM
Gravatar
Total Posts 77

Re: Video will not play

Hi Joe,

Thank's very much for alerting me to this. 

My own website (www.ormfoundation.org) uses a CMS package that I bought in 2007 and it is based on ASP.NET 2.0 & SQL Server 2005.

As the admin user, I have full control over which user can see which forums, library folders and related files by assigning users to roles with permissions that I can create. I assign a set of permissions to each role each and then assign users to roles. Users who are not in the appropriate role cannot see the assets that are assigned to that role.

The role control tool is a more powerful version of the WSAT: http://msdn.microsoft.com/en-us/library/ms228053%28v=vs.100%29.aspx

Since mojoPortal is ASP.NET 4.x and I'm using SQL Server 2012, I was sort of expecting to be able to do the same thing with mojoPortal. Is this feature just "something that you have not yet built" or is it a difference in architecture? 

Thanks

Ken

10/22/2013 11:16:25 AM
Gravatar
Total Posts 18439

Re: Video will not play

Hi Ken,

That should work, it slipped my mind that there is a simple web.config way to protect a folder by site roles, I'm pretty sure that all that tool does is make the web.cofig files and settings for you.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.