
Recherche avancée
Médias (3)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
-
Creativecommons informational flyer
16 mai 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (111)
-
Publier sur MédiaSpip
13 juin 2013Puis-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 -
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.
Sur d’autres sites (9768)
-
Saving a continuous stream of images from ffmpeg image2pipe using golang
11 février 2020, par MinaI am trying to save a sequence/continuous images from ffmpeg image2pipe in go. The problem with the code below that it does only save the first image in the stream due to the blocking nature of io.Copy since it waits for the reader or the writer to close.
package main
import (
"fmt"
"io"
"log"
"os"
"os/exec"
"strconv"
"time"
)
//Trying to get png from stdout pipe
func main() {
fmt.Println("Running the camera stream")
ffmpegCmd := exec.Command("ffmpeg", "-loglevel", "quiet", "-y", "-rtsp_transport", "tcp", "-i", "rtsp://admin:123456@192.168.1.41:554/h264Preview_01_main", "-r", "1", "-f", "image2pipe", "pipe:1")
ffmpegOut, err := ffmpegCmd.StdoutPipe()
if err != nil {
return
}
err = ffmpegCmd.Start()
if err != nil {
log.Fatal(err)
}
count := 0
for {
count++
t := time.Now()
fmt.Println("writing image" + strconv.Itoa(count))
filepath := "image-" + strconv.Itoa(count) + "-" + t.Format("20060102150405.png")
out, err := os.Create(filepath)
if err != nil {
log.Fatal(err)
}
defer out.Close()
_, err = io.Copy(out, ffmpegOut)
if err != nil {
log.Fatalf("unable to copy to file: %s", err.Error())
}
}
if err := ffmpegCmd.Wait(); err != nil {
log.Fatal("Error while waiting:", err)
}
}I implemented my own save and copy function based on the io.Copy code https://golang.org/src/io/io.go
func copyAndSave(w io.Writer, r io.Reader) error {
buf := make([]byte, 1024, 1024)
for {
n, err := r.Read(buf[:])
if n == 0 {
}
if n > 0 {
d := buf[:n]
_, err := w.Write(d)
if err != nil {
return err
}
}
if err != nil {
return err
}
}
return nil
}then I updated the for loop in my main function to the below block but still I am only getting the first image in the sequence. due to
r.Read(buf[:])
is being a blocking call.for {
count++
t := time.Now()
fmt.Println("writing image" + strconv.Itoa(count))
filepath := "image-" + strconv.Itoa(count) + "-" + t.Format("20060102150405.png")
out, err := os.Create(filepath)
if err != nil {
log.Fatal(err)
}
defer out.Close()
err = copyAndSave(out, ffmpegOut)
if err != nil {
if err == io.EOF {
break
}
log.Fatalf("unable to copy to file: %s", err.Error())
break
}
}Any help is appreciated and sorry for in typos in advance :)
-
Anomalie #3860 : Non prise en compte de la balise `genie` d’un paquet.xml lors du vidage de cache
9 novembre 2016, par marcimat ☺☮☯♫Je pensais bien déplacer plus haut le chargement des chemins et options (le point B que j’indiquais).
Mais. Cela pourrait potentiellement impacter des plugins qui attendent d’avoir dans leur fichier d’option un ’spip_pipeline’ un peu rempli.Mais je vois 1 plugin (1 seul sur la zone il me semble) que ma pourrait impacter : Fastcache. (En fait non car Mutualisation déclare son pipeline dans son fichier d’option aussi donc, ça ne s’applique pas pour lui) mais je le mets pour l’exemple : si je remonte un peu le chargement des fichiers d’options, la globale ’spip_pipeline’ ne sera pas remplie par les pipelines déclarés dans les plugin.xml ou paquet.xml des plugins à activer.
Or, dans Fastcache on a cette écriture :# s’inserer au *debut* du pipeline affichage_final pour etre avant f_surligne etc # mais de preference apres mutualisation_url_img_courtes pour qu’il s’applique $GLOBALS[’spip_pipeline’][’affichage_final’] = preg_replace( ’,|mutualisation_url_img_courtes|^, ’,’\0|Fastcache_affichage_final’, $GLOBALS[’spip_pipeline’][’affichage_final’] ) ;
On peut peut être du coup supposer que d’autres plugins dans la nature font de même ?
Ça se mord un peu la queue tout de même, vu que le fichier de chargement des pipelines (tmp/cache/charger_pipelines) pourrait aussi avoir besoin d’infos qui sont chargées dans les fichiers d’options de plugins. En tout cas là pour cette balise<genie></genie>
tel que c’est codé il en a besoin (des chemins au moins).Cependant je serai d’avis tout de même de recharger les chemins et options plus tôt (spip_pipeline sera presque vide dans les fichiers d’options), en considérant que le fichier d’option sert à remplir justement ce fichier de pipeline, pas à modifier des fonctions qu’ont demandé d’autres plugins.
Voici un patch, pour voir ce que j’indique en B donc, en pièce jointe.
-
How to change mjpeg to yuyv422 from a webcam to a v4l2loopback ?
3 janvier 2020, par Dev NullBackstory : One livestreaming site I use isn’t smart enough to detect the capabilities of my webcam (Logitech Brio, 4k), and instead just uses the default frames per second settings, which is 5fps.
(full solution walk-through in the answer)
The best solution I could think of (besides changing livestream providers) was to create a loopback virtual webcam using v4l2loopback that I could force to have the exact settings I wanted to use on that livestream site.
For the brio, the higher frame rates come with mjpeg, not the default yuyv.
Problem 1 :
I could easily read mjpeg, but unfortunately kept banging my head against the wall because v4l2loopback evidently only wanted yuyv.
I tried things like :
ffmpeg -f v4l2 \
-input_format mjpeg \
-framerate 30 \
-video_size 1280x720 \
-i /dev/video0 \
-vcodec copy \
-f v4l2 /dev/video6and
ffmpeg -f v4l2 \
-input_format mjpeg \
-framerate 30 \
-video_size 1280x720 \
-i /dev/video0 \
-vcodec yuyv422 \ # this line changed (even tried "copy")
-f v4l2 /dev/video6But they wouldn’t work. I got errors like :
Unknown V4L2 pixel format equivalent for yuvj422p
and
...deprecated pixel format used, make sure you did set range correctly...
...V4L2 output device supports only a single raw video stream...
Eventually I got this to work :
ffmpeg -f v4l2 \
-input_format mjpeg \
-framerate 30 \
-video_size 1280x720 \
-i /dev/video0 \
-pix_fmt yuyv422 \ # The winning entry
-f v4l2 /dev/video6Problem 2
The next problem was getting chrome to see the virtual webcam. It worked correctly with guvcview, and on firefox I could use webcam testing sites and it would pick the virtual camera up without a problem.
Turns out google, in it’s overly-protective nature (while it’s siphoning off all our data, btw), doesn’t want to use webcams that can be read and written to.
So when starting v4l2loopback you have to tell it to announce that it’s "read only" to consumers like chrome.
Here’s the exact modprobe I use that works :
sudo modprobe v4l2loopback devices=1 exclusive_caps=1