Recherche avancée

Médias (1)

Mot : - Tags -/musée

Autres articles (94)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-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

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

Sur d’autres sites (4733)

  • OpenCV 4.5.2 takes a long time (>100ms) to retrieve a single frame from a webcam, C++ on Windows 10

    9 juin 2021, par Mustard Tiger

    I've been having a tough time getting my webcam working quickly with opencv. Frames take a very long time to read, (a recorded average of 124ms across 500 frames) I've tried on three different computers (running Windows 10) with a logitech C922 webcam. The most recent machine I tested on has a Ryzen 9 3950X, with 32gbs of ram ; no lack of power.

    


    Here is the code :

    


    cv::VideoCapture cap = cv::VideoCapture(m_cameraNum);&#xA;&#xA;// Check if camera opened successfully&#xA;if (!cap.isOpened())&#xA;{&#xA;    m_logger->critical("Error opening video stream or file\n\r");&#xA;    return -1;&#xA;}&#xA;&#xA;bool result = true;&#xA;result &amp;= cap.set(cv::CAP_PROP_FRAME_WIDTH, 1280);&#xA;result &amp;= cap.set(cv::CAP_PROP_FRAME_HEIGHT, 720);&#xA;&#xA;bool ready = false;&#xA;std::vector<string> timeLog;&#xA;timeLog.reserve(50000);&#xA;int i = 0;&#xA;&#xA;while (i &lt; 500)&#xA;{&#xA;    auto start = std::chrono::system_clock::now();&#xA;    &#xA;    cv::Mat img;&#xA;    ready = cap.read(img);&#xA;&#xA;    // If the frame is empty, break immediately&#xA;    if (!ready)&#xA;    {&#xA;        timeLog.push_back("continue");&#xA;        continue;&#xA;    }&#xA;&#xA;    i&#x2B;&#x2B;;&#xA;    auto end = std::chrono::system_clock::now();&#xA;    timeLog.push_back(std::to_string(std::chrono::duration_cast(end - start).count()));&#xA;}&#xA;&#xA;for (auto&amp; entry : timeLog)&#xA;    m_logger->info(entry);&#xA;&#xA;cap.release();&#xA;return 0;&#xA;</string>

    &#xA;

    Notice that I write the elapsed time to a log file at the end of execution. The average time is 124ms for debug and release, and not one instance of "continue" after half a dozen runs.

    &#xA;

    It doesn't matter if I use USB 2 or USB 3 ports (the camera is USB2) or if I run a debug build or a release build, the log file will show anywhere from 110ms to 130ms of time for each frame. The camera works fine in other app, OBS can get a smooth 1080@30fps or 720@60fps.

    &#xA;

    Stepping through the debugger and doing a lot of Googling, I've learned the following about my system :

    &#xA;

      &#xA;
    • The backend chosen by default is DSHOW. GStreamer and FFMPEG are also available.
    • &#xA;

    • DSHOW uses FFMPEG somehow (it needs the FFMPEG dll) but I cannot use FFMPEG directly through opencv. Attempting to use cv::VideoCapture(m_cameraNum, cv::CAP_FFMPEG) always fails. It seems like Opencv's interface to FFMPEG is only capable of opening video files.
    • &#xA;

    • Microsoft really screwed up camera devices in Windows a few years back, not sure if this is related to my problem.
    • &#xA;

    &#xA;

    Here's a short list of the fixes I have tried, most taken from older SO posts :

    &#xA;

      &#xA;
    • result &= cap.set(cv::CAP_PROP_FRAME_COUNT, 30) ; // Returns false, does nothing
    • &#xA;

    • result &= cap.set(cv::CAP_PROP_CONVERT_RGB, 0) ; // Returns true, does nothing
    • &#xA;

    • result &= cap.set(cv::CAP_PROP_MODE, cv::VideoWriter::fourcc('M', 'J', 'P', 'G')) ; // Returns false, does nothing
    • &#xA;

    • Set registry key from http://alax.info/blog/1693 that should disable the new Windows camera server.
    • &#xA;

    • Updated from 4.5.0 to 4.5.2, no change.
    • &#xA;

    • Asked device manager to find a newer driver, no newer driver found.
    • &#xA;

    &#xA;

    I'm out of ideas. Any help ?

    &#xA;

  • FFmpeg av_dump_format showing incorrect output, but ffprobe displays correct metadata

    29 janvier, par グルグル

    I use ffmpeg 7.1 source build on windows and compilation configuration as follow :

    &#xA;

    configuration:&#xA;  --toolchain=msvc&#xA;  --arch=x86_64&#xA;  --enable-x86asm&#xA;  --enable-asm&#xA;  --enable-shared&#xA;  --enable-w32threads&#xA;  --prefix=/D/build&#xA;

    &#xA;

    When I use av_dump_format to print metadata of test.mp3, it display the incorrect information.

    &#xA;

    extern "C"&#xA;{&#xA;#include <libavformat></libavformat>avformat.h>&#xA;}&#xA;&#xA;int main()&#xA;{ &#xA;    av_log_set_level(AV_LOG_DEBUG);&#xA;&#xA;    auto url = "D:/music/test.mp3";&#xA;&#xA;    AVFormatContext* fmt;&#xA;    auto ret = avformat_open_input(&amp;fmt, url, nullptr, nullptr);&#xA;    if (ret &lt; 0)&#xA;    {&#xA;        av_log(nullptr, AV_LOG_ERROR, "Cannot open %s format : %s", url, av_err2str(ret));&#xA;        exit(EXIT_FAILURE);&#xA;    }&#xA;&#xA;    av_dump_format(fmt, 0, url, 0);&#xA;}&#xA;

    &#xA;

    output

    &#xA;

    [AVFormatContext @ 000001768E65BC40] Opening &#x27;D:/music/test.mp3&#x27; for reading&#xA;[file @ 000001768E65C180] Setting default whitelist &#x27;file,crypto,data&#x27;&#xA;[mp3 @ 000001768E65BC40] Format mp3 probed with size=4096 and score=51&#xA;id3v2 ver:4 flags:00 len:35&#xA;[mp3 @ 000001768E65BC40] pad 576 576&#xA;[mp3 @ 000001768E65BC40] Skipping 0 bytes of junk at 462.&#xA;Input #0, mp3, from &#x27;D:/music/test.mp3&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf58.76.100&#xA;  Duration: N/A, bitrate: N/A&#xA;  Stream #0:0, 0, 1/14112000: Audio: mp3, 0 channels&#xA;      Metadata:&#xA;        encoder         : Lavc58.13&#xA;

    &#xA;

    You can see the Stream info is useless.

    &#xA;

    But I use ffprobe which is built with same configuration to print metadata of test.mp3.

    &#xA;

    It's display normal.

    &#xA;

    ffprobe version 7.0.1 Copyright (c) 2007-2024 the FFmpeg developers&#xA;  built with Microsoft (R) C/C&#x2B;&#x2B; Optimizing Compiler Version 19.41.34123 for x64&#xA;  configuration: --toolchain=msvc --arch=x86_64 --enable-x86asm --enable-asm --enable-shared --enable-w32threads --prefix=/D/build&#xA;  WARNING: library configuration mismatch&#xA;  avutil      configuration: --toolchain=msvc --arch=x86_64 --enable-x86asm --enable-asm --enable-shared --enable-w32threads --disable-programs --disable-doc --disable-static --prefix=/D/build&#xA;  avcodec     configuration: --toolchain=msvc --arch=x86_64 --enable-x86asm --enable-asm --enable-shared --enable-w32threads --disable-programs --disable-doc --disable-static --prefix=/D/build&#xA;  avformat    configuration: --toolchain=msvc --arch=x86_64 --enable-x86asm --enable-asm --enable-shared --enable-w32threads --disable-programs --disable-doc --disable-static --prefix=/D/build&#xA;  avdevice    configuration: --toolchain=msvc --arch=x86_64 --enable-x86asm --enable-asm --enable-shared --enable-w32threads --disable-programs --disable-doc --disable-static --prefix=/D/build&#xA;  avfilter    configuration: --toolchain=msvc --arch=x86_64 --enable-x86asm --enable-asm --enable-shared --enable-w32threads --disable-programs --disable-doc --disable-static --prefix=/D/build&#xA;  swscale     configuration: --toolchain=msvc --arch=x86_64 --enable-x86asm --enable-asm --enable-shared --enable-w32threads --disable-programs --disable-doc --disable-static --prefix=/D/build&#xA;  swresample  configuration: --toolchain=msvc --arch=x86_64 --enable-x86asm --enable-asm --enable-shared --enable-w32threads --disable-programs --disable-doc --disable-static --prefix=/D/build&#xA;  libavutil      59.  8.100 / 59. 39.100&#xA;  libavcodec     61.  3.100 / 61. 19.100&#xA;  libavformat    61.  1.100 / 61.  7.100&#xA;  libavdevice    61.  1.100 / 61.  3.100&#xA;  libavfilter    10.  1.100 / 10.  4.100&#xA;  libswscale      8.  1.100 /  8.  3.100&#xA;  libswresample   5.  1.100 /  5.  3.100&#xA;Input #0, mp3, from &#x27;D:\music\test.mp3&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf58.76.100&#xA;  Duration: 00:05:00.12, start: 0.025057, bitrate: 128 kb/s&#xA;  Stream #0:0: Audio: mp3 (mp3float), 44100 Hz, stereo, fltp, 128 kb/s&#xA;      Metadata:&#xA;        encoder         : Lavc58.13&#xA;

    &#xA;

    Why is av_dump_format not correctly showing stream information ? How can I fix it ?

    &#xA;

  • avformat/riff : map Y416 fourcc to RAWVIDEO decoder

    23 octobre 2024, par James Almer
    avformat/riff : map Y416 fourcc to RAWVIDEO decoder
    

    As defined in https://learn.microsoft.com/en-us/windows/win32/medfound/10-bit-and-16-bit-yuv-video-formats#422-formats

    Signed-off-by : James Almer <jamrial@gmail.com>

    • [DH] libavcodec/raw.c
    • [DH] libavformat/riff.c
    • [DH] tests/ref/fate/filter-pixdesc-xv48le
    • [DH] tests/ref/fate/filter-pixfmts-copy
    • [DH] tests/ref/fate/filter-pixfmts-crop
    • [DH] tests/ref/fate/filter-pixfmts-field
    • [DH] tests/ref/fate/filter-pixfmts-fieldorder
    • [DH] tests/ref/fate/filter-pixfmts-hflip
    • [DH] tests/ref/fate/filter-pixfmts-il
    • [DH] tests/ref/fate/filter-pixfmts-null
    • [DH] tests/ref/fate/filter-pixfmts-scale
    • [DH] tests/ref/fate/filter-pixfmts-transpose
    • [DH] tests/ref/fate/filter-pixfmts-vflip