none
RDP7.1 RemoteFX/NSCodec Lossless Mode + Frame Markers RRS feed

  • Question

  • Hi,

    I am trying to achieve the following:

    RDP7.1 session with either RemoteFX or NSCodec in lossless mode with frame markers when connecting to a Microsoft RDP server with a FreeRDP client. Lossless image compression is a project requirement, and this has to be true lossless compression, not visually lossless. RemoteFX in most cases is visually lossless, which means the loss is not visually noticeable most of the time, but the colors may be slightly off. As for frame markers, they make a HUGE difference in performance while also providing means of preventing screen tearing.

    NSCodec would fit the bill, but I haven't been able to get frame markers to work with them when connecting to a Microsoft RDP server. My FreeRDP-based server can send the frame markers and use them to dynamically adapt its encoding frame rate with both RemoteFX and NSCodec. Using frame markers with NSCodec doesn't appear to bother mstsc at all. Is it possible to get frame markers with NSCodec with the Microsoft RDP server? If so, then I must have something wrong in my capabilities negotiation, and I'd appreciate pointers in the specs that would help me fix this.

    If the Microsoft RDP server cannot send frame markers with NSCodec, then I'd be looking into configuring the compression levels for the RemoteFX encoder. I have tried changing the group policies which clearly state they affect the image quality levels (highest, medium and lowest) but I am always getting the same quantization values on the client. In my server, I am free to set those values to whatever I like to adapt the compression rate, but I could not find any option to tweak that in the Microsoft RDP server. I have been told that if those values are all set to their lowest compression value, RemoteFX would pretty much become lossless. The spec says the values for quantization range from 6 to 15, so if they can all be set to 6 I would get what I'm looking for.

    I do know that RDP8 offers a more official "lossless mode" but this is not what I'm looking for. NSCodec would fit the bill, but I can't get it to work with frame markers with the Microsoft RDP server. RemoteFX may fit the bill if I can configure the Microsoft RDP server to use the lowest compression quantization values. Technically there's enough in RDP7.1 to do what I want, but there's either something I'm missing in the specs or there's a way to configure the Microsoft RDP server to behave the way I need it to.

    Any help on this?

    Best regards,

    - Marc-Andre

    Thursday, October 3, 2013 5:58 PM

Answers

  • Forum update:

    This issue is resolved. The customer was sent the following response which he accepted:

    The AltSec Frame Markers ([MS-RDPEGDI] section 2.2.2.2.1.3.7) are used around graphics orders when using NsCodec with the legacy graphics pipeline. The TS_FRAME_MARKER is only used with the RemoteFX codec in vGPU scenarios.


    Regards, Obaid Farooqi

    Wednesday, January 6, 2016 1:04 AM
    Owner

All replies

  • Hi Marc-Andre,

    Thank you for your question. A member of the Protocol Documentation support team will respond to you soon.

    Regards,
    Vilmos Foltenyi - MSFT

    Thursday, October 3, 2013 6:48 PM
  • Hi Marc-Andre:

    I'll help you with this issue and will be in touch as soon as I have an answer.


    Regards, Obaid Farooqi

    Monday, October 7, 2013 4:33 PM
    Owner
  • Hi Marc-Andre:

    Can you please provide more information about what you are not receiving that you expect from Windows RDP server in terms of MS-RDPBCGR. So, as you mentioned, you are able to send frame markers with NSCodec to mstsc and it works fine. If you compare the traffic from your server and from a Windows RDP server, what command or flags you expect from Windows server that you are not receiving?

    If you have a decrypted network trace of your server sending frame markers to mstsc, please send me that identifying the frames that you are missing from Windows Server. You can send it to dochelp at Microsoft dot com to my attention.


    Regards, Obaid Farooqi

    Monday, October 7, 2013 7:28 PM
    Owner
  • Hi Obaid,

    What I am trying to get from the server is the Frame Marker Command (TS_FRAME_MARKER) when NSCodec is in use but not RemoteFX: http://msdn.microsoft.com/en-us/library/gg251228.aspx

    Both RemoteFX and NSCodec use surface commands, so looking at the spec there is no reason why I wouldn't be able to get the frame markers with NSCodec while I can with RemoteFX. I'm negotiating the usage of frame markers in the exact same way for RemoteFX and NSCodec. It works perfectly fine when negotiating RemoteFX, but I don't get any frame markers with NSCodec.

    As for a decrypted network trace with my server, I don't think it's really helpful, as I control if my server wants to send the frame acks or not. What I'm trying to figure out is why exactly I'm not getting the frame acks with the Microsoft RDP server. Obviously there is something I've been missing, or this specific use case hasn't really been tested before with the Microsoft RDP server and there is a bug.

    Best regards,

    - Marc-Andre

    Tuesday, October 8, 2013 11:07 PM
  • Hi Marc-Andre:

    Thanks for the info. I have enough details to move forward on this.


    Regards, Obaid Farooqi

    Wednesday, October 9, 2013 2:36 PM
    Owner
  • Hi Obaid,

    I just sent you decrypted packet captures at dochelp [at] microsoft [dot] com. I can see in Message Analyzer that I'm correctly getting the frame acks with RemoteFX, but not with NSCodec.

    Wednesday, October 9, 2013 11:46 PM
  • Forum update:

    This issue is resolved. The customer was sent the following response which he accepted:

    The AltSec Frame Markers ([MS-RDPEGDI] section 2.2.2.2.1.3.7) are used around graphics orders when using NsCodec with the legacy graphics pipeline. The TS_FRAME_MARKER is only used with the RemoteFX codec in vGPU scenarios.


    Regards, Obaid Farooqi

    Wednesday, January 6, 2016 1:04 AM
    Owner