Recherche avancée

Médias (91)

Autres articles (52)

  • Soumettre améliorations et plugins supplémentaires

    10 avril 2011

    Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
    Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

Sur d’autres sites (7042)

  • How does FFmpeg determine the dispositions of an MP4 track ?

    5 mars, par obskyr

    The Issue

    


    FFmpeg has a concept of “dispositions” – a property that describes the purpose of a stream in a media file. For example, here are the streams in a file I have lying around, with the dispositions emphasized :

    


      Stream #0:0[0x1](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo,&#xA;fltp, 251 kb/s <strong><em>(default)</em></strong>&#xA;      Metadata:&#xA;        creation_time   : 2021-11-10T20:14:06.000000Z&#xA;        handler_name    : Core Media Audio&#xA;        vendor_id       : [0][0][0][0]&#xA;&#xA;  Stream #0:1[0x2](und): Video: mjpeg (Baseline) (jpeg / 0x6765706A),&#xA;yuvj420p(pc, bt470bg/unknown/unknown), 1024x1024, 0 kb/s, 0.0006 fps, 3.08 tbr,&#xA;600 tbn <strong><em>(default) (attached pic) (timed thumbnails)</em></strong>&#xA;      Metadata:&#xA;        creation_time   : 2021-11-10T20:14:06.000000Z&#xA;        handler_name    : Core Media Video&#xA;        vendor_id       : [0][0][0][0]&#xA;&#xA;  Stream #0:2[0x3](und): Data: bin_data (text / 0x74786574)&#xA;      Metadata:&#xA;        creation_time   : 2021-11-10T20:14:06.000000Z&#xA;        handler_name    : Core Media Text&#xA;&#xA;  Stream #0:3[0x0]: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/&#xA;unknown), 1024x1024 [SAR 144:144 DAR 1:1], 90k tbr, 90k tbn <strong><em>(attached pic)</em></strong>

    &#xA;

    However, if I make any modification to this file’s chapter markers using the C++ library MP4v2 (even just re-saving the existing ones : auto f = MP4Modify("test.m4a"); MP4Chapter_t* chapterList; uint32_t chapterCount; MP4GetChapters(f, &amp;chapterList, &amp;chapterCount); MP4SetChapters(f, chapterList, chapterCount); MP4Close(f);), some of these dispositions are removed :

    &#xA;

      Stream #0:0[0x1](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo,&#xA;fltp, 251 kb/s <strong><em>(default)</em></strong>&#xA;      Metadata:&#xA;        creation_time   : 2021-11-10T20:14:06.000000Z&#xA;        handler_name    : Core Media Audio&#xA;        vendor_id       : [0][0][0][0]&#xA;&#xA;  Stream #0:1[0x2](und): Video: mjpeg (Baseline) (jpeg / 0x6765706A),&#xA;yuvj420p(pc, bt470bg/unknown/unknown), 1024x1024, 0 kb/s, 0.0006 fps, 3.08 tbr,&#xA;600 tbn <strong><em>(default)</em></strong> <kbd>← “attached pic” and “timed thumbnails” removed!</kbd>&#xA;      Metadata:&#xA;        creation_time   : 2021-11-10T20:14:06.000000Z&#xA;        handler_name    : Core Media Video&#xA;        vendor_id       : [0][0][0][0]&#xA;&#xA;  Stream #0:2[0x0]: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/&#xA;unknown), 1024x1024 [SAR 144:144 DAR 1:1], 90k tbr, 90k tbn <strong><em>(attached pic)</em></strong>&#xA;&#xA;  Stream #0:3[0x4](und): Data: bin_data (text / 0x74786574)&#xA;  <kbd>This stream was moved to the end, but that’s intended behavior. It contains chapter titles, and we just edited the chapters.</kbd>&#xA;      Metadata:&#xA;        creation_time   : 2025-03-05T09:56:31.000000Z

    &#xA;

    It also renders the file unplayable in MPC-HC (but not in VLC !), which is apparently a bug in MP4v2. I’m currently investigating that bug to report and potentially fix it, but that’s a separate issue – in my journey there, I’m wracking my brain trying to understand what it is that MP4v2 changes to make FFmpeg stop reporting the “attached pic” and “timed thumbnails” dispositions. I’ve explored the before-and-afters in MP4 Box, and I can’t for the life of me find which atom it is that differs in a relevant way.

    &#xA;

    (I’d love to share the files, but unfortunately the contents are under copyright – if anyone knows of a way to remove the audio from an MP4 file without changing anything else, let me know and I’ll upload dummied-out versions. Without them, I can’t really ask about the issue directly. I can at least show you the files’ respective atom trees, but I’m not sure how relevant that is.)

    &#xA;

    The Question

    &#xA;

    I thought I’d read FFmpeg’s source code to find out how it determines dispositions for MP4 streams, but of course, FFmpeg is very complex. Could someone who’s more familiar with C and/or FFmpeg’s codebase help me sleuth out how FFmpeg determines dispositions for MP4 files (in particular, “attached pic” and “timed thumbnails”) ?

    &#xA;

    Some Thoughts…

    &#xA;

      &#xA;
    • I figure searching for “attached_pic” might be a good start ?
    • &#xA;

    • Could the MP4 muxer movenc.c be helpful ?
    • &#xA;

    • I’d imagine what we’d really like to look at is the MP4 demuxing process, as it’s during demuxing that FFmpeg determines dispositions from the data in the file. After poring over the code for hours, however, I’ve been utterly unable to find where that happens.
    • &#xA;

    &#xA;

  • v4l2loopback+ffmpeg input for uvc gadget

    13 mai, par Mosi

    I'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.

    &#xA;

    Goal :

    &#xA;

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

    &#xA;

    My setup :

    &#xA;

      &#xA;
    • Hardware : Raspberry Pi 4 Model B
    • &#xA;

    • OS : Raspberry Pi OS Lite 64-bit (2025-05-06-raspios-bookworm-arm64-lite)
    • &#xA;

    • Kernel : 6.12.25&#x2B;rpt-rpi-v8
    • &#xA;

    • Host System : Windows 11
    • &#xA;

    • UVC Gadget version : v0.3.0
    • &#xA;

    &#xA;

    Workflow :

    &#xA;

    [MP4 Video] → [FFmpeg] → [V4L2 Loopback] → [UVC Gadget] → Windows sees virtual webcam&#xA;

    &#xA;

    What works :

    &#xA;

    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.

    &#xA;

    The problem :

    &#xA;

    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 :

    &#xA;


    &#xA;

    Command I'm using :

    &#xA;

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

    &#xA;

    Then I run :

    &#xA;

    sudo uvc-gadget -d /dev/video3 uvc.0&#xA;

    &#xA;

    Output :

    &#xA;

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

    &#xA;


    &#xA;

    Things I've tried :

    &#xA;

      &#xA;
    • Multiple FFmpeg formats, resolutions, and pixel formats
    • &#xA;

    • Various ffmpeg buffer and framerate tweaks
    • &#xA;

    • Different UVC Gadget versions
    • &#xA;

    • GitHub related projects (showcamera, etc.)
    • &#xA;

    • Older Raspberry Pi OS versions
    • &#xA;

    &#xA;

    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.

    &#xA;


    &#xA;

    My question :

    &#xA;

    How can I stream an MP4 file as a virtual webcam using UVC Gadget without getting ioctl errors ?
    &#xA;Is there a proper way to set up FFmpeg and loopback devices so that UVC Gadget can read the stream correctly ?

    &#xA;

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

    &#xA;

  • FFmpeg matlab error : At least one output file must be specified ? [closed]

    3 mars, par as moh

    I'm trying to get I frames from a video using Matlab using this command system(sprintf(&#x27;ffmpeg -i testVid.mp4 -vf "select=eq(pict_type\,I)" -vsync vfr output_%03d.png&#x27;)); ,but i get this message

    &#xA;

     ffmpeg version 7.1-full_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers &#xA;  built with gcc 14.2.0 (Rev1, Built by MSYS2 project) &#xA;  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libopenjpeg --enable-libquirc --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-libqrencode --enable-librav1e --enable-libsvtav1 --enable-libvvenc --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-liblc3 --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint &#xA;  libavutil      59. 39.100 / 59. 39.100 &#xA;  libavcodec     61. 19.100 / 61. 19.100 &#xA;  libavformat    61.  7.100 / 61.  7.100 &#xA;  libavdevice    61.  3.100 / 61.  3.100 &#xA;  libavfilter    10.  4.100 / 10.  4.100 &#xA;  libswscale      8.  3.100 /  8.  3.100 &#xA;  libswresample   5.  3.100 /  5.  3.100 &#xA;  libpostproc    58.  3.100 / 58.  3.100 &#xA;Trailing option(s) found in the command: may be ignored. &#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;testVid.mp4&#x27;: &#xA;  Metadata: &#xA;    major_brand     : isom &#xA;    minor_version   : 512 &#xA;    compatible_brands: isomiso2avc1mp41 &#xA;    encoder         : Lavf57.83.100 &#xA;  Duration: 00:00:02.02, start: 0.000000, bitrate: 12798 kb/s &#xA;  Stream #0:0[0x1](eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuvj420p(pc, progressive), 1280x720 [SAR 1:1 DAR 16:9], 12662 kb/s, 29.74 fps, 30 tbr, 90k tbn (default) &#xA;      Metadata: &#xA;        handler_name    : VideoHandler &#xA;        vendor_id       : [0][0][0][0] &#xA;  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 121 kb/s (default) &#xA;      Metadata: &#xA;        handler_name    : SoundHandler &#xA;        vendor_id       : [0][0][0][0] &#xA;At least one output file must be specified &#xA;

    &#xA;

    i searched and tried many cases but i don't know where is the problem, any help please ?

    &#xA;