Recherche avancée

Médias (1)

Mot : - Tags -/sintel

Autres articles (81)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • Sélection de projets utilisant MediaSPIP

    29 avril 2011, par

    Les exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
    Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
    Ferme MediaSPIP @ Infini
    L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)

Sur d’autres sites (6778)

  • 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;

  • Why does ffmpeg return "No such file or directory"

    4 juillet 2020, par JackNewman

    I'm trying to split a video file into 2 second increments and then merge the video back together.

    &#xA;

    source_vid_path = r"C:\SplitAndMergeVids\Before\before.mp4"&#xA;ffcat_path = r&#x27;C:\SplitAndMergeVids\Chunk\video.ffcat&#x27;&#xA;chunks_path = r&#x27;C:\SplitAndMergeVids\Chunk\chunk-%03d.mp4&#x27;&#xA;segments_time = &#x27;2&#x27;&#xA;cmd_input = rf&#x27;ffmpeg -fflags &#x2B;genpts -i {source_vid_path} -map 0 -c copy -f segment -segment_format mp4 -segment_time {segments_time} -segment_list {ffcat_path} -reset_timestamps 1 -v error {chunks_path}&#x27;&#xA;output = str(subprocess.run(cmd_input, shell=True, capture_output=True))&#xA;print(output)&#xA;&#xA;output_path = r&#x27;C:\SplitAndMergeVids\Output\output.mp4&#x27;&#xA;second_input = rf&#x27;ffmpeg -y -v error -i {ffcat_path} -map 0 -c copy {output_path}&#x27;&#xA;output = str(subprocess.run(second_input, shell=True, capture_output=True))&#xA;print(output)&#xA;

    &#xA;

    First subprocess runs perfectly although the second outputs returns

    &#xA;

    "Impossible to open &#x27;chunk-000.mp4&#x27;\r\nC:\\SplitAndMergeVids\\Chunk\\video.ffcat: No such file or directory".&#xA;

    &#xA;

    Full output looks like

    &#xA;

    CompletedProcess(args=&#x27;ffmpeg -fflags &#x2B;genpts -i C:\\SplitAndMergeVids\\Before\\before.mp4 -map 0 -c copy -f segment -segment_format mp4 -segment_time 2 -segment_list C:\\SplitAndMergeVids\\Chunk\\video.ffcat -reset_timestamps 1 -v error C:\\SplitAndMergeVids\\Chunk\\chunk-%03d.mp4&#x27;, returncode=0, stdout=b&#x27;&#x27;, stderr=b&#x27;&#x27;)&#xA;CompletedProcess(args=&#x27;ffmpeg -y -v error -i C:\\SplitAndMergeVids\\Chunk\\video.ffcat -map 0 -c copy C:\\SplitAndMergeVids\\Output\\output.mp4&#x27;, returncode=1, stdout=b&#x27;&#x27;, stderr=b"[concat @ 0000028691a6c6c0] Impossible to open &#x27;chunk-000.mp4&#x27;\r\nC:\\SplitAndMergeVids\\Chunk\\video.ffcat: No such file or directory\r\n")&#xA;

    &#xA;

    When I run cmd_input and second_input manually in cmd, everything functions perfectly. I don't understand how in the first command I am making a file at "ffcat_path", then in the second command I'm using the same "ffcat_path" and it returns "No such file or directory" when it certainly does exist.

    &#xA;

  • FFMPEG : How to mix different types of image sequence inputs when creating multiple streams

    9 août 2021, par chutlies

    I am using a piece of software that generates a .txt files with rendered images. The list within that txt files is printed with the word 'file' at the beginning of the file path.

    &#xA;

    Ex : file 'file:C :/Users/User/Desktop/test/Test.0001.png'

    &#xA;

    I am attempting to input another image sequence as an overlay. Everything works fine if I just overlay, scale, and render. So this works fine :

    &#xA;

    ffmpeg -hide_banner -y -f concat -safe 0 -i C:/test/input.txt -i "C:/test/BALL.%04d.png" -filter_complex "overlay[4K_in];[4K_in]scale=1920:1080[hdOut]" -map [hdOut] hd.mp4&#xA;

    &#xA;

    But when I start to split the stream to create different outputs it will only render the overlayed stream [1:v] and not the composited image.

    &#xA;

    ffmpeg -hide_banner -y -f concat -safe 0 -i C:/test/input.txt -i "C:/test/BALL.%04d.png" -filter_complex "overlay,split=3[mp4HD_in][mxf720_in][mov4K_in];[mp4HD_in]scale=1920:1080[mp4HD_out];[mxf720_in]scale=1280:720[mxf720_out];[mov4K_in]scale=3840:2160[mov4K_out]" -crf 16 -vcodec libx264 -map [mp4HD_out] C:/test/hdMP4.mp4 -vcodec prores -map [mov4K_out] C:/test/MOV4K.mov -vcodec dnxhd -pix_fmt yuv422p -b:v 75M -map [mxf720_out] C:test/MXF720.mxf&#xA;

    &#xA;

    If I remove 'file' from the frames file path in the .txt file it works.

    &#xA;

    Ex : file 'C :/Users/User/Desktop/test/Test.0001.png'

    &#xA;

    Unfortunately, I am unable to change this as it's being generated and run within a piece of software. Are there any flags or something that I need to add to get around this ? Any other possible techniques beyond starting another &&ffmpeg call to generate the streams over the overlay ?

    &#xA;

    I do get this in the logs :&#xA;[concat @ 0000024a0eacf280] DTS -230584300921369 < 0 out of order&#xA;DTS -230584300921369, next:40000 st:0 invalid dropping&#xA;PTS -230584300921369, next:40000 invalid dropping st:0&#xA;DTS -230584300921369, next:40000 st:0 invalid dropping&#xA;PTS -230584300921369, next:40000 invalid dropping st:0&#xA;DTS -230584300921369, next:40000 st:0 invalid dropping&#xA;PTS -230584300921369, next:40000 invalid dropping st:0&#xA;DTS -230584300921369, next:40000 st:0 invalid dropping&#xA;PTS -230584300921369, next:40000 invalid dropping st:0&#xA;[image2 @ 0000024a0eadd140] Thread message queue blocking ; consider raising the thread_queue_size option (current value : 8)

    &#xA;