Recherche avancée

Médias (1)

Mot : - Tags -/géodiversité

Autres articles (34)

  • Qu’est ce qu’un masque de formulaire

    13 juin 2013, par

    Un masque de formulaire consiste en la personnalisation du formulaire de mise en ligne des médias, rubriques, actualités, éditoriaux et liens vers des sites.
    Chaque formulaire de publication d’objet peut donc être personnalisé.
    Pour accéder à la personnalisation des champs de formulaires, il est nécessaire d’aller dans l’administration de votre MediaSPIP puis de sélectionner "Configuration des masques de formulaires".
    Sélectionnez ensuite le formulaire à modifier en cliquant sur sont type d’objet. (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • 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

Sur d’autres sites (9400)

  • Video fingerprinting not working for the video

    2 septembre 2024, par Veer Pratap

    I implemented video fingerprinting, and it works well when the videos are exactly the same, producing a similarity score of 1. However, I encounter an issue when comparing videos that have been merged in different orders. For instance, if I merge video1 and video2 to create a new video and then merge them in reverse order (video2 + video1), the system fails to detect any matching frames between the two resulting videos.

    


    The challenge lies in comparing frames between videos regardless of their timing or order. How can I modify the comparison process to ensure that frames are matched correctly even when the order of video segments changes ?

    


    use ffmpeg_next::{codec, format, frame, media, packet, Error};&#xA;use sha2::{Digest, Sha256};&#xA;use std::collections::HashSet;&#xA;&#xA;pub fn extract_frames(video_path: &amp;str) -> Result>, Error> {&#xA;    ffmpeg_next::init()?;&#xA;    let mut ictx = format::input(&amp;video_path)?;&#xA;    let input_stream_index = ictx&#xA;        .streams()&#xA;        .best(media::Type::Video)&#xA;        .ok_or(Error::StreamNotFound)?&#xA;        .index();&#xA;    let codec_params = ictx&#xA;        .stream(input_stream_index)&#xA;        .ok_or(Error::StreamNotFound)?&#xA;        .parameters();&#xA;    let codec = codec::Id::from(codec_params.id());&#xA;    let mut decoder = codec::Context::from_parameters(codec_params)?&#xA;        .decoder()&#xA;        .video()?;&#xA;    let mut frame = frame::Video::empty();&#xA;    let mut frames = Vec::new();&#xA;    let mut packet_count = 0;&#xA;    let mut frame_count = 0;&#xA;&#xA;    for (stream, packet) in ictx.packets() {&#xA;        packet_count &#x2B;= 1;&#xA;        if stream.index() == input_stream_index {&#xA;            decoder.send_packet(&amp;packet)?;&#xA;            while let Ok(()) = decoder.receive_frame(&amp;mut frame) {&#xA;                let frame_data = frame.data(0).to_vec();&#xA;                frames.push(frame_data);&#xA;                frame_count &#x2B;= 1;&#xA;                eprintln!("Extracted frame {}", frame_count);&#xA;            }&#xA;        }&#xA;    }&#xA;    eprintln!(&#xA;        "Processed {} packets and extracted {} frames",&#xA;        packet_count, frame_count&#xA;    );&#xA;    Ok(frames)&#xA;}&#xA;&#xA;pub fn hash_frame(frame: &amp;[u8]) -> Vec<u8> {&#xA;    let mut hasher = Sha256::new();&#xA;    hasher.update(frame);&#xA;    hasher.finalize().to_vec()&#xA;}&#xA;&#xA;/// Generates a vector of fingerprints for the given video frames.&#xA;///&#xA;/// This function takes a vector of frames (each represented as a vector of bytes)&#xA;/// and generates a fingerprint for each frame using the SHA-256 hash function.&#xA;///&#xA;/// # Arguments&#xA;///&#xA;/// * `frames` - A vector of video frames, where each frame is a `Vec<u8>` representing the frame&#x27;s raw data.&#xA;///&#xA;/// # Returns&#xA;///&#xA;/// * `Vec>` - A vector of fingerprints, where each fingerprint is a `Vec<u8>` representing the SHA-256 hash of the corresponding frame.&#xA;pub fn generate_fingerprints(frames: Vec>) -> Vec> {&#xA;    frames.into_iter().map(|frame| hash_frame(&amp;frame)).collect()&#xA;}&#xA;&#xA;/// Compares two videos by extracting frames and generating fingerprints, then computing the similarity between the two sets of fingerprints.&#xA;///&#xA;/// This function extracts frames from the two provided video files, generates fingerprints for each frame,&#xA;/// and compares the fingerprints to determine the similarity between the two videos.&#xA;///&#xA;/// # Arguments&#xA;///&#xA;/// * `video_path1` - A string slice that holds the path to the first video file.&#xA;/// * `video_path2` - A string slice that holds the path to the second video file.&#xA;///&#xA;/// # Returns&#xA;///&#xA;/// * `Result>` - The similarity score between the two videos as a floating-point value (0.0 to 1.0).&#xA;///    Returns an error if there is an issue with extracting frames or generating fingerprints.&#xA;///&#xA;/// # Errors&#xA;///&#xA;/// This function will return an error if:&#xA;/// * There is an issue with opening or reading the video files.&#xA;/// * There is an issue with extracting frames from the video files.&#xA;/// * There is an issue with generating fingerprints from the frames.&#xA;pub fn compare_videos(&#xA;    video_path1: &amp;str,&#xA;    video_path2: &amp;str,&#xA;) -> Result> {&#xA;    println!("Comparing videos: {} and {}", video_path1, video_path2);&#xA;    let frames1 = extract_frames(video_path1)?;&#xA;    let frames2 = extract_frames(video_path2)?;&#xA;&#xA;    let fingerprints1: HashSet&lt;_> = generate_fingerprints(frames1).into_iter().collect();&#xA;    let fingerprints2: HashSet&lt;_> = generate_fingerprints(frames2).into_iter().collect();&#xA;&#xA;    println!("Number of fingerprints in video 1: {}", fingerprints1.len());&#xA;    println!("Number of fingerprints in video 2: {}", fingerprints2.len());&#xA;&#xA;    if !fingerprints1.is_empty() &amp;&amp; !fingerprints2.is_empty() {&#xA;        println!(&#xA;            "Sample fingerprint from video 1: {:?}",&#xA;            fingerprints1.iter().take(1).collect::>()&#xA;        );&#xA;        println!(&#xA;            "Sample fingerprint from video 2: {:?}",&#xA;            fingerprints2.iter().take(1).collect::>()&#xA;        );&#xA;    }&#xA;&#xA;    // Calculate Jaccard similarity&#xA;    let intersection_size = fingerprints1.intersection(&amp;fingerprints2).count();&#xA;    let union_size = fingerprints1.union(&amp;fingerprints2).count();&#xA;&#xA;    println!("Intersection size: {}", intersection_size);&#xA;    println!("Union size: {}", union_size);&#xA;&#xA;    let similarity = if union_size == 0 {&#xA;        0.0&#xA;    } else {&#xA;        intersection_size as f64 / union_size as f64&#xA;    };&#xA;&#xA;    println!("Similarity score: {}", similarity);&#xA;&#xA;    Ok(similarity)&#xA;}&#xA;&#xA;</u8></u8></u8>

    &#xA;

  • How do I properly format a request for ffmpeg to decode using a particular codec ? [migrated]

    9 mai 2013, par user2062660

    r3d is listed as a supported codec for decoding, however when I attempt to specify the r3d decoder, I get the error message "Unknown decoder". What is the correct manner of specifying a decoder codec ?

    me$ ffmpeg -c r3d -i one.r3d one.mpg
    ffmpeg version 1.2 Copyright (c) 2000-2013 the FFmpeg developers
     built on May  8 2013 19:48:08 with Apple clang version 4.0 (tags/Apple/clang-421.0.57) (based on LLVM 3.1svn)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/1.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=cc --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid
     libavutil      52. 18.100 / 52. 18.100
     libavcodec     54. 92.100 / 54. 92.100
     libavformat    54. 63.104 / 54. 63.104
     libavdevice    54.  3.103 / 54.  3.103
     libavfilter     3. 42.103 /  3. 42.103
     libswscale      2.  2.100 /  2.  2.100
     libswresample   0. 17.102 /  0. 17.102
     libpostproc    52.  2.100 / 52.  2.100
    [mp3 @ 0x7fa2e4006600] Format mp3 detected only with low score of 1, misdetection possible!
    Unknown decoder &#39;r3d&#39;
  • We are hiring engineers to build an awesome product and platform used by millions of people

    16 février 2016, par Piwik Core Team — Jobs

    Are you ready for a new challenge ? Or maybe you know someone who is looking for a change ? We have some exciting problems to solve and are looking for senior developers to work with us and our community on our open source Piwik Analytics platform. Piwik is used by more than one million websites all over the world. It is deployed on more than 300.000 servers and some users track more than 1 billion actions per month.

    What is it like to work on Piwik ?

    We develop this software using modern PHP, MySQL, Redis, AngularJS and more. We provide several kind of APIs and a plugin architecture to allow developers to extend and change Piwik to their needs. However, we would not be Piwik if we stopped at this point ! We want to turn Piwik into an even more awesome product and platform.
    You can imagine there is a lot to do and many challenges to face !

    While one part is to always make Piwik scale better and to improve UI and UX, we also want to provide simple APIs to make the life of developers as pleasant as possible. We aim to solve things the right way and our thousands of unit, integration, system, JavaScript and screenshot tests help us to innovate and to not be afraid of change. We like clean code and constant improvements.

    The Piwik team lives in New Zealand, Europe (Poland, Germany) and in the U.S. We do the vast majority of our collaboration online. Our values include being open, transparent and sharing knowledge. For this we use tools like GitHub and Slack to communicate and Quake servers to take our minds off complex challenges. We are a small, flexible team, so when you come aboard, you will play an integral part in engineering and have a big impact on the product loved by so many people. You’ll help to create a welcoming environment for new contributors and set an example with your development practices and communications skills.

    Apply now, or spread the word !

    If you have strong skills in PHP send us an email with your CV and tell us a little about yourself and your experience in engineering complex applications.

    Apply for a job here http://piwik.org/jobs/ and if you’re maybe not the right candidate, contribute to the project by sharing this blog post and by sending it to your friends !