
Recherche avancée
Médias (1)
-
SWFUpload Process
6 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
Autres articles (103)
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs
Sur d’autres sites (13420)
-
Revision 37427 : mmmh c’est l’inverse manuel écrit brutalement ... non manuel d’une manière ...
19 avril 2010, par kent1@… — Logmmmh c’est l’inverse manuel écrit brutalement ... non manuel d’une manière plus smooth
-
Revision 36871 : amélioreations de pas mal de choses
2 avril 2010, par kent1@… — Logamélioreations de pas mal de choses
-
v4l2loopback+ffmpeg input for uvc gadget
13 mai, par MosiI'm trying to use an MP4 video file as the input for a UVC Gadget setup on my Raspberry Pi 4 Model B, but I'm running into an issue when streaming through V4L2.


Goal :


To emulate a webcam that streams a looping MP4 video file to a Windows 11 host.


My setup :


- 

- Hardware : Raspberry Pi 4 Model B
- OS : Raspberry Pi OS Lite 64-bit (
2025-05-06-raspios-bookworm-arm64-lite
) - Kernel :
6.12.25+rpt-rpi-v8
- Host System : Windows 11
- UVC Gadget version :
v0.3.0












Workflow :


[MP4 Video] → [FFmpeg] → [V4L2 Loopback] → [UVC Gadget] → Windows sees virtual webcam



What works :


The UVC Gadget works perfectly when I use a real webcam as the source (e.g.,
/dev/video0
). Windows detects the virtual webcam and displays a smooth video stream.

The problem :


When I try to use an MP4 video file through FFmpeg and send it to the loopback device (
/dev/video3
), the UVC Gadget fails with the following error :


Command I'm using :


ffmpeg -re -stream_loop -1 -i input.mp4 -vf scale=640:480 \
 -c:v rawvideo -pix_fmt yuyv422 -r 30 -f v4l2 /dev/video3



Then I run :


sudo uvc-gadget -d /dev/video3 uvc.0



Output :


bRequestType 21 bRequest 01 wValue 0200 wIndex 0001 wLength 0022
streaming request (req SET_CUR cs 02)
setting commit control, length = 34
Setting format to 0x56595559 640x480
=== Setting frame rate to 30 fps
Starting video stream.
--> [At this point I open the camera on the Windows host]
/dev/video3: 2 buffers requested.
Failed to export buffer 0.
Failed to export buffers on source: Inappropriate ioctl for device (25)




Things I've tried :


- 

- Multiple FFmpeg formats, resolutions, and pixel formats
- Various
ffmpeg
buffer and framerate tweaks - Different UVC Gadget versions
- GitHub related projects (
showcamera
, etc.) - Older Raspberry Pi OS versions












Most guides and GitHub projects I found are outdated (5+ years old), and newer methods seem undocumented or incompatible with current kernel/UVC gadget tools.



My question :


How can I stream an MP4 file as a virtual webcam using UVC Gadget without getting ioctl errors ?

Is there a proper way to set up FFmpeg and loopback devices so that UVC Gadget can read the stream correctly ?

Any modern working example or tips would be very appreciated. Thanks in advance !