Can't access the video frames from Webcams (Original SJCAM SJ4000 Air 4K Wi-Fi Action Camera 16MP or Stopmotion Explosion USB 2.0 HD Pro Widescreen Video Full 1080p Webcam)

Hi Khadas Community,
I was following the tutorial to run YOLO on my new VIM3 from this link:
But I was having the issue with the command ./detect_demo_uvc /dev/video0 2 . It shows the error that directory not present, it was maybe saying about the /dev/video0 directory, I have tried it with both of my USB webcams namely Original SJCAM SJ4000 Air 4K Wi-Fi Action Camera 16MP or Stopmotion Explosion USB 2.0 HD Pro Widescreen Video Full 1080p Webcam but both returned same error. Also As SJCAM SJ4000 is an action cam, it has a PC cam mode that makes it work as a webcam. While I was inside the Ubuntu Desktop Xfce GUI, I also tried to install cheese to see is the camera supported their, but it also returns an error that video can’t be streamed. I also tried to install ffmpeg before but it gave me error “sub-process /usr/bin/dpkg returned an error code 1 in ffmpeg”.

If any of this error makes sense to anyone or someone has any solution or workaround, please share it with me, I would really appreciate it. I desperately need it to work.

Thanks, Regards

@CodeLogist In general, USB cameras should be able to be used in Ubuntu firmware. Even if you just use cheese to open it, you will get an error, right? Can you post the wrong information

1 Like

Thanks for your time and reply.
Yes, I was unable to see the video frames using cheese in Ubuntu. Cheese says “There was an error playing video from the webcam”. I tried to reduce the resolution in cheese preference but the error was same. I don’t know what to do now. If you have any other software recommendation to play video camera frames. It would be good. Also if anybody can solve the ffmpeg installation error posted in the thread description, please do it.

Thanks Regards.

@CodeLogist Which mode that you use to install ffmpeg ? Or could you tell me how to recurrent you error ?

1 Like

I used terminal command to install ffmpeg: sudo apt-get install ffmpeg and it returned me this error: sub-process /usr/bin/dpkg returned an error code 1 in ffmpeg

@CodeLogist OK, I will try it later.

Yeah, Thank you very much for your help. I hope you get it working as soon as possible and guide me to the solution

@CodeLogist Follow up my commad to install


Thank you very much. I’ll follow it. Are you using khadas ubuntu 4.9 or latest 5.1? And will I be able to use my webcam using cheese after this installation?

I really appreciate your effort and contribution to this amazing community.

1 Like

@CodeLogist Maybe It have some new problem with gst. There is a conflict between ffmeg and libpaler. They both need to overwrite the same files. If you install ffmpeg with --force ,then you will lose libplayer. This leads to gst problems . If I don’t install ffpeg, I can use cheese with my webcam. I don’t have a same webcam with you .So you can try it ,but maybe have some problems.