Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Since a few days I am trying to get FFMPEG working in relation with FFSERVER. I would like to stream a live video source from /dev/video0 to the FFSERVER.

I have to tell you, in Ubuntu 10.4.3 it was simply working installed via apt-get install ffmpeg and with this command line:

ffserver & ffmpeg -r 15 -s 352x288 -f video4linux2 -i /dev/video0 http://localhost:8090/feed1.ffm

ffserver.conf :


Port 8090 BindAddress 0.0.0.0 MaxHTTPConnections 2000 MaxClients 1000 MaxBandwidth 10000 CustomLog - NoDaemon File /tmp/feed1.ffm FileMaxSize 5M ACL allow 127.0.0.1

    Feed feed1.ffm
    Format swf
    VideoFrameRate 5
    VideoBitRate 320
    VideoQMin 1
    VideoQMax 3
    VideoSize 352x288
    NoAudio

Now in Ubuntu 11.10 FFSERVER is running fine:

root@UBUNTU:~# ffserver
ffserver version git-2011-11-01-f955fdc, Copyright (c) 2000-2011 the FFmpeg developers
  built on Nov  1 2011 11:26:00 with gcc 4.6.1
  configuration: 
  libavutil    51. 22. 0 / 51. 22. 0
  libavcodec   53. 26. 0 / 53. 26. 0
  libavformat  53. 18. 0 / 53. 18. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 45. 3 /  2. 45. 3
  libswscale    2.  1. 0 /  2.  1. 0
Tue Nov  1 15:12:09 2011 FFserver started.

But, if i start the above command line in that ffmpeg version, i got the following:

root@UBUNTU:/# ffmpeg -s 352x288  -f video4linux2 -i /dev/video0 http://localhost:8090/feed1.ffm
ffmpeg version git-2011-11-01-f955fdc, Copyright (c) 2000-2011 the FFmpeg developers
  built on Nov  1 2011 11:26:00 with gcc 4.6.1
  configuration: 
  libavutil    51. 22. 0 / 51. 22. 0
  libavcodec   53. 26. 0 / 53. 26. 0
  libavformat  53. 18. 0 / 53. 18. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 45. 3 /  2. 45. 3
  libswscale    2.  1. 0 /  2.  1. 0
[video4linux2,v4l2 @ 0x178d8c0] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 15906.908910, bitrate: 48660 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 352x288, 48660 kb/s, 30 tbr, 1000k tbn, 30 tbc
[buffer @ 0x179b320] w:352 h:288 pixfmt:yuyv422 tb:1/1000000 sar:0/1 sws_param:
[buffersink @ 0x178fea0] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the filter 'out'
[scale @ 0x1792e80] w:352 h:288 fmt:yuyv422 -> w:352 h:288 fmt:yuv420p flags:0x4
[buffer @ 0x179b4e0] w:352 h:288 pixfmt:yuyv422 tb:1/1000000 sar:0/1 sws_param:
[scale @ 0x17a9b80] w:352 h:288 fmt:yuyv422 -> w:640 h:480 fmt:yuv420p flags:0x4
[mpeg1video @ 0x179ae20] codec type or id mismatches
Output #0, ffm, to 'http://localhost:8090/feed1.ffm':
    Stream #0:0: Video: flv1, yuv420p, 352x288, q=1-3, 320 kb/s, 1000k tbn, 30 tbc
    Stream #0:1: Video: flv1, yuv420p, 640x480, q=1-3, 320 kb/s, 1000k tbn, 30 tbc
Stream mapping:
  Stream #0.0 -> #0.0 (rawvideo -> mpeg1video)
  Stream #0.0 -> #0.1 (rawvideo -> mpeg1video)
Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height

dmesg 

easycap::0easycap_usb_probe: registered with videodev: 1=minor
[   25.961352] easycap::0easycap_usb_probe: ends successfully for interface 0
[   25.961379] easycap::0easycap_usb_probe: ends successfully for interface 1
[   25.961386] easycap::0easycap_usb_probe: audio hardware is AC'97
[   25.961519] easycap::0easycap_alsa_probe: registered EasyALSA1
[   25.961522] easycap::0easycap_usb_probe: ends successfully for interface 2
[   25.961548] usbcore: registered new interface driver easycap

Anyone an idea what i am doing wrong? Is there any alternative for stream a live content to a website?

Thanks

share|improve this question

closed as too localized by nitstorm, bodhi.zazen, Takkat, jrg Feb 26 '12 at 18:30

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
This question appears to be abandoned and unanswered, could you perhaps add more detail to your question? If this question no longer applies then you can either delete it or answer it yourself if you've solved the problem. Thanks! –  nitstorm Feb 26 '12 at 4:03

Browse other questions tagged or ask your own question.