understanding smil with wowza and JWplayer - wowza

I'm trying to implement the adaptive streaming for my beloved website, i'm using wowza and jwplayer. My settings are:
js:
var playerInstance = jwplayer("myElement").setup({
file: "/testjwplayer.smil",
width: 980,
height: 535,
title: 'Basic Video Embed',
description: 'A video with a basic title and description!',
});
smil:
<smil>
<head>
<meta base="rtmp://myserver/myapplication?mp4:" />
</head>
<body>
<switch>
<video src="sample_360.mp4" height="360" system-bitrate="745472" />
<video src="sample_480.mp4" height="480" system-bitrate="1155072" />
<video src="sample_720.mp4" height="720" system-bitrate="1187840" />
<video src="sample.mp4" height="1080" system-bitrate="2467840" />
</switch>
</body>
</smil>
Everything is working, the player shows all the qualities and the 'auto' quality. The things i'm not understanding is how to determinate which quality is the player invoking when the 'auto' quality is active. Checking on wowza access.log file, seems that the player always invokes the same quality (hd), even if the connection is really bad (i'm using some tools to simulate a bad connection).
Now my quastions are:
There is a way to understand what the player is doing? which quality is trying to reach?
If i did all good, why the player invokes always the same quality (hd)?
and more important: should JWplayer switch the quality in real time or just when the player is created?
Thank for the attention guys

From the jwplayer documentation:
The switching of quality is automatically done by JW Player, who selects the highest quality:
Whose system-bitrate fits the current bandwidth of the connection.
Whose width fits the current width of the player screen.
Regarding to your second question, I am afraid that when using RTMP it does not change quality during playing the stream, it only selects once at startup.

Related

Make choregraphe app predefined Pepper naoqi 2.5

