3 Replies Latest reply on Nov 9, 2015 4:28 PM by CMata_Intel

    ffmpeg video streaming error

    falak.desai@yahoo.com


      hello everyone,

       

      I'm using ffmpeg to stream video.  But the problem is when I run the following command to stream video, it gives the error:

       

       

      root@edison:-  ffmpeg -s 320x240 -f video4linux2 -i /dev/video0 -f mpeg1video  -b 800k -r 30 http://192.168.1.9:8080


      Connection to tcp://192.168.1.9:8080 failed: Connection refused

      http://192.168.1.9:8080: Connection refused



      How should I solve this ?

        • 1. Re: ffmpeg video streaming error
          CMata_Intel

          Hi Falak,

           

          How are you installing FFMPEG?

          Could you attach all the log you are getting after your command?

          Also, are you editing the ffserver.conf? ffserver - FFMPEG

           

          Regards,

          Charlie

          • 2. Re: ffmpeg video streaming error
            falak.desai@yahoo.com

            Hi CMata_Intel,

             

            I installed ffmpeg  from the instructions given in edi-cam git repository.

            I also installed ffmpeg  on my ubuntu 14.04 machine. And I built that from source.   but still the same error is appearing.

             

             

             

            ********

            do_ffmpeg.sh file contains following command:

             

            #!/bin/sh

            /home/root/ffmpeg/ ffmpeg -s 320x240 -f video4linux2 -i /dev/video0 -f mpeg1video -b 800k -r 30 http://192.168.1.9:8080

             

            (where 192.168.1.9 is my edison ip  &  /home/root/ffmpeg is the folder where my ffmpeg is installed)

             

             

             

            ********

            edison output log:-

             

            root@edison:~/ffmpeg# ./do_ffmpeg.sh


            ffmpeg version 2.8.1-static http://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2015 the FFmpeg developers

              built with gcc 4.9.3 (Debian 4.9.3-4)

              configuration: --enable-gpl --enable-version3 --disable-shared --disable-debug --enable-runtime-cpudetect --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libwebp --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libfreetype --enable-fontconfig --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --enable-libopus --enable-libass --enable-gnutls --enable-libvidstab --enable-libsoxr --enable-frei0r --enable-libfribidi --cc=gcc-4.9

              libavutil      54. 31.100 / 54. 31.100

              libavcodec    56. 60.100 / 56. 60.100

              libavformat    56. 40.101 / 56. 40.101

              libavdevice    56.  4.100 / 56.  4.100

              libavfilter    5. 40.101 /  5. 40.101

              libswscale      3.  1.101 /  3.  1.101

              libswresample  1.  2.101 /  1.  2.101

              libpostproc    53.  3.100 / 53.  3.100

            Input #0, video4linux2,v4l2, from '/dev/video0':

              Duration: N/A, start: 1041.689040, bitrate: 36864 kb/s

                Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 320x240, 36864 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc

            Please use -b:a or -b:v, -b is ambiguous

            [tcp @ 0xba67b60]    Connection to tcp://192.168.1.10:8080 failed: Connection refused

            http://192.168.1.10:8080: Connection refused





            ********


            Ubuntu output log:-

             

            (where 192.168.1.33 is my ubuntu machine ip)

             

            root@Linux:~/Desktop$  ffmpeg -s 320x240 -f video4linux2 -i /dev/video0 -f mpeg1video -b 800k -r 30 http://192.168.1.33:8080

             

             

            ffmpeg version 2.8.1 Copyright (c) 2000-2015 the FFmpeg developers

              built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)

              configuration:

              libavutil      54. 31.100 / 54. 31.100

              libavcodec     56. 60.100 / 56. 60.100

              libavformat    56. 40.101 / 56. 40.101

              libavdevice    56.  4.100 / 56.  4.100

              libavfilter     5. 40.101 /  5. 40.101

              libswscale      3.  1.101 /  3.  1.101

              libswresample   1.  2.101 /  1.  2.101

            Input #0, video4linux2,v4l2, from '/dev/video0':

              Duration: N/A, start: 2057.572086, bitrate: 36864 kb/s

                Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 320x240, 36864 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc

            Please use -b:a or -b:v, -b is ambiguous

            [tcp @ 0xa3ef820] Connection to tcp://192.168.1.33:8080 failed: Connection refused

            http://192.168.1.33:8080: Connection refused



            *******

            how do I solve this error ?

            • 3. Re: ffmpeg video streaming error
              CMata_Intel

              Hi Falak,

               

              The file bin/do_ffmpeg.sh is intended to be used alongside with the server.js code. You are getting that error due to that.

              If you don’t want to use the server.js file you need to start using ffserver.

               

              Regards,

              Charlie