Recherche avancée

Médias (1)

Mot : - Tags -/biomaping

Autres articles (15)

  • 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

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

Sur d’autres sites (5923)

  • UnsupportedAudioFileException in LIUM Speaker Diarization after re-sampling

    14 septembre 2016, par RAVI D PARIKH

    I am trying to configure LIUM tool for speaker diarization. This question is a follow up of UnsupportedAudioFileException in LIUM Speaker Diarization

    I have tried re sampling the file using sox and ffmpeg

    I am new to any sorts of programming and i have followed all steps described in LIUM quick start guide and the above link. I still get the same error. I think my input file has issues related to header as mentioned by Nikolay Shmyrev in the above link however i have no clue on how to solve it.

    My code is as below :

    java –jar  C:\Users\Ravi\Desktop\LIUM_SpkDiarization-8.4.1.jar \ --fInputMask= C:\Users\Ravi\Desktop\converted_f2.wav--sOutputMask= C:\Users\Ravi\Desktop\converted_converted_2.seg -–help --doCEClustering

    Error :

    10:52.037 SEVERE AudioFeatureSetFa  FileNotFoundException
    java.io.FileNotFoundException:
           at java.io.FileInputStream.open0(Native Method)
           at java.io.FileInputStream.open(Unknown Source)
           at java.io.FileInputStream.<init>(Unknown Source)
           at com.sun.media.codec.audio.mp3.JS_MP3FileReader.getAudioFileFormat(JS_MP3FileReader.java:82)
           at javax.sound.sampled.AudioSystem.getAudioFileFormat(Unknown Source)
           at fr.lium.spkDiarization.libFeature.AudioFeatureSetFactory.getAudio(AudioFeatureSetFactory.java:162)
           at fr.lium.spkDiarization.libFeature.AudioFeatureSetFactory.MakeFeature(AudioFeatureSetFactory.java:207)
    </init>

    The input file is at https://drive.google.com/file/d/0B7Fqe9EX5JbgT09BcXpSREd4em8/view?usp=sharing

    Input File Name:converted_f2.wav

    I have put the command and the full output of the prompt in a word document at

    https://drive.google.com/file/d/0B7Fqe9EX5JbgUUl6THNCZFgxRnM/view?usp=sharing

    The inpiut file has correct sampling rate and other parameters and thus i am not able to understand the cause of the error.
    Thanks a lot for the help

    Regards,
    Ravi

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

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

    &#xA;

    Here is the code :

    &#xA;

    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;