Recherche avancée

Médias (91)

Autres articles (101)

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

  • Qu’est ce qu’un éditorial

    21 juin 2013, par

    Ecrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
    Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
    Vous pouvez personnaliser le formulaire de création d’un éditorial.
    Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)

Sur d’autres sites (11631)

  • avcodec/diracdec : Check slice numbers for overflows in relation to picture dimensions

    22 juillet 2018, par Michael Niedermayer
    avcodec/diracdec : Check slice numbers for overflows in relation to picture dimensions
    

    Fixes : signed integer overflow : 88 * 33685506 cannot be represented in type 'int'
    Fixes : 9433/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5725943535501312

    Found-by : continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libavcodec/diracdec.c
  • libfdk-aac : Use enum names instead of literal numbers for the output format

    5 juillet 2018, par Martin Storsjö
    libfdk-aac : Use enum names instead of literal numbers for the output format
    

    Signed-off-by : Martin Storsjö <martin@martin.st>

    • [DBH] libavcodec/libfdk-aacenc.c
  • How to use the actual frame numbers in filenames using ffmpeg when extracting frames ? [closed]

    2 juin 2024, par Joan Venge

    Basically I am using ffmpeg to extract every Nth frame from a video. But the filenames appear sequentially from 1 to X. I want to use the actual frame numbers so if it's every 30th frame, then the filenames should be 0, 30, 60, etc. Is this possible ?

    &#xA;

    I am doing this in Python using this function :

    &#xA;

    def extract_and_compress_frames(directory, frame_interval=1, crop_width=192, crop_height=108, offset_x=0, offset_y=0):&#xA;    for filename in os.listdir(directory):&#xA;        if filename.endswith(".trec"):&#xA;            # Construct full file path&#xA;            trec_path = os.path.join(directory, filename)&#xA;            mp4_path = os.path.join(directory, filename.replace(".trec", ".mp4"))&#xA;            frames_dir = os.path.join(directory, filename.replace(".trec", ""))&#xA;            &#xA;            # Rename .trec to .mp4&#xA;            os.rename(trec_path, mp4_path)&#xA;            &#xA;            # Create directory for frames&#xA;            os.makedirs(frames_dir, exist_ok=True)&#xA;            &#xA;            if frame_interval == 1:&#xA;                # Calculate crop positions for bottom-right corner after scaling to 1080p&#xA;                scaled_width = 1920&#xA;                scaled_height = 1080&#xA;                crop_x = scaled_width - crop_width - offset_x&#xA;                crop_y = scaled_height - crop_height - offset_y&#xA;                &#xA;                # Extract and compress all frames using ffmpeg with quality adjustment&#xA;                ffmpeg_cmd = [&#xA;                    &#x27;ffmpeg&#x27;, &#xA;                    &#x27;-i&#x27;, mp4_path,&#xA;                    &#x27;-vf&#x27;, f"fps=60,scale=1920:1080,crop={crop_width}:{crop_height}:{crop_x}:{crop_y}", &#xA;                    &#x27;-q:v&#x27;, &#x27;10&#x27;,  # Adjust the quality, 1 (best) to 31 (worst), 2 for good quality&#xA;                    os.path.join(frames_dir, &#x27;%06d.jpg&#x27;)  # 6 digits for padding, starting from 0&#xA;                ]&#xA;            else:&#xA;                # Use frame interval and scale to 720p&#xA;                ffmpeg_cmd = [&#xA;                    &#x27;ffmpeg&#x27;,&#xA;                    &#x27;-reinit_filter&#x27;, &#x27;0&#x27;,&#xA;                    &#x27;-i&#x27;, mp4_path,&#xA;                    &#x27;-vf&#x27;, f"fps=60,scale=1920:1080,crop={crop_width}:{crop_height}:{1920-crop_width-offset_x}:{1080-crop_height-offset_y},drawtext=text=&#x27;%{{n}}&#x27;:start_number=1:fontcolor=white:bordercolor=black:borderw=3:fontsize=50,select=&#x27;not(mod(n\\,{frame_interval}))&#x27;",&#xA;                    &#x27;-fps_mode&#x27;, &#x27;vfr&#x27;,&#xA;                    &#x27;-q:v&#x27;, &#x27;10&#x27;,  # Adjust the quality, 1 (best) to 31 (worst), 2 for good quality&#xA;                    os.path.join(frames_dir, &#x27;%06d.jpg&#x27;)  # 6 digits for padding, starting from 0&#xA;                ]&#xA;            &#xA;            subprocess.run(ffmpeg_cmd)&#xA;            &#xA;            # Rename back to .trec&#xA;            os.rename(mp4_path, trec_path)&#xA;            &#xA;            print(f"Processed {filename}")&#xA;

    &#xA;

    But this gives me sequential numbers, not the actual frame numbers but the frame numbers I draw over the images, they represent the actual frame numbers.

    &#xA;

    Basically ffmpeg is able to get the current frame and draw it on the image using :

    &#xA;

    drawtext=text=&#x27;%{{n}}&#x27;&#xA;

    &#xA;

    The question is about getting that value out to the filenames.

    &#xA;