How do I watch my webcams feed in linux

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
8
down vote

favorite
2












In windows I can open "My Computer" and click on the "Webcam" icon to get a feed from my webcam. I can also take snapshots of that feed.



Can I do the same in Ubuntu? Without installing any extra applications like Photobooth.










share|improve this question

















  • 3




    mplayer tv://device=/dev/video
    – Stefan
    Oct 20 '10 at 7:13










  • @Stefan: can you? that's too simple!
    – phunehehe
    Oct 20 '10 at 8:47










  • "Without installing any extra applications". That's a pretty weird and severe constraint. I would just install something like cheese.
    – Wim Coenen
    Oct 20 '10 at 9:43











  • @phunene, well it works for me.... sometimes
    – Stefan
    Oct 20 '10 at 13:40











  • @phunehehe: Yes, we can ;-)
    – echox
    Oct 20 '10 at 17:36














up vote
8
down vote

favorite
2












In windows I can open "My Computer" and click on the "Webcam" icon to get a feed from my webcam. I can also take snapshots of that feed.



Can I do the same in Ubuntu? Without installing any extra applications like Photobooth.










share|improve this question

















  • 3




    mplayer tv://device=/dev/video
    – Stefan
    Oct 20 '10 at 7:13










  • @Stefan: can you? that's too simple!
    – phunehehe
    Oct 20 '10 at 8:47










  • "Without installing any extra applications". That's a pretty weird and severe constraint. I would just install something like cheese.
    – Wim Coenen
    Oct 20 '10 at 9:43











  • @phunene, well it works for me.... sometimes
    – Stefan
    Oct 20 '10 at 13:40











  • @phunehehe: Yes, we can ;-)
    – echox
    Oct 20 '10 at 17:36












up vote
8
down vote

favorite
2









up vote
8
down vote

favorite
2






2





In windows I can open "My Computer" and click on the "Webcam" icon to get a feed from my webcam. I can also take snapshots of that feed.



Can I do the same in Ubuntu? Without installing any extra applications like Photobooth.










share|improve this question













In windows I can open "My Computer" and click on the "Webcam" icon to get a feed from my webcam. I can also take snapshots of that feed.



Can I do the same in Ubuntu? Without installing any extra applications like Photobooth.







linux ubuntu video






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Oct 20 '10 at 7:06









fox

4012510




4012510







  • 3




    mplayer tv://device=/dev/video
    – Stefan
    Oct 20 '10 at 7:13










  • @Stefan: can you? that's too simple!
    – phunehehe
    Oct 20 '10 at 8:47










  • "Without installing any extra applications". That's a pretty weird and severe constraint. I would just install something like cheese.
    – Wim Coenen
    Oct 20 '10 at 9:43











  • @phunene, well it works for me.... sometimes
    – Stefan
    Oct 20 '10 at 13:40











  • @phunehehe: Yes, we can ;-)
    – echox
    Oct 20 '10 at 17:36












  • 3




    mplayer tv://device=/dev/video
    – Stefan
    Oct 20 '10 at 7:13










  • @Stefan: can you? that's too simple!
    – phunehehe
    Oct 20 '10 at 8:47










  • "Without installing any extra applications". That's a pretty weird and severe constraint. I would just install something like cheese.
    – Wim Coenen
    Oct 20 '10 at 9:43











  • @phunene, well it works for me.... sometimes
    – Stefan
    Oct 20 '10 at 13:40











  • @phunehehe: Yes, we can ;-)
    – echox
    Oct 20 '10 at 17:36







3




3




mplayer tv://device=/dev/video
– Stefan
Oct 20 '10 at 7:13




mplayer tv://device=/dev/video
– Stefan
Oct 20 '10 at 7:13












@Stefan: can you? that's too simple!
– phunehehe
Oct 20 '10 at 8:47




@Stefan: can you? that's too simple!
– phunehehe
Oct 20 '10 at 8:47












"Without installing any extra applications". That's a pretty weird and severe constraint. I would just install something like cheese.
– Wim Coenen
Oct 20 '10 at 9:43





"Without installing any extra applications". That's a pretty weird and severe constraint. I would just install something like cheese.
– Wim Coenen
Oct 20 '10 at 9:43













