
Recherche avancée
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 makes video with no sound on video.js
21 septembre 2023, par Laurent BI have this code that creates m3u8 file to stream a mkv file after transcoding.


ffmpeg.setFfmpegPath(ffmpegPath);
childProcess = ffmpeg()
 .input(inputFilePath)
 // .native()
 .inputOptions(['-y', '-progress', 'pipe:1'])
 .outputOptions(['-b:v 1M', '-hls_time 2', '-hls_list_size 0', '-hls_segment_size 500000'])
 .output('public/output.m3u8')
 .on('end', () => {
 io.emit('conversionComplete', { percent: 100, time: totalDuration, totalDuration, timemark: millisecondsToTimeString(totalDuration) });
 childProcess = null
 })
 .on('error', (error) => {
 io.emit('conversionError', { error });
 childProcess = null
 })
 .on('progress', (progress) => {
 io.emit('conversionProgress', { ...progress, time: timeStringToMilliseconds(progress.timemark), totalDuration });
 });

childProcess.run();



The m3u8 is readable by VLC Player and video.js and can be casted to Chrome Cast. For some others, 4Go files moreless, it works only when the video is transcoded without sound with option .inputOption('-an').


Here's the content of m3u8


#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:4
#EXTINF:10.000000,
output4.ts
#EXTINF:10.000000,
output5.ts
#EXTINF:8.640000,
output6.ts
#EXTINF:10.000000,
output7.ts
#EXTINF:10.000000,
output8.ts



- 

- I tried with all possible audio codecs provided by ffmpeg
- I tried with bigger/smaller parts for ts files
- I tried with other bitrate








Thanks in advance for your ideas


-
Draw FFmpeg AVFrame data with OpenGL in Go
27 avril 2018, par nevernewI’m making a video player in Go (on Windows) using FFmpeg and OpenGl, with the go wrappers goav and go-gl respectively. I want to set the pixels (stored in AVFrame->data) as a texture to display with OpenGL.
I have it drawing pixels from a test array I created in Go, but it’s not taking the AVFrame data at all. The gl wrapper is giving me an error
panic: reflect: call of reflect.Value.Pointer on uintptr Value
with this code, I’ve tried different ways, trying to cast the data to the right type to be accepted but to no avail.This is the offending code where
f
is of type*Frame
:type Frame C.struct_AVFrame
dataPtr := (*uint8)(unsafe.Pointer((*C.uint8_t)(unsafe.Pointer(&f.data))))
dataAddr := uintptr(unsafe.Pointer(dataPtr))
glPixelPointer := gl.Ptr(dataAddr) // reflect error happens here, so the pointer is wrongTrying to get the data from this C struct :
#include
typedef struct AVFrame {
#define AV_NUM_DATA_POINTERS 8
uint8_t *data[AV_NUM_DATA_POINTERS];
}I can provide the rest of the code if needed, but there’s a lot of it to get the example running.
-
Draw FFmpeg AVFrame data with OpenGL with Go
27 avril 2018, par nevernewI’m making a video player in Go (on Windows) using FFmpeg and OpenGl, with the go wrappers goav and go-gl respectively. I want to set the pixels (stored in AVFrame->data) as a texture to display with OpenGL.
I have it drawing pixels from a test array I created in Go, but it’s not taking the AVFrame data at all. The gl wrapper is giving me an error
panic: reflect: call of reflect.Value.Pointer on uintptr Value
with this code, I’ve tried different ways, trying to cast the data to the right type to be accepted but to no avail.This is the offending code where
f
is of type*Frame
:type Frame C.struct_AVFrame
dataPtr := (*uint8)(unsafe.Pointer((*C.uint8_t)(unsafe.Pointer(&f.data))))
dataAddr := uintptr(unsafe.Pointer(dataPtr))
glPixelPointer := gl.Ptr(dataAddr) // reflect error happens here, so the pointer is wrongTrying to get the data from this C struct :
#include
typedef struct AVFrame {
#define AV_NUM_DATA_POINTERS 8
uint8_t *data[AV_NUM_DATA_POINTERS];
}I can provide the rest of the code if needed, but there’s a lot of it to get the example running.