Recherche avancée

Médias (1)

Mot : - Tags -/sintel

Autres articles (66)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

Sur d’autres sites (8624)

  • when webm extracts aac, the duration is inconsistent

    25 juillet 2019, par Black-Hole

    When I try to extract aac from webm, there will be inconsistencies in duration. aac is ten minutes less. Different webm videos, the gap is not the same.

    webm video is generated by chrome extension chrome.tabCapture.capture

    code :

    chrome.tabCapture.capture({
     video: true,
     audio: true,
     videoConstraints: {
       mandatory: {
         minWidth: 1920,
         minHeight: 1080,
         maxWidth: 1920,
         maxHeight: 1080,
         maxFrameRate: 30,
         minFrameRate: 30,
       }
     }
    })

    The above code will return a stream, I will use JS’s MediaRecorder method to process this stream, and finally save it as a webm file.

    code :

    new MediaRecorder(stream, {
     audioBitsPerSecond: 128000,
     videoBitsPerSecond: 2500000,
     mimeType: 'video/webm;codecs=vp9'
    })

    If you don’t know the meaning of the above code, it doesn’t matter, I will explain the main information :

    1. width : 1920
    2. height : 1080
    3. FPS : 30
    4. audioBits : 128000
    5. videoBits : 2500000
    6. mimeType : video/webm;codecs=vp9

    I tried a lot of methods, like the following :

    # 1
    ffmpeg -i ./source.webm -y -fflags +genpts -max_muxing_queue_size 99999 -r 15 -crf 30 -filter:v crop=750:560:0:0 ./x.mp4
    ffmpeg -i ./x.mp4 -y -vn -acodec libfdk_aac -b:a 200k ./x.aac

    # 2
    ffmpeg -i ./source.webm -y -vn -acodec libfdk_aac -b:a 200k ./x.aac

    # 3
    ffmpeg -i ./source.webm -y -vn -acodec libfdk_aac -b:a 200k -map 0 ./x.aac

    # 4
    ffmpeg -i ./source.webm -y -max_muxing_queue_size 99999 -r 15 -crf 30 -filter:v crop=750:560:0:0 ./x.mp4
    ffmpeg -i ./source.webm -y -vn -acodec aac -b:a 200k ./x.aac

    # etc.

    But without exception, all failed. I have been plagued by this problem for 4 days.

    webm file download url : https://drive.google.com/file/d/1m4fC1hU-tXFPOZayrYCs-yteSTxw_TaW/view?usp=sharing

  • avcodec : Add "sar" alias to "aspect" option of video encoders

    5 mai 2016, par Andrey Utkin
    avcodec : Add "sar" alias to "aspect" option of video encoders
    

    It is impossible to pass "aspect" parameter to encoder from ffmpeg CLI
    because option from lavc/options_table.h is eclipsed by option with same
    name in ffmpeg_opt.c, which has different meaning (DAR, not SAR).

    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] doc/codecs.texi
    • [DH] libavcodec/options_table.h
    • [DH] tests/ref/fate/api-mjpeg-codec-param
    • [DH] tests/ref/fate/api-png-codec-param
  • How Do I Get Python To Capture My Screen At The Right Frame Rate

    14 juillet 2024, par John Thesaurus

    I have this python script that is supposed to record my screen, on mac os.

    &#xA;

    import cv2&#xA;import numpy as np&#xA;from PIL import ImageGrab&#xA;import subprocess&#xA;import time&#xA;&#xA;def record_screen():&#xA;    # Define the screen resolution&#xA;    screen_width, screen_height = 1440, 900  # Adjust this to match your screen resolution&#xA;    fps = 30  # Target FPS for recording&#xA;&#xA;    # Define the ffmpeg command&#xA;    ffmpeg_cmd = [&#xA;        &#x27;ffmpeg&#x27;,&#xA;        &#x27;-y&#x27;,  # Overwrite output file if it exists&#xA;        &#x27;-f&#x27;, &#x27;rawvideo&#x27;,&#xA;        &#x27;-vcodec&#x27;, &#x27;rawvideo&#x27;,&#xA;        &#x27;-pix_fmt&#x27;, &#x27;bgr24&#x27;,&#xA;        &#x27;-s&#x27;, f&#x27;{screen_width}x{screen_height}&#x27;,  # Size of one frame&#xA;        &#x27;-r&#x27;, str(fps),  # Input frames per second&#xA;        &#x27;-i&#x27;, &#x27;-&#x27;,  # Input from pipe&#xA;        &#x27;-an&#x27;,  # No audio&#xA;        &#x27;-vcodec&#x27;, &#x27;libx264&#x27;,&#xA;        &#x27;-pix_fmt&#x27;, &#x27;yuv420p&#x27;,&#xA;        &#x27;-crf&#x27;, &#x27;18&#x27;,  # Higher quality&#xA;        &#x27;-preset&#x27;, &#x27;medium&#x27;,  # Encoding speed&#xA;        &#x27;screen_recording.mp4&#x27;&#xA;    ]&#xA;&#xA;    # Start the ffmpeg process&#xA;    ffmpeg_process = subprocess.Popen(ffmpeg_cmd, stdin=subprocess.PIPE)&#xA;&#xA;    frame_count = 0&#xA;    start_time = time.time()&#xA;&#xA;    while True:&#xA;        # Capture the screen&#xA;        img = ImageGrab.grab()&#xA;        img_np = np.array(img)&#xA;&#xA;        # Convert and resize the frame&#xA;        frame = cv2.cvtColor(img_np, cv2.COLOR_RGB2BGR)&#xA;        resized_frame = cv2.resize(frame, (screen_width, screen_height))&#xA;&#xA;        # Write the frame to ffmpeg&#xA;        ffmpeg_process.stdin.write(resized_frame.tobytes())&#xA;&#xA;        # Display the frame&#xA;        cv2.imshow(&#x27;Screen Recording&#x27;, resized_frame)&#xA;&#xA;        # Stop recording when &#x27;q&#x27; is pressed&#xA;        if cv2.waitKey(1) &amp; 0xFF == ord(&#x27;q&#x27;):&#xA;            break&#xA;&#xA;    # Close the ffmpeg process&#xA;    ffmpeg_process.stdin.close()&#xA;    ffmpeg_process.wait()&#xA;&#xA;    # Release everything when job is finished&#xA;    cv2.destroyAllWindows()&#xA;&#xA;if __name__ == "__main__":&#xA;    record_screen()&#xA;&#xA;&#xA;

    &#xA;

    As you can see, it should be 30 frames per second, but the problem is that when I open the file afterwards its all sped up. I think it has to do with the frame capture rate as oppose to the encoded rate. I'm not quite sure though. If I try to speed the video down afterwards so that it plays in real time the video is just really choppy. And the higher I make the fps, the faster the video plays, meaning the more I have to slow it down and then its still choppy. I'm pretty sure that it captures frames at a really slow rate and then puts them in a video and plays it back at 30fps. Can anyone fix this ? Anything that gets a working screen recorder on mac os I will take.

    &#xA;