@phunene, well it works for me.... sometimes
– Stefan
Oct 20 '10 at 13:40





@phunene, well it works for me.... sometimes
– Stefan
Oct 20 '10 at 13:40













@phunehehe: Yes, we can ;-)
– echox
Oct 20 '10 at 17:36




@phunehehe: Yes, we can ;-)
– echox
Oct 20 '10 at 17:36










4 Answers
4






active

oldest

votes

















up vote
14
down vote



accepted










Since you want an answer "without installing any extra applications like Photobooth," I've tried to give a solution that doesn't depend on very much. Also I'm assuming that your webcam uses "Video4Linux2" and that it is /dev/video0. If this is a modern webcam and if you only have one, these are pretty good assumptions.



From the command line:



$ gst-launch-0.10 v4l2src device=/dev/video0 ! xvimagesink


Note that "v4l2src" contains a lowercase L and not the number 1. On your system the command may be gst-launch or something starting with gst-launch but with a different version number. Tab completion should help you find the exact command name. This tool is in the gstreamer0.10-tools package on my Ubuntu system, which is a dependency of libgstreamer, which is a dependency of a large number of the apps on my Ubuntu system and is likely present in the default installation.



Other Applications



If you don't mind installing other applications, here is how you can do this in a few other applications. All of them can easily be installed via apt-get or another package manager of your choosing:




  • VLC: $ vlc v4l2:///dev/video0 Also, you can do this from the VLC GUI by going to File->Open Capture Device


  • mplayer: mplayer tv://device=/dev/video01 (from Stefan in the comments)


  • Cheese: This is a photobooth-like app that is very simple to use.





