Recherche avancée

Médias (2)

Mot : - Tags -/doc2img

Autres articles (112)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

Sur d’autres sites (8155)

  • FFMPEG RTSP Stream timeout triggered after 30015.187000 ms

    24 février 2024, par BatCoder

    I am trying to read several RTSP streams using opencv cv2.VideoCapture(URL). It has FFMPEG backend. Sometimes for few streams it is throwing timeout warning after 30 seconds.

    


    [ WARN:0@123.394] global cap_ffmpeg_impl.hpp:453 _opencv_ffmpeg_interrupt_callback Stream timeout triggered after 30015.187000 ms


    


    I tried setting up the timeout flag.

    


    import os
os.environ["OPENCV_FFMPEG_CAPTURE_OPTIONS"] = "timeout;5000" # 5 seconds 
cv2.VideoCapture("rtsp://URL", cv2.CAP_FFMPEG)


    


    Ref : How to terminate cv2.VideoCapture(rtsp_url) call if execution stalls due to RTSP camera issues ?

    


    But still, it is waiting for 30 seconds before raising the warning.

    


    OpenCV version : 4.4.0.x
Python version : 3.9.x

    


    Can we decrease the wait time from 30 seconds to a lower number ?

    


  • FFPMEG command to record screen works only from cmd on windows but not from my Java class

    21 mars 2024, par Youssef Hammouma

    i have a JUNIT test that uses a Java class called ScreenRecordingWatcher where i specified my ffpmeg command to record the computer when my test fails.

    


    But unfortunately, my command only works from my cmd and not from my class, On both sides it generates successfully my file, but when it is generated from my Java class, the file is not readable from my windows player (0xc10100be error).

    


    Here is the command i am using :

    


    C:\outils\ffmpeg-master-latest-win64-gpl\bin\ffmpeg.exe -f gdigrab -framerate 30 -i desktop -c:v h264_nvenc -qp 0 C:\outils\video\output.mkv


    


    Here is the same command from my class :

    


    public class ScreenRecordingWatcher extends TestWatcher {

private static final String FFMPEG_PATH = "C:\\outils\\ffmpeg-master-latest-win64-gpl\\bin\\ffmpeg.exe";
private static final String OUTPUT_FILE = "C:\\outils\\video\\fichier.mkv";
private boolean testFailed = false;

@Override
protected void failed(Throwable e, Description description) {

    super.failed(e, description);
    testFailed = true;
}

@Override
protected void finished(Description description) {
    super.finished(description);
    if (testFailed) {
        startRecording();

        try {
            Thread.sleep(5000);

        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        stopRecording();
    }
}

private void startRecording() {
    String[] command = { FFMPEG_PATH, "-f", "gdigrab", "-framerate", "30", "-i", "desktop", "-c:v", "h264_nvenc", "-qp", "0", OUTPUT_FILE };

    System.out.println(Arrays.toString(command));
    ProcessBuilder builder = new ProcessBuilder(command);
    try {
        builder.start();
    } catch (IOException e) {
        e.printStackTrace();
    }
}

private void stopRecording() {
    String[] command = { "tskill", "ffmpeg" };
    ProcessBuilder builder = new ProcessBuilder(command);
    try {
        builder.start();
    } catch (IOException e) {
        throw new RuntimeException(e);
    }
}


    


    }

    


    Does someone have an idea of why it executes well from my cmd but not from my class ?

    


    Thank you in advance

    


  • FFMPEG fast quality video encoding without quality loss & less storage occupancy (maybe using GPU)

    27 mars 2024, par Diwash Mainali

    I Have written a go code but it is slow and the video compression rate is also not that impressive. I am new to FFMPEG and my entire project depends on FFMPEG. I have tried different video codecs like vp9, h264, h265, NVENC, AV1, etc. All of them were too slow (maybe I am not good enough to optimize it). My project is based on Go and the current codec that I am using is libx264. Can anyone help me optimize the video encoding part of my project.

    


    Libx264 :

    


    func encodeVideo(fileName, bitrate, crf, preset, resolution string) *exec.Cmd {
    return exec.Command("C:\\ffmpeg-6.1-full_build\\bin\\ffmpeg",
        "-i", "./userUploadDatas/videos/"+fileName,
        "-c:v", "libx264",
        "-b:v", bitrate,
        "-crf", crf,
        "-preset", preset,
        "-vf", "scale="+resolution,
        "./userUploadDatas/videos/"+fileName+"_encoded"+".mp4")
}


    


    Please provide static value of each parameters. Any codec will work for me as long as it is fast, occupies less space & doesn't loose spaces.

    


    The problems I have faces with different codecs are :

    


      

    1. NVENC : Fast but the size of video is doubled & loss of video quality.
    2. 


    3. libx264 : Best I can find currently, but is slow.
    4. 


    5. h264, h265 : Occupies more space
    6. 


    7. Av1 & vp9 : Was too slow and wasn't able to encode 30sec video in 1hrs.
    8. 


    


    The specs of hardware that I am using is Ryzen7 5000 series CPU, NVIDIA RTX 3050 Ti Laptop GPU.