Community
cancel
Showing results for 
Search instead for 
Did you mean: 
idata
Community Manager
2,044 Views

intel edison error:-ioctl(VIDIOC_STREAMON): Invalid argument

Hello everyone,

I'm trying to get video streaming over http using ffmpeg on my intel edison.

i'm using Logitech C270 camera as input.

I'm getting video stream without any problem for first few trials but

after some unspecific numbers of trials, when I'm running the command to stream, it gives the error.

Here is my log:-

//below is ffmpeg command & log:-

root@edison:~/testing# ffmpeg -vcodec mjpeg -f video4linux2 -i /dev/video0 http://192.168.0.171:8090/feed1.ffm http://192.168.0.171:8090/feed1.ffm

 

 

ffmpeg version 2.8.2-static http://johnvansickle.com/ffmpeg/ http://johnvansickle.com/ffmpeg/

 

Copyright (c) 2000-2015 the FFmpeg developers

built with gcc 5.2.1 (Debian 5.2.1-23) 20151028

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 --disable-indev=sndio --disable-outdev=sndio --cc=gcc

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

[video4linux2,v4l2 @ 0xa5d3f80] ioctl(VIDIOC_STREAMON): Invalid argument

/dev/video0: Invalid argument

when I searched on internet, I found the following link which has some useful information about the error. Here is thehttp://linuxtv.org/downloads/v4l-dvb-apis/vidioc-streamon.html Link

conclusion of this link is something like:- > buffer is still occupied

So what can I do to resolve this error ??

Are there any commands or tasks that I need to perform ?

Thank you

6 Replies
Pedro_M_Intel
Employee
207 Views

Hello mailto:falak.desai@yahoo.com falak.desai@yahoo.com,

Have you checked https://github.com/drejkim/edi-cam drejkim/edi-cam · GitHub? That project might be what you're looking for. I just tested it and it worked just fine, the only difference that I had to make from the guide is that instead of using MyEdison.local, I used the Edison's IP address both on the index.html file and on the browser's window. But apart from that, the guide is very simple and easy to follow.

It's definitely worth checking it out, why don't you try it?

Peter.

idata
Community Manager
207 Views

Hi Peter,

yes I know this repository, but I've already got the streaming which too works fine except for this buffer error.

So I'm looking for that solution.

Is there a hardware problem, or software that I have no idea about.

Thanks

 

Falak
MPapi
New Contributor I
207 Views

Falak,

If you do a 'dmesg | tail' is there anything of interest in there? It would seem that the camera is either "dropped" or disconnected.

Mario

Pedro_M_Intel
Employee
207 Views

I would also like to see dmesg shows anything of interest. Also, could you let us know how the error comes up? A screenshot of the error message would be of help. How did you install ffmpeg?

Peter.

Carlos_M_Intel
Employee
207 Views

Hi Falak,

Do you have updates on this?

Could you provide the output of dmesg | tail and the error message?

Regards,

Charlie

CJeng
Novice
207 Views

I have the same issue, when I use this command

ffmpeg -s 640x480 -f video4linux2 -i /dev/video0 -f mpeg1video -b:v 800k -r 30 http://127.0.0.1:8082/ http://127.0.0.1:8082/

The error msg

ffmpeg version N-79255-g6d7f566-static http://johnvansickle.com/ffmpeg/ http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2016 the FFmpeg developers

built with gcc 5.3.1 (Debian 5.3.1-13) 20160323

configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --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-amrwbenc --enable-gray --enable-libopenjpeg --enable-libopus --enable-libass --enable-gnutls --enable-libvidstab --enable-libsoxr --enable-frei0r --enable-libfribidi --disable-indev=sndio --disable-outdev=sndio --enable-librtmp --enable-libmfx --enable-libzimg --cc=gcc

libavutil 55. 20.100 / 55. 20.100

libavcodec 57. 34.100 / 57. 34.100

libavformat 57. 30.100 / 57. 30.100

libavdevice 57. 0.101 / 57. 0.101

libavfilter 6. 40.102 / 6. 40.102

libswscale 4. 1.100 / 4. 1.100

libswresample 2. 0.101 / 2. 0.101

libpostproc 54. 0.100 / 54. 0.100

[video4linux2,v4l2 @ 0xc0c5400] ioctl(VIDIOC_STREAMON): Invalid argument

/dev/video0: Invalid argument

This is my dmesg|tail

root@edison:~# dmesg | tail

[ 17.808851] snd_intel_sst: Stop for str 1 pipe 0x90

[ 17.809364] snd_intel_sst: Free for str 1 pipe 0x90

[ 17.811738] snd_intel_sst: runtime_idle called

[ 19.803911] snd_intel_sst: runtime_suspend called

[ 134.708926] dwc3-host dwc3-host.2: Signal while waiting for configure endpoint command

[ 134.719482] usb 1-1: Not enough bandwidth for altsetting 0

[ 139.139584] dwc3-host dwc3-host.2: xHCI xhci_drop_endpoint called with disabled ep f54e1cc0

[ 139.139617] dwc3-host dwc3-host.2: Trying to add endpoint 0x81 without dropping it.

[ 139.139646] usb 1-1: Not enough bandwidth for altsetting 11

[ 139.139672] dwc3-host dwc3-host.2: xHCI xhci_drop_endpoint called with disabled ep f54e1cc0

It won't error when I press q or ctrl+c and sys prints

Exiting normally, received signal 2.

In other words, when the process end without this msg, next time you run ffmpeg, shows error.

When the error happened, I need replug the usb or reboot the system.

When I use

ffmpeg -f video4linux2 -i /dev/video0 -f flv rtmp://127.0.0.1

, it doesn't have this kind error.

Reply