share|improve this answer





























    up vote
    3
    down vote













    guvcview



    This program is ideal for screencasts, as it can show just the camera on a window and nothing else:



    sudo apt-get install guvcview
    guvcview




    Then just use any screen recorder to make a feed. recordmydesktop works fine.



    Tested on Ubuntu 18.04.



    Related questions:



    • https://askubuntu.com/questions/536563/screen-recorder-webcam

    • https://askubuntu.com/questions/48245/webcam-apps-and-ways-of-checking-if-webcam-is-working





    share|improve this answer





























      up vote
      2
      down vote













      Or you can try mpv command



      mpv /dev/video0





      share|improve this answer



























        up vote
        0
        down vote













        A slightly different syntax worked for me using mplayer:



        mplayer -tv device=/dev/video1 tv://


        I am using a plugged-in webcam (not the built-in). So I changed /dev/video0 to /dev/video1. But Stefan's syntax above seemed to default to the built-in because of an argument parsing error. See marked lines in the output:



        baxelrod@it6598 ~ $ mplayer tv://device=/dev/video1
        MPlayer 1.2.1 (Debian), built with gcc-5.3.1 (C) 2000-2016 MPlayer Team
        mplayer: could not connect to socket
        mplayer: No such file or directory
        Failed to open LIRC support. You will not be able to use your remote control.
        Playing tv://device=/dev/video1.
        The filename option must be an integer: dev/video1 <--
        Struct tv, field filename parsing error: dev/video1 <--
        TV file format detected.
        ...
        Selected device: Integrated Camera <--
        ...


        When I use the syntax I posted, I don't get the error lines, and I get this instead:



        Selected device: UVC Camera (046d:081b)





        share|improve this answer




















          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          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',
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          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%2funix.stackexchange.com%2fquestions%2f3304%2fhow-do-i-watch-my-webcams-feed-in-linux%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          4 Answers
          4






          active

          oldest

          votes








          4 Answers
          4






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          14
          down vote



          accepted










          Since you want an answer "without installing any extra applications like Photobooth," I've tried to give a solution that doesn't depend on very much. Also I'm assuming that your webcam uses "Video4Linux2" and that it is /dev/video0. If this is a modern webcam and if you only have one, these are pretty good assumptions.



          From the command line:



          $ gst-launch-0.10 v4l2src device=/dev/video0 ! xvimagesink


          Note that "v4l2src" contains a lowercase L and not the number 1. On your system the command may be gst-launch or something starting with gst-launch but with a different version number. Tab completion should help you find the exact command name. This tool is in the gstreamer0.10-tools package on my Ubuntu system, which is a dependency of libgstreamer, which is a dependency of a large number of the apps on my Ubuntu system and is likely present in the default installation.



          Other Applications



          If you don't mind installing other applications, here is how you can do this in a few other applications. All of them can easily be installed via apt-get or another package manager of your choosing:




          • VLC: $ vlc v4l2:///dev/video0 Also, you can do this from the VLC GUI by going to File->Open Capture Device


          • mplayer: mplayer tv://device=/dev/video01 (from Stefan in the comments)


          • Cheese: This is a photobooth-like app that is very simple to use.





          share|improve this answer


























            up vote
            14
            down vote



            accepted










            Since you want an answer "without installing any extra applications like Photobooth," I've tried to give a solution that doesn't depend on very much. Also I'm assuming that your webcam uses "Video4Linux2" and that it is /dev/video0. If this is a modern webcam and if you only have one, these are pretty good assumptions.



            From the command line:



            $ gst-launch-0.10 v4l2src device=/dev/video0 ! xvimagesink


            Note that "v4l2src" contains a lowercase L and not the number 1. On your system the command may be gst-launch or something starting with gst-launch but with a different version number. Tab completion should help you find the exact command name. This tool is in the gstreamer0.10-tools package on my Ubuntu system, which is a dependency of libgstreamer, which is a dependency of a large number of the apps on my Ubuntu system and is likely present in the default installation.



            Other Applications



            If you don't mind installing other applications, here is how you can do this in a few other applications. All of them can easily be installed via apt-get or another package manager of your choosing:




            • VLC: $ vlc v4l2:///dev/video0 Also, you can do this from the VLC GUI by going to File->Open Capture Device


            • mplayer: mplayer tv://device=/dev/video01 (from Stefan in the comments)


            • Cheese: This is a photobooth-like app that is very simple to use.





            share|improve this answer
























              up vote
              14
              down vote



              accepted







              up vote
              14
              down vote



              accepted






              Since you want an answer "without installing any extra applications like Photobooth," I've tried to give a solution that doesn't depend on very much. Also I'm assuming that your webcam uses "Video4Linux2" and that it is /dev/video0. If this is a modern webcam and if you only have one, these are pretty good assumptions.



              From the command line:



              $ gst-launch-0.10 v4l2src device=/dev/video0 ! xvimagesink


              Note that "v4l2src" contains a lowercase L and not the number 1. On your system the command may be gst-launch or something starting with gst-launch but with a different version number. Tab completion should help you find the exact command name. This tool is in the gstreamer0.10-tools package on my Ubuntu system, which is a dependency of libgstreamer, which is a dependency of a large number of the apps on my Ubuntu system and is likely present in the default installation.



              Other Applications



              If you don't mind installing other applications, here is how you can do this in a few other applications. All of them can easily be installed via apt-get or another package manager of your choosing:




              • VLC: $ vlc v4l2:///dev/video0 Also, you can do this from the VLC GUI by going to File->Open Capture Device


              • mplayer: mplayer tv://device=/dev/video01 (from Stefan in the comments)


              • Cheese: This is a photobooth-like app that is very simple to use.





              share|improve this answer














              Since you want an answer "without installing any extra applications like Photobooth," I've tried to give a solution that doesn't depend on very much. Also I'm assuming that your webcam uses "Video4Linux2" and that it is /dev/video0. If this is a modern webcam and if you only have one, these are pretty good assumptions.



              From the command line:



              $ gst-launch-0.10 v4l2src device=/dev/video0 ! xvimagesink


              Note that "v4l2src" contains a lowercase L and not the number 1. On your system the command may be gst-launch or something starting with gst-launch but with a different version number. Tab completion should help you find the exact command name. This tool is in the gstreamer0.10-tools package on my Ubuntu system, which is a dependency of libgstreamer, which is a dependency of a large number of the apps on my Ubuntu system and is likely present in the default installation.



              Other Applications



              If you don't mind installing other applications, here is how you can do this in a few other applications. All of them can easily be installed via apt-get or another package manager of your choosing:




              • VLC: $ vlc v4l2:///dev/video0 Also, you can do this from the VLC GUI by going to File->Open Capture Device


              • mplayer: mplayer tv://device=/dev/video01 (from Stefan in the comments)


              • Cheese: This is a photobooth-like app that is very simple to use.






              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Oct 20 '10 at 20:01

























              answered Oct 20 '10 at 15:33









              Steven D

              31.7k696108




              31.7k696108






















                  up vote
                  3
                  down vote













                  guvcview



                  This program is ideal for screencasts, as it can show just the camera on a window and nothing else:



                  sudo apt-get install guvcview
                  guvcview




                  Then just use any screen recorder to make a feed. recordmydesktop works fine.



                  Tested on Ubuntu 18.04.



                  Related questions:



                  • https://askubuntu.com/questions/536563/screen-recorder-webcam

                  • https://askubuntu.com/questions/48245/webcam-apps-and-ways-of-checking-if-webcam-is-working





                  share|improve this answer


























                    up vote
                    3
                    down vote













                    guvcview



                    This program is ideal for screencasts, as it can show just the camera on a window and nothing else:



                    sudo apt-get install guvcview
                    guvcview




                    Then just use any screen recorder to make a feed. recordmydesktop works fine.



                    Tested on Ubuntu 18.04.



                    Related questions:



                    • https://askubuntu.com/questions/536563/screen-recorder-webcam

                    • https://askubuntu.com/questions/48245/webcam-apps-and-ways-of-checking-if-webcam-is-working





                    share|improve this answer
























                      up vote
                      3
                      down vote










                      up vote
                      3
                      down vote









                      guvcview



                      This program is ideal for screencasts, as it can show just the camera on a window and nothing else:



                      sudo apt-get install guvcview
                      guvcview




                      Then just use any screen recorder to make a feed. recordmydesktop works fine.



                      Tested on Ubuntu 18.04.



                      Related questions:



                      • https://askubuntu.com/questions/536563/screen-recorder-webcam

                      • https://askubuntu.com/questions/48245/webcam-apps-and-ways-of-checking-if-webcam-is-working





                      share|improve this answer














                      guvcview



                      This program is ideal for screencasts, as it can show just the camera on a window and nothing else:



                      sudo apt-get install guvcview
                      guvcview




                      Then just use any screen recorder to make a feed. recordmydesktop works fine.



                      Tested on Ubuntu 18.04.



                      Related questions:



                      • https://askubuntu.com/questions/536563/screen-recorder-webcam

                      • https://askubuntu.com/questions/48245/webcam-apps-and-ways-of-checking-if-webcam-is-working






                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Nov 21 at 9:16

























                      answered Dec 5 '16 at 23:33









                      Ciro Santilli 新疆改造中心 六四事件 法轮功

                      4,69824038




                      4,69824038




















                          up vote
                          2
                          down vote













                          Or you can try mpv command



                          mpv /dev/video0





                          share|improve this answer
























                            up vote
                            2
                            down vote













                            Or you can try mpv command



                            mpv /dev/video0





                            share|improve this answer






















                              up vote
                              2
                              down vote










                              up vote
                              2
                              down vote









                              Or you can try mpv command



                              mpv /dev/video0





                              share|improve this answer












                              Or you can try mpv command



                              mpv /dev/video0






                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Jul 4 at 17:52









                              hungptit

                              1212




                              1212




















                                  up vote
                                  0
                                  down vote













                                  A slightly different syntax worked for me using mplayer:



                                  mplayer -tv device=/dev/video1 tv://


                                  I am using a plugged-in webcam (not the built-in). So I changed /dev/video0 to /dev/video1. But Stefan's syntax above seemed to default to the built-in because of an argument parsing error. See marked lines in the output:



                                  baxelrod@it6598 ~ $ mplayer tv://device=/dev/video1
                                  MPlayer 1.2.1 (Debian), built with gcc-5.3.1 (C) 2000-2016 MPlayer Team
                                  mplayer: could not connect to socket
                                  mplayer: No such file or directory
                                  Failed to open LIRC support. You will not be able to use your remote control.
                                  Playing tv://device=/dev/video1.
                                  The filename option must be an integer: dev/video1 <--
                                  Struct tv, field filename parsing error: dev/video1 <--
                                  TV file format detected.
                                  ...
                                  Selected device: Integrated Camera <--
                                  ...


                                  When I use the syntax I posted, I don't get the error lines, and I get this instead:



                                  Selected device: UVC Camera (046d:081b)





                                  share|improve this answer
























                                    up vote
                                    0
                                    down vote













                                    A slightly different syntax worked for me using mplayer:



                                    mplayer -tv device=/dev/video1 tv://


                                    I am using a plugged-in webcam (not the built-in). So I changed /dev/video0 to /dev/video1. But Stefan's syntax above seemed to default to the built-in because of an argument parsing error. See marked lines in the output:



                                    baxelrod@it6598 ~ $ mplayer tv://device=/dev/video1
                                    MPlayer 1.2.1 (Debian), built with gcc-5.3.1 (C) 2000-2016 MPlayer Team
                                    mplayer: could not connect to socket
                                    mplayer: No such file or directory
                                    Failed to open LIRC support. You will not be able to use your remote control.
                                    Playing tv://device=/dev/video1.
                                    The filename option must be an integer: dev/video1 <--
                                    Struct tv, field filename parsing error: dev/video1 <--
                                    TV file format detected.
                                    ...
                                    Selected device: Integrated Camera <--
                                    ...


                                    When I use the syntax I posted, I don't get the error lines, and I get this instead:



                                    Selected device: UVC Camera (046d:081b)





                                    share|improve this answer






















                                      up vote
                                      0
                                      down vote










                                      up vote
                                      0
                                      down vote









                                      A slightly different syntax worked for me using mplayer:



                                      mplayer -tv device=/dev/video1 tv://


                                      I am using a plugged-in webcam (not the built-in). So I changed /dev/video0 to /dev/video1. But Stefan's syntax above seemed to default to the built-in because of an argument parsing error. See marked lines in the output:



                                      baxelrod@it6598 ~ $ mplayer tv://device=/dev/video1
                                      MPlayer 1.2.1 (Debian), built with gcc-5.3.1 (C) 2000-2016 MPlayer Team
                                      mplayer: could not connect to socket
                                      mplayer: No such file or directory
                                      Failed to open LIRC support. You will not be able to use your remote control.
                                      Playing tv://device=/dev/video1.
                                      The filename option must be an integer: dev/video1 <--
                                      Struct tv, field filename parsing error: dev/video1 <--
                                      TV file format detected.
                                      ...
                                      Selected device: Integrated Camera <--
                                      ...


                                      When I use the syntax I posted, I don't get the error lines, and I get this instead:



                                      Selected device: UVC Camera (046d:081b)





                                      share|improve this answer












                                      A slightly different syntax worked for me using mplayer:



                                      mplayer -tv device=/dev/video1 tv://


                                      I am using a plugged-in webcam (not the built-in). So I changed /dev/video0 to /dev/video1. But Stefan's syntax above seemed to default to the built-in because of an argument parsing error. See marked lines in the output:



                                      baxelrod@it6598 ~ $ mplayer tv://device=/dev/video1
                                      MPlayer 1.2.1 (Debian), built with gcc-5.3.1 (C) 2000-2016 MPlayer Team
                                      mplayer: could not connect to socket
                                      mplayer: No such file or directory
                                      Failed to open LIRC support. You will not be able to use your remote control.
                                      Playing tv://device=/dev/video1.
                                      The filename option must be an integer: dev/video1 <--
                                      Struct tv, field filename parsing error: dev/video1 <--
                                      TV file format detected.
                                      ...
                                      Selected device: Integrated Camera <--
                                      ...


                                      When I use the syntax I posted, I don't get the error lines, and I get this instead:



                                      Selected device: UVC Camera (046d:081b)






                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Mar 14 at 18:01









                                      Ben

                                      1012




                                      1012



























                                           

                                          draft saved


                                          draft discarded















































                                           


                                          draft saved


                                          draft discarded














                                          StackExchange.ready(
                                          function ()
                                          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f3304%2fhow-do-i-watch-my-webcams-feed-in-linux%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

                                          Peggy Mitchell

                                          Palaiologos

                                          The Forum (Inglewood, California)