I have an application to host a webpage that will be the menu of the robot so I need it to be executing all the time unless my other apps are on use.
I have tried with trigger condition = 1:
Nature = Interactive: The app block other interactive apps such as face recognition and will not execute if other apps are running.
Nature = Solitary: The app is stopped when other interactive apps start (for example when a face is recognized)
The only important part of it is on the html part so maybe the approach is not correct.
I solved it by using:
Interactive nature with trigger condition as "1": makes the app run under any circumstances. (Solved in this stack overflow thread)
Setting my appplication's behavior as default: with this the app will start after every boot and it is important to mention that this is the only app (designed by me) running by default
calling the other behaviors with switch focus instead of runBehavior: by switching the focus the next behavior will run and when it finishes, it comes back to the menu.
Here is the code that I used (it doesn't work here because you need to download some software before):
var session = new QiSession(function(session) {
console.log("Connection esterblished!");
}, function() {
console.log("Could not connect to the robot");
});
function open_app(behavior_name) {
session.service("ALAutonomousLife").then(function(ALAutonomousLife) {
ALAutonomousLife.switchFocus(behavior_name, 1)
}).then(
console.log('Application cannot be switched to')
)
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Question Page</title>
<script src="/libs/qimessaging/2/qimessaging.js"></script>
</head>
<body>
<button class="app-button" onclick="open_app('mynewapp-5d8038/.')">Open app</button>
<!-- "mynewapp-5d8038/." is the direction to the behavior you want to run, not the app-->
</body>
</html>
Hope that someone else finds this info useful.
In Choregraphe, you can set your installed behavior as "default".
The Default Behaviors are played automatically at robot startup.
Also note that trigger conditions express when an app can be run, not when it should or must.
You probably want to develop the application as a service outside of Choregraphe. General robot-jumpstarter toolkit may be useful for creating a template here. You may look at an example application creating a service and a webpage to display subtitles of what Pepper says at NLPPepperTools.

Playback authentication for RTSP (vods3)

I'm facing an issue while setting RTP/Authentication/PlayMethod to "basic" for my vods3 application. As soon as I make the change, restart WOWZA, and then go the streaming engine manager, the option "RTSP/RTP" in playback type is disabled.
My goal is to have authenticated playback through RTSP. Any help is appreciated
Here's the section of my Application.xml:
Thanks in advance.
<RTP>
<!-- RTP/Authentication/[type]Methods defined in Authentication.xml. Default setup includes; none, basic, digest -->
<Authentication>
<PublishMethod>block</PublishMethod>
<PlayMethod>basic</PlayMethod>
</Authentication>
<!-- RTP/AVSyncMethod. Valid values are: senderreport, systemclock, rtptimecode -->
<AVSyncMethod>senderreport</AVSyncMethod>
<MaxRTCPWaitTime>12000</MaxRTCPWaitTime>
<IdleFrequency>75</IdleFrequency>
<RTSPSessionTimeout>90000</RTSPSessionTimeout>
<RTSPMaximumPendingWriteBytes>0</RTSPMaximumPendingWriteBytes>
<RTSPBindIpAddress></RTSPBindIpAddress>
<RTSPConnectionIpAddress>0.0.0.0</RTSPConnectionIpAddress>
<RTSPOriginIpAddress>127.0.0.1</RTSPOriginIpAddress>
<IncomingDatagramPortRanges>*</IncomingDatagramPortRanges>
<!-- Properties defined here will override any properties defined in conf/RTP.xml for any depacketizers loaded by this application -->
<Properties>
</Properties>
</RTP>
I got the response at WOWZA forum:
https://www.wowza.com/forums/showthread.php?49259-Problem-with-playmethod-quot-Basic-quot-and-RTSP-(vods3)&p=163751#post163751

Strange behaviour when uploading scaled file using Fine Uloader

I have implemented FileUploader 4.4 and it works perfectly when uploading multiple files using Coldfusion.
The end point code is very simple and looks like this:
<cffile action="upload"
destination="#application.Config.imageDir#"
nameconflict="overwrite"
filefield="FORM.qqFile" />
<cfif CFFILE.contenttype EQ "image" OR ListFindNoCase("jpg,jpeg,gif,png", CFFILE.serverFileExt)>
<cfset local.fileName = CFFILE.serverFile />
</cfif>
Whenever I upload single, or multiple images, the local.filename variable is correctly set to the image file name value that you usually see in qqfilename, for example "image0001.jpg"
The javasript code to send this data is simply:
$('#fine-uploader').fineUploader({
request: {
endpoint: '<cfoutput>#application.Config.fineUploaderProxy#?cfc=#cfcName#&functionName=#functionName#</cfoutput>'
}
});
However, as soon as I add scaling, then a strange behaviour starts occurring. The scaled version is sent to my upload handler, however, the file name that is being sent is always "blob" for every scaled image, instead of the name I would expect, being something like
"image0001(small).jpg"
The code I add to activate the scaling is simply:
$('#fine-uploader').fineUploader({
scaling: {
sizes: [
{name: "small", maxSize: 50}
]
},
request: {
endpoint: '<cfoutput>#application.Config.fineUploaderProxy#?cfc=#cfcName#&functionName=#functionName#</cfoutput>'
}
});
Could someone please help me as to why the filename "blob" is being with the qqfile instead of the actual file name? I am using the latest version of Chrome.
Thanks
This is due to the fact that Fine Uploader doesn't actually send a File when it generates a scaled version off a reference file. The entity is specifically a Blob. While a File has a name property, a Blob does not. It is because of this that the browser, when constructing the multipart segment for a Blob, sets the filename parameter to "blob". There are ways to overcome this, but not reliably cross browser. So, Fine Uploader will always send the actual file name in a "qqfilename" parameter. Your server should look at this value to reliably determine the files name in all cases.

ZURB Foundation: CDN foundation.min.js with fallback to local

I want to load a CDN version of foundation.min.js with a local fallback. The question is: How can I detect if foundation.js is loaded?
I saw it done done with jQuery, modernizr, Bootstrap ... but I can't find the code for Foundation.
It should look like this except the part "window.Foundation":
<!-- jsDelivr CDN -->
<script src="//cdn.jsdelivr.net/foundation/4.3.1/js/foundation.min.js"></script>
<!-- Fallback to local -->
<script>window.Foundation || document.write('<script src="/js/vendor/foundation.min.js"><\/script>')</script>
Ok, it turned out that my original code was actually correct. Foundation is actual JavaScript object and I had a typo somewhere else. So, to sum up ... you can load foundation.min.js from CDN with a local fallback like this:
<!-- jsDelivr CDN -->
<script src="//cdn.jsdelivr.net/foundation/4.3.1/js/foundation.min.js"></script>
<!-- Fallback to local -->
<script>window.Foundation || document.write('<script src="/js/vendor/foundation.min.js"><\/script>')</script>
If anyone is interested I've created the gist with CDN/local fallback for all Foundation required files:
gist.github.com/kevinwake/6208601
RequireJS might be one option for you.
From sections 4.6.2 and 4.6.3 at http://requirejs.org/docs/api.html#pathsfallbacks
requirejs.config({
//To get timely, correct error triggers in IE, force a define/shim exports check.
enforceDefine: true,
paths: {
jquery: [
'http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min',
//If the CDN location fails, load from this location
'lib/jquery'
]
}
});
//Later
require(['jquery'], function ($) {
});
This above code will try the CDN location, but if that fails, fall back to the local lib/jquery.js location.
Good luck!

logout not working in IPAD

Really weird think happening with my site!
I have a "welcome {{user.email}}" in the top of my base.html page! So far was working fine, but when I tested the site in a IPAD2 and Iphone4, I saw that, the login part wasnt working right!What I mean by that is, if I am logged in the welcome message has been showing, but if I logout, some pages are still showing the welcome message in the top, but if I reload the page then it works fine afterwards! It seems that JUST ipad is holding some kind of cache! is it that even possible?
Just for record I am not using cache in my django app! my settings.py file has:
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
}
}
So, I know that django is not messing things up! it is something with ipad!(client side)
does someone have a clue about it?!
EDIT
I tried already adding;
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
and
<meta http-equiv="Cache-control" content="no-cache">
no success so far though.
EDIT2:
This is happening in Safari also! but just in Safari and MAC os!! using Safari in windows works fine!
you're probably holding it wrong...
if you really think it's client side maybe you can try to add some meta tags for cache control and see if that helps.