
Recherche avancée
Médias (91)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
avec chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
sans chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
config chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (55)
-
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 -
Initialisation de MediaSPIP (préconfiguration)
20 février 2010, parLors de l’installation de MediaSPIP, celui-ci est préconfiguré pour les usages les plus fréquents.
Cette préconfiguration est réalisée par un plugin activé par défaut et non désactivable appelé MediaSPIP Init.
Ce plugin sert à préconfigurer de manière correcte chaque instance de MediaSPIP. Il doit donc être placé dans le dossier plugins-dist/ du site ou de la ferme pour être installé par défaut avant de pouvoir utiliser le site.
Dans un premier temps il active ou désactive des options de SPIP qui ne le (...) -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
Sur d’autres sites (12434)
-
Révision 18715 : copie_locale() peut recevoir en 3eme argument le nom du fichier dans lequel on v...
10 novembre 2011, par cedric -Le chemin passé est nettoyé de son début _DIR_RACINE si présent. Et sinon on suppose qu’il est référencé depuis la racine. Cela permet d’utiliser la fonction pour stocker une url dans un fichier cache d’un repertoire temporaire, avec les facilités de son second argument tes/auto/force/modif Dans tous (...)
-
closing goroutine spawned by fiber endpoint
30 mai 2023, par NitinI have a program that is rtsp cameras to hls format using ffmpeg for streaming.
creating goroutines for each rtsp link as ffmpeg runs in background


Streams are added by following code.


func StreamProcess(data <-chan StreamData, ctx context.Context) {
for v := range data {
 ctx, _ := context.WithCancel(ctx)
 go func() {
 if !getStreams(v.camera_id) {
 var stream StreamState
 stream.camera_id = v.camera_id
 stream.state = true
 go Stream(v, ctx)
 wg.Wait()
 } else {
 return
 }
 }()
} 



}


Streaming function which runs ffmpeg command.


func Stream(meta StreamData, ctx context.Context) error {
 log.Println("Started Streaming")
 ffmpegCmd := exec.Command("ffmpeg", "-i", meta.rtsp, "-pix_fmt", "yuv420p", "-c:v", "libx264", "-preset", "ultrafast", "-b:v", "600k", "-c:a", "aac", "-b:a", "160k", "-f", "rtsp", fmt.Sprintf("rtsp://localhost:8554/%s", meta.camera_id))
 output, _ := ffmpegCmd.CombinedOutput()

 log.Println(string(output))

 for {
 select {
 case <-ctx.Done():
 log.Println("killing process")
 ffmpegCmd.Process.Kill()
 return nil
 }
 }}



my Goal is to stop each os.exec process (ffmpeg command) or at least close all goroutines that are under ffmpeg commands without closing fiber server.


** help required new to golang **


-
Is it possible to read streaming response body using fiber ?
2 novembre 2023, par MHMI have a streaming server(ffmpeg) that send data through HTTP.
I sent the stream to my fiber backend but I only have access to
c.body()
when the stream server(ffmpeg) is terminated.
Is there any way to capture streamed data in real-time in fiber ?

here is my sample code :


package main

import "github.com/gofiber/fiber/v2"

func main() {
 app := fiber.New()
 
app.Post("/", func(c *fiber.Ctx) error {
 golang // real-time reading streamed data in c.body() and send it to fiber websocket
 return c.SendStatus(200)

}