
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 (112)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
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 (...)
Sur d’autres sites (29360)
-
FFmpeg write silence if there is no data in pipe:0
15 juillet 2023, par Oleksandr PetrenkoI have an ffmpeg process that continiously writes
PCM
data from standard input to anmp3
file. The problem is that sometimes there can be pauses in data being sent to ffmpeg. Pauses may be very large, even up to an hour, but process is never closed. I want to get ffmpeg to write silence to file if there is no data inpipe:0
. Is it possible to do only with ffmpeg or I need to implement it on my side ? If it is possible, then how can I do that ?
I tried to use some parameters and filters but I didn't found the thing I need.

I'm new to ffmpeg and working with audio so I will be glad to see any assistance.


-
CGO : How do you use pointers in Golang to access data from an array in C
23 avril 2018, par nevernewI’m writing an app for the windows platform using FFmpeg and it’s golang wrapper goav, but I’m having trouble understanding how to use the C pointers to gain access to the data array they point to.
I’m trying to get the data stored in the AVFrame class and use Go to write it to a file, and eventually a texture in OpenGl to make a video player with cool transitions.
I think understanding how to cast and access the C data will make coding this a lot easier.
I’ve stripped out all the relevant parts of the C code, the wrapper and my code, shown below :
C code - libavutil/frame.h
#include
typedef struct AVFrame {
#define AV_NUM_DATA_POINTERS 8
uint8_t *data[AV_NUM_DATA_POINTERS];
}Golang goav wrapper - I don’t really know whats going on here with the unsafe.Pointers and casting but it gives me access to the underlying C code
package avutil
/*
#cgo pkg-config: libavutil
#include <libavutil></libavutil>frame.h>
#include
*/
import "C"
import (
"unsafe"
)
type Frame C.struct_AVFrame
func AvFrameAlloc() *Frame {
return (*Frame)(unsafe.Pointer(C.av_frame_alloc()))
}
func Data(f *Frame) *uint8 {
return (*uint8)(unsafe.Pointer((*C.uint8_t)(unsafe.Pointer(&f.data))))
}My Golang code
package main
import "github.com/giorgisio/goav/avutil"
func main() {
videoFrame := avutil.AvFrameAlloc()
data := avutil.Data(videoFrame)
fmt.Println(data) // here i want the values from data[0] to data[7], but how?
} -
Extacting klm data from mp2 stream using c++ and ffmpeg
19 février 2019, par DouglasI have an mp2 stream that has klv metadata. I stored the klv in a file using ffmpeg command line :
ffmpeg -i input.mpg -map data-re -codec copy -f data output.klv
I now want to do this in c++. So, I have
FFMPEG setup …..
Then the main loop
// Read frames
while(av_read_frame(pFormatCtx, &packet) >= 0)
{
// Is this a packet from the video stream?
if(packet.stream_index == videoStream)
{
// Decode video frame
avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished, &packet);
// Did we get a video frame?
if(frameFinished)
{
// Convert the image from its native format to RGB
sws_scale(sws_ctx, (uint8_t const * const *)pFrame->data,
pFrame->linesize, 0, pCodecCtx->height,
pFrameRGB->data, pFrameRGB->linesize);
QImage myImage(pFrameRGB->data[0], pCodecCtx->width, pCodecCtx->height, QImage::Format_RGB888);
QPixmap img(QPixmap::fromImage(myImage.scaled(ui->label->width(),ui->label->height(),Qt::KeepAspectRatio)));
ui->label->setPixmap(img);
QCoreApplication::processEvents();
}
}
else // klv stream
{
// Decode klv data
qDebug() << packet.buf->size;
for(int i=0; isize; i++)
{
qDebug() << packet.buf->data[i];
}
}The resulting klv output is different - I must be doing something wrong processing the packet. The frames are good and I’m viewing it in a qt label - so my ffmpeg setup is working on images but not the klv data. Any ideas ? THANKS