
Recherche avancée
Médias (1)
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
Autres articles (81)
-
Installation en mode ferme
4 février 2011, parLe 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 (...) -
Organiser par catégorie
17 mai 2013, parDans 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 (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)
Sur d’autres sites (5285)
-
ffmpeg created video receiving error message on Youtube
1er février 2023, par David RuanI am using this command to generate a video with a cover page and an audio.


ffmpeg -loop 1 -r 1 -i c :/temp/coverImage.jpeg -i C :/temp/out/input.mp3 -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" -c:a copy -shortest -c:v libx264 C :/temp/VideoOut/output.mp4


But the generated video got an error message from Youtube after it is uploaded.


"Your video has an unsupported aspect ratio"


Any idea how to solve this issue ?


-
PiCamera stream to youtube with ffmpeg and capture image every second
9 octobre 2020, par MisterGrayI'm sending a livestream with a Python script on a Raspberry Pi 4 to Youtube with ffmpeg.


Additionally I want to check the stream for movements. Therefore I want to compare two frames with each other. Since this is relatively computationally intensive, I wanted to limit myself to "only" compare single frames every second.


The camera.capture() command, however, seems to take very long, so the stream hangs again and again.


What is the best way to get a raw frame during the stream ?


Is there a better alternative to detect movements while creating a stream with ffmpeg ?


#!/usr/bin/env python3
import subprocess
from picamera.array import PiRGBArray
from picamera import PiCamera
import time
import cv2
import numpy as np

YOUTUBE = 'rtmp://a.rtmp.youtube.com/live2/'
KEY = 'MyYoutubeKey'
stream_cmd = 'ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv ' + YOUTUBE + KEY

avg = None
stream_pipe = subprocess.Popen(stream_cmd, shell=True, stdin=subprocess.PIPE)
resolution = (1280,720)
with PiCamera(resolution = resolution) as camera:

 rawCapture = PiRGBArray(camera, size = resolution)

 camera.framerate = 25
 camera.vflip = True
 camera.hflip = True
 camera.start_recording(stream_pipe.stdin, format='h264', bitrate = 6000000)
 while True:
 camera.wait_recording(1)

 # this command takes a long time to finish
 frame = camera.capture(stream_pipe.stdin, 'rgb')

 """
 further calculations
 """

 rawCapture.truncate(0)

 camera.stop_recording()
 stream_pipe.stdin.close()
 stream_pipe.wait()



-
convert a normal video to youtube short
28 mai 2022, par Un1xCr3whello i have videos with width of 1920px and height of 1080 and i wanna crop it at the center and create a youtube short with it


iam using youtube dl wrap node js library
here is my code example


var ffmpeg = require("fluent-ffmpeg");
const fs = require("fs");
let rawdata = fs.readFileSync("./json-files/small.json");
let clips = JSON.parse(rawdata);

function convertIt(fileName) {
 return new Promise((resolve, reject) => {
 ffmpeg(`./media-new/${fileName}`)
 .size("480x640")
 .aspect("9:16")
 .autopad()
 .videoBitrate("4000k")
 .on("end", function () {
 console.log("file has been converted succesfully");
 resolve("foo");
 })
 .on("error", function (err) {
 console.log("an error happened: " + err.message);
 reject(err);
 })
 // save to file
 .save(`./lib/${fileName}`);
 });
}

async function convertToShorts() {
 for (const iterator of clips) {
 await convertIt(`${iterator.id}.mp4`);
 }
}

convertToShorts();