Recent

Author Topic: [SOLVED]use ffmpeg read impossible with sdpo video  (Read 1000 times)

LaurentDelaon

  • New Member
  • *
  • Posts: 21
[SOLVED]use ffmpeg read impossible with sdpo video
« on: March 21, 2024, 04:56:31 pm »
Hi everybody,

Under ubuntu18.04 I read a usbcam with Sdpo Video uvcpf_BGR24 ans 480x640.
The device is an usbcam  is /dev/video6 and /dev/video7.
It's works i can read it.

If I duplicate this device like this  :
Code: Pascal  [Select][+][-]
  1. //via loopback create video 2 3 4
  2. sudo modprobe  v4l2loopback devices=4 exclusive_caps=1:
  3. // duplicate video6 to video2
  4. ffmpeg -f video4linux2 -i /dev/video6 -codec copy -f v4l2 /dev/video2
  5.  
Now i cannot read /dev/video2 wich is the same as video6...
Same problem with another camera.

Seem due to metadata which are in video7 ?
How can I solve this ?
Thank's for your help.
Regards.
« Last Edit: May 10, 2024, 11:25:03 am by LaurentDelaon »
lazarus 2.2.0
lazarus 2.2.0
fpc 3.2.2
linux x86 gtk2 ubuntu 18.04.6LTS

LaurentDelaon

  • New Member
  • *
  • Posts: 21
[SOLVED] use ffmpeg read impossible with sdpo video
« Reply #1 on: May 10, 2024, 11:19:41 am »
Hi,

the solution is to modify the  sdpo lib lig=32:
Code: Pascal  [Select][+][-]
  1. const
  2.   VIDEO_BUFFERS = 3;

The last value buffer is 4. This value 3 work fine with the direct device said video0 but not with copy device video2 as describe.
Set to 3 solve the problem in each case. Maybe a zero based index.
(don't forget to stop
Code: Pascal  [Select][+][-]
  1. ffmpeg -f video4linux2 -i /dev/video6 -codec copy -f v4l2 /dev/video2
for testing direct video0 access...)

regard
Laurent.
« Last Edit: May 10, 2024, 11:25:46 am by LaurentDelaon »
lazarus 2.2.0
lazarus 2.2.0
fpc 3.2.2
linux x86 gtk2 ubuntu 18.04.6LTS

 

TinyPortal © 2005-2018