Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP

Autres articles (22)

  • 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

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

Sur d’autres sites (4880)

  • wrap h.264 stream in mp.4 container and stream it with nodejs

    30 mars 2017, par idosh

    I have a stream of h.264 data from a remote webcam. If i save it to a file i’m able to play it in VLC (meaning that the data arrives intact).

    The final goal is to turn this stream into a virtual webcam. After looking around I found manyCam as a possible solution - therefor i want to serve the h.264 data on a local IP in MP4 format.

    Two questions :

    first, I’m trying to wrap the h.264 with the mp4 container using ffmpeg (using fluent-ffmpeg npm library that exposes the ffmpeg API to Nodejs).

    Everything works well when i’m handling static files (not streams). e.g.`

    var ffmpeg = rquire('fluent-ffmpeg')
    var readH264 = fs.createReadStream('./vid.h264')
    var proc = ffmpeg(readH264).clone().toFormat('mp4').output('./vid.mp4').run()

    `

    But when I’m trying to feed a stream - it throws an error "ffmpeg exited with code 1 : could not write header for output file.."
    `

    var wrtieMp4 = fs.createWriteStream('./vid.mp4')
    var proc = ffmpeg(readH264).clone().toFormat('mp4').output(wrtieMp4).run()`

    How can i add it a header..?

    Second, I’m a bit confused about the transport layer (rtp, rtsp, etc.). After creating the mp4 stream - wouldn’t it be sufficient to serve the stream with MIME type video/mp4 ? It seem to work fine with static file.
    `

    let read = fs.createReadStream('./vid.mp4')
    let server = http.createServer(function (req, res) {
           res.writeHead(200, {'Content-type': "video/mp4"})
           read.pipe(res)
    }).listen(9000)

    `

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