No internet connection
  1. Home
  2. Technical Support

H.264 remote and STUN server enabled

By Ed @Eds
    2024-03-18 19:00:08.017Zassigned to
    • @david

    Hi there,

    Having an issue with playing audio and streaming using H.264. I have been through the other tickets and appears that everything is working and the Janus server is up and running and active.

    Do I need port forwarding?

    I am trying to access it remotely and whilst I can get the MJPEG working fine H.264 refuses. I am using the STUN google service and it just doesn't appear to work.

    Do I need a port opened?

    Log can be found:
    https://logs.tinypilotkvm.com/jLeHI3YR

    • 10 replies
    1. David @david2024-03-19 11:49:15.986Z

      Hi @Eds, I'm sorry you're running into H.264 issues when using your TinyPilot remotely.

      Thanks for sharing those logs! I can't see any obvious issues in the logs, unfortunately.

      When we see H.264 issues when connecting to TinyPilot remotely, we typically suggest using a STUN server. Since you've set up a STUN server and it's not working, it suggests there's something else going wrong here.

      Can I ask how you're connecting to your TinyPilot remotely? Are you using a service like Tailscale or remote.it?

      Your replies to other threads were directly related to this post, I've removed those replies so we can focus on your issue in its own dedicated thread.

      Please let me know if you have any questions.

      1. EEd @Eds
          2024-03-20 08:44:55.487Z

          Hi @david - Thanks for your replies and of course tidying up the other posts. Much appreciated.

          So I have tested Tailscale and I get the same issue, but I am connecting directly to the box as the primary way. Using 443 initially and using that, as I would within the same network.

          Both give me the exclamation mark on the bottom left and the h.264 error and this reverts back to the MJPEG setting.

          Could this be a firewall issue of some kind? Seems like a blocking of a port or something?

          1. David @david2024-03-20 19:38:09.900Z

            Thanks for those details, @Eds.

            If you've followed our port forwarding FAQ guide, or tried a tool like Tailscale, there shouldn't be any additional set up.

            Can I ask which browser you're using to access the TinyPilot web interface? It's worth trying different browsers to check if you have the same behavior when trying H.264.

            1. EEd @Eds
                2024-03-20 23:49:41.736Z

                I am using safari on iOS and also duck duck go again on iOS.

                This setup works locally but not remotely, yes everything is setup and I can connect and use the tinypilot fine the only issue I have is with H264 and remote audio. I get the yellow exclamation mark on the bottom left.

                I have also tested via Windows and Chrome and the same issue exists.

                1. David @david2024-03-21 12:29:31.761Z

                  Thanks for the update!

                  Have your tried Firefox on Windows? We've found that Firefox tends to support H.264 streaming a little better than other browers.

                  Are you trying to access your TinyPilot from a public network? Some networks, like ones in hotels, may block WebRTC, causing H.264 to fail.

                  1. EEd @Eds
                      2024-03-24 22:11:57.067Z

                      Hi @david, same issue here am afraid.

                      Firefox exhibits the same issue as the other browsers. Locally this works as expected.

                      1. David @david2024-03-25 12:11:26.783Z

                        Thanks for trying Firefox!

                        Usually, when H.264 isn't working, a STUN server resolves the issue by acting as an intermediary for the peer-to-peer connection that H.264 requires. So if that's not working, it suggests there's an issue with the network(s) or an odd software state.

                        If you're not on a public network (like a hotel/coffee shop), I have a couple of ideas.

                        Could you try specifying a different STUN server? It looks like you're currently using the Google STUN server. Could you try the GMX STUN server in TinyPilot's video settings?

                        If the other STUN server doesn't work, my only other suggestion is to try a factory reset to put your TinyPilot back into its factory state. From there, you could re-install Tailscale and try H.264 again (with a STUN server if needed). I understand that's not ideal, but it's worth trying if we've exhausted all other options.

                        Please let me know if you have any questions.

                        1. EEd @Eds
                            2024-03-25 18:48:15.742Z

                            Would this still be working locally (where I am on the same network as the tinypilot) if there was an issue?

                            I am currently not in the same timezone as my tinypilot so makes a factory reset all the more difficult and would rather not for now if possible.

                            It's because I am no longer on the same network this appears to be an issue but again I am not sure what the cause may actually be? Are there no logs or connectivity tests I can check? Prior to doing a factory reset?

                            I have used both STUN servers and the same result in both cases unfortunately.

                            1. David @david2024-03-26 12:23:47.197Z

                              Thanks for the update!

                              Would this still be working locally (where I am on the same network as the tinypilot) if there was an issue?

                              It depends where the issue lies. For instance, if the issue is with some part of the configuration for using your TinyPilot remotely, then your TinyPilot could still work locally with no symptoms.

                              Are there no logs or connectivity tests I can check?

                              I'm not sure if there's much we can check. I've brought this up with the rest of the team, so we'll take a look into this and I'll let you know when I have an update. Thanks for your patience on this.

                              1. David @david2024-04-02 12:37:28.192Z

                                Thanks so much for your patience on this, @Eds.

                                We may be able to dig further into this if we have a TinyPilot log alongside a browser log.

                                Could you switch to H.264 and the Google STUN server on your TinyPilot and then share a new TinyPilot log and your browser's log?

                                You can find the console log in most browsers by right clicking the screen, clicking the "Inspect" item, and then selecting the "Console" tab. If you're using Firefox, you can right-click on a message and select "Copy all messages", if you're using Chrome, you can right click a message and select "Save as" to save the console messages in a file.

                                Please let me know if you have any questions.