Recherche avancée

Médias (1)

Mot : - Tags -/sintel

Autres articles (60)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

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

Sur d’autres sites (8010)

  • Mac Terminal (Bash) batch program to get multimedia file info using ffmpeg

    7 décembre 2013, par julesverne

    I have a Mac computer. Usually all my batch programming is done on my PC. So I tried to create what I assumed would be a simple equivalent using a Mac shell. Obviously as you all know that was foolish of me to think that. After 2 days of scowering the web I found the closest thing I could to what I was looking for. But no, this doesn't work either.

    All I'd like to do is throw a multimedia file onto the script, and have the terminal give me the ffmpeg info output. In my searching I did find this "$@" which as far as I can tell is the windows bat equivalent of %*. Meaning you can throw files on the script and the script refers to those files as variables which can be processed. So I believe what I want to do is possible.

    Again the code at the bottom is just to look through the current directory of all .mov files and run ffmpeg. It doesn't work. But.. if no one can help me figure out the actual thing I'd like to do then I'd settle with something like below that does actually work.

    #!/bin/bash
    FFMPEG=/Applications/ffmpeg
    FIND=/usr/bin/find
    FILES=$(${FIND} . -type f  -iname "*.mov")
    if [ "$FILES" == "" ]
    then
    echo "There are no *.mov file in $(pwd) directory"
    exit 1
    fi

    for f in *.mov
    do

    $FFMPEG -i "$f"

    done

    If someone can please help me figure this out I'd really appreciate it. Thank you in advance ! Jules

    I just found this solution from the "similar questions" sidebar, which is similar to the script above, so again, not completely what I wanted but.. didn't matter, didn't work for me. How to batch convert mp4 files to ogg with ffmpeg using a bash command or Ruby

  • Variable fps (frame per second) in cv2

    17 octobre 2022, par Sepide

    I use cv2 for creating videos from different frames that I have. When I create the video, I cannot change the fps (frame per second). I want the video be slow at the beginning but fast towards the end, meaning small fps at the beginning but large ones towards the end. However, when I instantiate cv2.VideoWriter I cannot change the fps anymore. What should I do ?

    


    Replicable code

    


    import numpy as np
import cv2, os
import matplotlib

image_size = 200
def create_image_array(image_size):
  image_array = np.random.randn(image_size, image_size)
  row = np.random.randint(0, image_size)
  image_array[row, :] = 100
  return image_array

frame_numbers = 200
for i in range(frame_numbers):
  image_array = create_image_array(image_size)
  matplotlib.image.imsave(f'./shots/frame_{i:03d}.png', image_array)

def make_a_video(shots_folder, video_path):

    shots_folder = 'shots'
    fps = 25
    images = [img for img in os.listdir(shots_folder) if img.endswith(".png")]

    images = sorted(images)[:]
    frame = cv2.imread(os.path.join(shots_folder, images[0]))
    height, width, layers = frame.shape

    video = cv2.VideoWriter(video_path, cv2.VideoWriter_fourcc(*'mp4v'), fps, (width, height))

    for image in images:
        video.write(cv2.imread(os.path.join(shots_folder, image)))

    cv2.destroyAllWindows()
    video.release()

shots_folder = 'shots'
video_path = 'video.mp4'  
make_a_video(shots_folder, video_path)


    


  • How to create a local audio livestream server with ffmpeg and python ? [closed]

    10 novembre 2024, par Fenekhu

    Simply put, this is what I'm trying to accomplish :
    
I navigate to something like http://localhost:8080/ in my browser and the browser shows a built-in audio player playing whatever the ffmpeg process is streaming. (Not just serving a local audio file.) (Built-in here meaning the page looks the same as if you had opened an mp3 file with your browser.)

    


    At first I thought it would be easy, as ffmpeg has the ability to stream through different protocols. I seem to have misunderstood though, because while I can stream something over rtp with it, I can't access that from my browser. Some stackoverflow questions I found seem to imply that you can do this with the output options -f mpegts http://localhost:8080, but when I try this, ffmpeg freezes for a second, then I get these errors :

    


    [tcp @ 00000210f70b0700] Connection to tcp://localhost:8080 failed: Error number -138 occurred
[out#0/mpegts @ 00000210f7080ec0] Error opening output http://localhost:8080: Error number -138 occurred
Error opening output file http://localhost:8080.
Error opening output files: Error number -138 occurred


    


    but I have no problem with -f rtp rtp://localhost:8080. (Like I said though, I can't access that through the browser).

    


    So I suspect I need something else to "pick up" the rtp stream and put it on an http server, but I haven't been able to find anything on that, probably because I just don't know the right thing to search. It seems like something that should be easily doable in Python, and that would be my preferred language to do it in over javascript, if possible.

    


    Can anyone point me in the right direction ? Or let me know if I'm misunderstanding something ? Thanks.