Set UDP port of VLC server for RTP streaming on Windows 10












0















I ran into an issue when streaming a video using RTP with VLC in Windows 10.



I have 2 laptops, one for streaming a short video using RTP over UDP and another one for receiving and displaying the video stream.
My concern is that I can stream to a given destination address and port e.g. 10.0.0.140:5006 but I cannot stream from the same port of a given address e.g. 10.0.0.130:5006. The server port (one the first laptop) has to be the same as the client port.



I followed a tutorial to stream a video using RTP / MPEG Transport Stream and I checked on Wireshark but I always have the streaming source port not set to 5006 as I wanted (Instead, it opens random server ports).



I checked on the internet for an answer to this but I found nothing helpful for my problem. I also checked in VLC preferences I set RTP port to 5006 but still the same behavior...



Does anyone know how to change udp server port of VLC to stream exclusively from port 5006 ?



Thanks!










share|improve this question



























    0















    I ran into an issue when streaming a video using RTP with VLC in Windows 10.



    I have 2 laptops, one for streaming a short video using RTP over UDP and another one for receiving and displaying the video stream.
    My concern is that I can stream to a given destination address and port e.g. 10.0.0.140:5006 but I cannot stream from the same port of a given address e.g. 10.0.0.130:5006. The server port (one the first laptop) has to be the same as the client port.



    I followed a tutorial to stream a video using RTP / MPEG Transport Stream and I checked on Wireshark but I always have the streaming source port not set to 5006 as I wanted (Instead, it opens random server ports).



    I checked on the internet for an answer to this but I found nothing helpful for my problem. I also checked in VLC preferences I set RTP port to 5006 but still the same behavior...



    Does anyone know how to change udp server port of VLC to stream exclusively from port 5006 ?



    Thanks!










    share|improve this question

























      0












      0








      0








      I ran into an issue when streaming a video using RTP with VLC in Windows 10.



      I have 2 laptops, one for streaming a short video using RTP over UDP and another one for receiving and displaying the video stream.
      My concern is that I can stream to a given destination address and port e.g. 10.0.0.140:5006 but I cannot stream from the same port of a given address e.g. 10.0.0.130:5006. The server port (one the first laptop) has to be the same as the client port.



      I followed a tutorial to stream a video using RTP / MPEG Transport Stream and I checked on Wireshark but I always have the streaming source port not set to 5006 as I wanted (Instead, it opens random server ports).



      I checked on the internet for an answer to this but I found nothing helpful for my problem. I also checked in VLC preferences I set RTP port to 5006 but still the same behavior...



      Does anyone know how to change udp server port of VLC to stream exclusively from port 5006 ?



      Thanks!










      share|improve this question














      I ran into an issue when streaming a video using RTP with VLC in Windows 10.



      I have 2 laptops, one for streaming a short video using RTP over UDP and another one for receiving and displaying the video stream.
      My concern is that I can stream to a given destination address and port e.g. 10.0.0.140:5006 but I cannot stream from the same port of a given address e.g. 10.0.0.130:5006. The server port (one the first laptop) has to be the same as the client port.



      I followed a tutorial to stream a video using RTP / MPEG Transport Stream and I checked on Wireshark but I always have the streaming source port not set to 5006 as I wanted (Instead, it opens random server ports).



      I checked on the internet for an answer to this but I found nothing helpful for my problem. I also checked in VLC preferences I set RTP port to 5006 but still the same behavior...



      Does anyone know how to change udp server port of VLC to stream exclusively from port 5006 ?



      Thanks!







      udp streaming port vlc rtp






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 19 '18 at 9:34









      DavidDavid

      12




      12
























          1 Answer
          1






          active

          oldest

          votes


















          0














          I finally found out the solution by myself.



          I did not set a static UDP server port, but I redirect the packets on postrouting using Ubuntu over a Virtual Machine.



          To post-redirect the packets, I opened a terminal, and followed the two following steps:





          1. Declare the wanted UDP port number in iptables



            iptables -A OUTPUT -p udp --sport 5006 --dport 5006  -j ACCEPT



          2. Redirect output data in nat's table to the previously declared UDP port number



            iptables -t nat -A POSTROUTING -o eth0 -p udp -j SNAT --to :5006



          This method allows to redirect any UDP packets output to source port 5006 before sending them on the network.






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53371751%2fset-udp-port-of-vlc-server-for-rtp-streaming-on-windows-10%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            I finally found out the solution by myself.



            I did not set a static UDP server port, but I redirect the packets on postrouting using Ubuntu over a Virtual Machine.



            To post-redirect the packets, I opened a terminal, and followed the two following steps:





            1. Declare the wanted UDP port number in iptables



              iptables -A OUTPUT -p udp --sport 5006 --dport 5006  -j ACCEPT



            2. Redirect output data in nat's table to the previously declared UDP port number



              iptables -t nat -A POSTROUTING -o eth0 -p udp -j SNAT --to :5006



            This method allows to redirect any UDP packets output to source port 5006 before sending them on the network.






            share|improve this answer




























              0














              I finally found out the solution by myself.



              I did not set a static UDP server port, but I redirect the packets on postrouting using Ubuntu over a Virtual Machine.



              To post-redirect the packets, I opened a terminal, and followed the two following steps:





              1. Declare the wanted UDP port number in iptables



                iptables -A OUTPUT -p udp --sport 5006 --dport 5006  -j ACCEPT



              2. Redirect output data in nat's table to the previously declared UDP port number



                iptables -t nat -A POSTROUTING -o eth0 -p udp -j SNAT --to :5006



              This method allows to redirect any UDP packets output to source port 5006 before sending them on the network.






              share|improve this answer


























                0












                0








                0







                I finally found out the solution by myself.



                I did not set a static UDP server port, but I redirect the packets on postrouting using Ubuntu over a Virtual Machine.



                To post-redirect the packets, I opened a terminal, and followed the two following steps:





                1. Declare the wanted UDP port number in iptables



                  iptables -A OUTPUT -p udp --sport 5006 --dport 5006  -j ACCEPT



                2. Redirect output data in nat's table to the previously declared UDP port number



                  iptables -t nat -A POSTROUTING -o eth0 -p udp -j SNAT --to :5006



                This method allows to redirect any UDP packets output to source port 5006 before sending them on the network.






                share|improve this answer













                I finally found out the solution by myself.



                I did not set a static UDP server port, but I redirect the packets on postrouting using Ubuntu over a Virtual Machine.



                To post-redirect the packets, I opened a terminal, and followed the two following steps:





                1. Declare the wanted UDP port number in iptables



                  iptables -A OUTPUT -p udp --sport 5006 --dport 5006  -j ACCEPT



                2. Redirect output data in nat's table to the previously declared UDP port number



                  iptables -t nat -A POSTROUTING -o eth0 -p udp -j SNAT --to :5006



                This method allows to redirect any UDP packets output to source port 5006 before sending them on the network.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Dec 20 '18 at 10:42









                DavidDavid

                12




                12






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53371751%2fset-udp-port-of-vlc-server-for-rtp-streaming-on-windows-10%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Guess what letter conforming each word

                    Port of Spain

                    Run scheduled task as local user group (not BUILTIN)