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
Related
I have a perplexing issue. I have Web Service A (henceforth WSA), a 3.5 .Net WCF, which I have added a call to Web Service B (henceforth WSB) which is a 3.5 .Net ASMX. When running WSA in the client (SOAPUI or WCFStorm), the WSB call times out per the client timeout setting.
In the VS event viewer I can see that the call to WSB immediately throws two error 400s:
Exception thrown: 'System.Net.WebException' in System.dll ("The remote
server returned an error: (400) Bad Request."). Exception thrown:
'System.Net.WebException' in System.dll ("The remote server returned
an error: (400) Bad Request.")
No reason is given. What is just as puzzling to me is the error doesn't go to my catch. When I debug and I hit the line of code that calls WSB, it's like a reset. No further code gets executed and no error is thrown by my WSA.
If I call WSB directly, it works. So nothing is wrong with WSB. At suggestion of a coworker, I took the code specific to my change and put it in a stand-alone service. I literally C&P the code and configs setting specific to me and adjust namespaces and class names. Lo and behold it works. My stand-alone web service called WSB just fine and get the data I expect.
A coworker and I checked the logs (IIS log for the service and the HTTPERR log) on the IIS server that WSB resides on to see if there was any mention of the 400 error. We found none.
So we are kind of perplexed at this point. The only thing we can think of is perhaps something in the web config might be interfering but have no idea what it could be.
If you have any suggestions of where else to look that would be helpful.
And it would be nice to know why it isn't falling into my error handler.
Thanks.
Update: It was requested I add config and code. I don't think it will help honestly and it is pretty straightforward. I can't put the real code due to company reasons but it is basically this:
In web config:
<configuration>
<appSettings>
<add key="endpointUrl" value = "someurl" />
</appSettings>
.
.
.
<applicationSettings>
<MyService.Properties.Settings>
<setting name="MyService_TheirService"
serializeAs="String">
<value>someurl</value>
</setting>
</MyService.Properties.Settings>
</applicationSettings>
Even though the data is super small I did try making large reader settings and such:
<binding name="CustomHtttpBinding" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" closeTimeout="01:50:00" openTimeout="01:50:00" sendTimeout="01:50:00" receiveTimeout="01:50:00" >
<readerQuotas maxDepth="128"
maxStringContentLength="8388608"
maxArrayLength="2147483646"
maxBytesPerRead="4096"
maxNameTableCharCount="16384" />
</binding>
Code:
using MyService.TheirService
.
.
.
var theirURL = ConfigurationManager.AppSettings["endpointUrl"];
var oSvc = new TheirServiceObject
{
Url = theirURL
};
int numberIneed = oSvc.SomeMethod();
That last line is where it throws the 400.
UPDATE 2:
A colleague show me how to use Fiddler. And I can now see that the request to WSB is absolute garbage.
xڭ s 6 mr!!u \ .3 5'3 G QOH>Iп kX M3 ~vY ) X e Z
w ~ :jv -ݴwڽHb Yqv A :(Q Z; >9W O0g 6 .ɖVlU Ţ 8Z
< ( t eSv U]r R $N \
Some odd encoding? At least it's another clue.
Wanted to let you know this problem was solved. Another Dev that had worked on this service before but no longer just happened to walk by and I said "Hey! Look at this!"
They saw the garbage request data and said "That looks like compression. Look up compression in the project."
Turn out there was a custom compression component that was compressing the outgoing data of the service and you needed to add 2 lines of code to decompress. After adding those lines to the top of my method everything immediately worked.
The lesson here is if your project is doing some weird stuff that defies reason, try and find as many people as you can that worked on it before even if they aren't working on it anymore.
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.
I have HttpTaskAsyncHandler in my sitecore solution and i call it I have sutup IngnoreUrlPrefix and etc.
By some reason i can't get access to SC.Context.Database Database is null in ProcessRequestAsync(HttpContext context) method,
it looks like I don't access to Sitecore context in HttpHandler.
How to resolve it ?
Thanks.
You wont be able to access Sitecore Context (Database or Item) in the Handler. We have confirmed this with Sitecore Support for our task.
The best way is Implement a Processor in the Request pipeline begin.
How to Implement
Inherit HttpRequestProcessor in your class found in (using Sitecore.Pipelines.HttpRequest;)
and add that Processor after SiteResolver in < httpRequestBegin >
<processor type="Sitecore.Pipelines.HttpRequest.SiteResolver, Sitecore.Kernel" />
<!-- Custom Module -->
<processor type="SND641.Customization.RobotsModule, SND641" />
If you choose to ignore your script file (by using IgnoreUrlPrefix), then you it will not be processed by Sitecore's request pipeline and thus will not have a Sitecore context.
I think you can solve it by removing your url prefix from IgnoreUrlPrefix and make sure the file extension of your handler is added to the allowed extensions parameter of the FilterUrlExtensions pipeline processor:
<processor type="Sitecore.Pipelines.HttpRequest.FilterUrlExtensions, Sitecore.Kernel">
<param desc="Allowed extensions (comma separated)">aspx</param>
</processor>
This way you can call your script and still have Sitecore process all the pipelines.
You can get context without pipeline. Along with web.config handler definition, you will need to add under customHandler. It helps in getting sitecore context. E.g
<customHandlers>
<handler trigger="blogfeed.xml" handler="blogfeed.xml" />
</customHandlers>
I'm sorry if I'm not getting exactly what you are trying to do. But by working with handlers I did have issues that my code was not able to access the sitecore object even when I updated the web.config and
I noticed that my handler was like this:
public class GetHandler: IHttpHandler
{
...
}
by adding the System.web.SessionState.IrequiresSessionStatem, like this:
public class GetHandler : IHttpHandler, System.Web.SessionState.IRequiresSessionState
{....}
then everything started to work and I was able to get items from sitecore without issues:
Public void ProcessRequest(HttpContext context)
{
Database webdb = Factory.GetDatabase("web");
}
previous my change the webdb was coming with nothing and the code was coming back with "Command "Sitecore.Database" is not valid"
after that changes, as I said, everything worked for me.
I hope this helps and adds some value to the existing answers.
regards,
I'm playing around with XSockets.NET, and I've spent way too much time debugging what should be a simple problem. I'm using the standard templates that come with XSockets, which create a project called XSockets.DevServer, and a class within that project called DebugInstance. When I host this DebugInstance class within my web project, all seems to work as expected. However, when I try to host it within the XSockets.Debug.Console project, or when I try to get it to run on my production IIS instance, I get a NullReferenceException in the code below:
[ImportOne(typeof(IXBaseServerContainer))]
public IXBaseServerContainer wss { get; set; }
public DebugInstance()
{
try
{
Debug.AutoFlush = true;
this.ComposeMe();
// NullReferenceException on the next line - wss apparently never gets set.
wss.OnServersStarted += wss_OnServersStarted;
wss.OnServerClientConnection += wss_OnServerClientConnection;
wss.OnServerClientDisconnection += wss_OnServerClientDisconnection;
wss.OnError += wss_OnError;
wss.OnIncommingTextData += wss_OnIncommingTextData;
wss.OnOutgoingText += wss_OnOutgoingText;
wss.OnServersStopped += wss_OnServersStopped;
wss.StartServers();
}
catch (Exception ex)
{
Debug.WriteLine("Exception while starting server: " + ex);
Debug.WriteLine("Press enter to quit");
}
}
Clearly the problem is happening within this.ComposeMe(), but there's no troubleshooting information, and since XSockets isn't apparently open-sourced, I haven't been able to step through the code to figure out where the problem is.
EDIT: To be clear, I know what a NullReferenceException is. In this case its immediate cause is the fact that wss is null. What I want to know is its proximate cause, i.e., why ComposeMe() doesn’t assign it, even though that's what it's apparently supposed to be doing. Apparently the homegrown IOC that XSockets is using to support its plugin architecture is supposed to find an instance of IXBaseServerContainer, but it's apparently not - and I have no idea why. And not having the source, I'm not even sure what the candidates for IXBaseServerContainer are.
EDIT 2012-11-06: Here's what the appSettings element of my app.config looks like:
<appSettings>
<add key="XSocketServerStartport" value="4502"/>
<add key="UsePolicyServer" value="true"/>
<add key="XSockets.PluginCatalog" value="XSockets\XSocketServerPlugins\"/>
<add key="XSockets.PluginFilter" value="*.dll"/>
<add key="XMessageInterceptorsEnabled" value="false"/>
<add key="XErrorInterceptorsEnabled" value="false"/>
<add key="XConnectionInterceptorsEnabled" value="false"/>
<add key="XHandshakeInterceptorsEnabled" value="false"/>
<add key="XSocketLogPath" value="XSockets\XSocketServerPlugins\Log"/>
<add key="XBufferSize" value="8192"/>
</appSettings>
I've got all the files mentioned below in both my $(ProjectDir)\XSockets\XSocketServerPlugins\ and my $(TargetDir)\XSockets\XSocketServerPlugins\ folders, e.g.:
10/29/2012 09:53 AM 15,872 XSockets.Core.Communication.dll
10/29/2012 09:53 AM 70,656 XSockets.Core.dll
10/29/2012 09:53 AM 8,192 XSockets.DevelopmentServer.dll
10/29/2012 09:53 AM 11,776 XSockets.Extensibility.Handlers.dll
10/29/2012 09:53 AM 10,240 XSockets.Extensibility.Interceptors.dll
10/29/2012 09:53 AM 23,040 XSockets.External.dll
10/29/2012 09:53 AM 24,064 XSockets.Protocol.dll
10/29/2012 09:53 AM 39,424 XSockets.Server.dll
11/05/2012 05:37 PM 12,288 XSockets.WebRTC.Prototype.Shared.Handlers.dll
Any thoughts?
Ken,
When the plugin framework of XSockets.NET dont find any "plugins" there is nothing to Compose. I think the reason of this is that you don't have the "plugins" deployed in the IIS Production instance of yours?
You will need to add the following elements to your appSettings section of the config file(web.config)
<add key="XSockets.PluginCatalog" value="XSockets\XSocketServerPlugns\" />
<add key="XSockets.PluginFilter" value="*.dll" />
In "my case" i have the XSockets.NET plugins (protocols, handlers/controllers) inside the
/XSockets/XSocketServerPlugns folder in my Website.
you should have the following plugins ( .dll's) in that folder
XSockets.Core.Communication
XSockets.Core
XSockets.Extensibility.Handlers
XSockets.Extensibility.Interceptors
Xsockets.External
XSockets.Protocol
XSockets.Server
XSockets.DevelopmentServer **
** This is the project/class library that contains the server of yours. ( i.e the DebugInstance)
If you want to configure the server , you will need to create a configuration loader class see this url for info http://xsockets.net/api/net-c/creating-custom-configuration-plugin , or just shoot an email to contact#xsockets.net and we will help you out.
If you need further assistance, just let me know.
Kind regards
First of all, if you are running a Console Application switch to .NET 4 instead of the default .NET 4 client profile (if not done already).
Second. We will provide a better way of knowing which references to add to the project starting the server.
Meanwhile you should be able to run this in the Package Manager Console to see what refs are needed
(Get-Project XSocketHandler).Object.References | Where-Object {$_.CopyLocal -eq $true}
You have my email, so please contact me and we can have a skype meeting or something to talk more about it.
Regards
Uffe, Team XSockets
Can any one give me idea how to use Remember me check box in spring security for custom authentication,
this is my remember me field in login page
and this is the configuration in secuirty.xml
thanks
As defined in Spring Docs, when one declares a "remember-me", the "user-service-ref" should be:
"The remember-me services implementations require access to a
UserDetailsService, so there has to be one defined in the application
context."
However, in your case, your user-service-ref is a ref to a bean of type MyCustomAuthentication. This is why you get the ClassCastException "MyCustomAuthentication cannot be cast to UserDetailsService".
You should define something like:
<security:user-service id="userDetailsService">
<security:user name="username" password="pass" authorities="ROLE_USER" />
</security:user-service>
and use this id in the "user-service-ref"
P.S. IMHO you will have to fix your authentication-provider as well
HTH
For your request, to be more precise:
<http auto-config="true" use-expressions="true">
...
<remember-me user-service-ref="customUserDetailsManager"/>
</http>
<b:bean id="customUserDetailsManager"
class="com.something.something.MyCustomUserDetailsManager" />
<authentication-manager>
<authentication-provider user-service-ref="customUserDetailsManager">
</authentication-provider>
</authentication-manager>
</b:beans>
Note that MyCustomUserDetailsManager should implement UserDetailsManager
Another important note (from the docs):
Note that both (Spring's) implemementations require a
UserDetailsService. If you are using an authentication provider which
doesn't use a UserDetailsService (for example, the LDAP provider) then
it won't work unless you also have a UserDetailsService bean in your
application context.