
Recherche avancée
Médias (1)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
Autres articles (31)
-
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...) -
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 (...) -
Automated installation script of MediaSPIP
25 avril 2011, parTo overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
The documentation of the use of this installation script is available here.
The code of this (...)
Sur d’autres sites (3187)
-
ffmpeg does not fill in my provided buffer
14 avril 2018, par thelearnerI’m trying to pipe a mp4 video to ffmpeg to generate a thumbnail. Unfortunately, ffmpeg does not fill in my provided buffer, even though the whole command execution is successful.
I’m reading the video from a http request body :
videoData, err := ioutil.ReadAll(r.Body)
This is how I push it to ffmpeg :
log.Print("Creating thumbnail..")
width := 640
height := 360
log.Print("Size of the video: ", len(videoData))
cmd := exec.Command("ffmpeg", "-i", "pipe:0", "-vframes", "1", "-s", fmt.Sprintf("%dx%d", width, height), "-f", "singlejpeg", "-frame_size", fmt.Sprintf("%d", totalVideoBytes), "-")
cmd.Stdin = bytes.NewReader(videoData)
var imageBuffer bytes.Buffer
cmd.Stdout = &imageBuffer
err := cmd.Run()
if err != nil {
log.Panic("ERROR")
}
imageBytes := imageBuffer.Bytes()This is the error output :
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7ff05d002600]stream 0, offset 0x5ded : partial file
pipe:0 : Invalid data found when processing input
Finishing stream 0:0 without any data written to it.
frame= 0 fps=0.0 q=0.0
Lsize= 0kB time=-577014:32:22.77 bitrate= -0.0kbits/s speed=N/A
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead : unknownOutput file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
Thanks a lot, any help is appreciated.
-
avformat_write_header() doesn't work when writing data to memory instead of file
12 novembre 2020, par Mohamed Kandeeli want to resample a given input format from memory to memory everything is good so far.


but when trying to get the output header from ffmpeg it doesn't work.


here i allocate the context and pass the write_buffer function pointer so that it doesn't write to a file but instead it will call my function with the required data


unsigned char * aviobuffer = (unsigned char *) av_malloc (32768);
AVIOContext * avio = avio_alloc_context (aviobuffer, 32768,1, NULL, NULL, write_buffer, NULL);

AVFormatContext* containerContext;
avformat_alloc_output_context2(&containerContext, NULL, "s16le", NULL);
containerContext->pb = avio;



here is my write_buffer function


std::vector<char>* data;
int write_buffer(void *opaque, uint8_t *buf, int buf_size)
{
 std::vector<char> tmp;
 tmp.assign(buf, buf + buf_size);
 data->insert(data->end(), tmp.begin(), tmp.end());
 return buf_size;
}
</char></char>


now when i call avformat_write_header() it doesn't call my write_buffer() function + it returns 0 which means success.


int ret = avformat_write_header(containerContext, NULL);



after that i call the appropriate functions to get the data body itself and my write_buffer() get called normally so i am now left with the data body with no header !!


how can i get the output header anyways ?


-
how to get cmsamplebuffer data to avformate_open_input() function in FFMpeg ?
17 mai 2018, par Shahrear Mahmudi want to stream apple mobile camera to a UDP port using FFMPEG. so far i have already done it from a video file. but now i want to do it live from apple mobile camera.
some body can give me some clue for this. my head is spining for this solution ?
Please help me.