
Recherche avancée
Médias (1)
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
Autres articles (52)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
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 ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (6670)
-
Decode .wav file and write it into another file using ffmpeg
16 février 2017, par deshuHow to decode a .wav file and write it into another file using ffmpeg ?
I got decoded data by this piece of code :
-(void)audioDecode:(const char *)outfilename inFileName:(const char *)filename
{
const char* input_filename=filename;
//avcodec_register_all();
av_register_all();
avcodec_register_all();
// av_register_all();
//av_ini
// AVFormatContext* container=avformat_alloc_context();
// if(avformat_open_input(&container,filename,NULL,NULL)<0){
// NSLog(@"Could not open file");
// }
AVCodec *codec;
AVCodecContext *c= NULL;
int len;
FILE *f, *outfile;
uint8_t inbuf[AUDIO_INBUF_SIZE + FF_INPUT_BUFFER_PADDING_SIZE];
AVPacket avpkt;
AVFrame *decoded_frame = NULL;
av_init_packet(&avpkt);
printf("Decode audio file %s to %s\n", filename, outfilename);
avcodec_register_all();
AVFrame* frame = av_frame_alloc();
if (!frame)
{
fprintf(stderr, "Could not allocate audio frame\n");
exit(1);
}
AVFormatContext* formatContext = NULL;
/* Opening the file, and check if it has opened */
if (avformat_open_input(&formatContext, filename, NULL, NULL) != 0)
{
av_frame_free(&frame);
NSLog(@"Could not open file");
}
if (avformat_find_stream_info(formatContext, NULL) < 0)
{
av_frame_free(&frame);
avformat_close_input(&formatContext);
NSLog(@"Error finding the stream info");
}
outfile = fopen(outfilename, "wb");
if (!outfile) {
av_free(c);
exit(1);
}
/* Find the audio Stream, if no audio stream are found, clean and exit */
AVCodec* cdc = NULL;
int streamIndex = av_find_best_stream(formatContext, AVMEDIA_TYPE_AUDIO, -1, -1, &cdc, 0);
if (streamIndex < 0)
{
av_frame_free(&frame);
avformat_close_input(&formatContext);
NSLog(@"Could not find any audio stream in the file");
exit(1);
}
/* Open the audio stream to read data in audioStream */
AVStream* audioStream = formatContext->streams[streamIndex];
/* Initialize the codec context */
AVCodecContext* codecContext = audioStream->codec;
codecContext->codec = cdc;
/* Open the codec, and verify if it has opened */
if (avcodec_open2(codecContext, codecContext->codec, NULL) != 0)
{
av_frame_free(&frame);
avformat_close_input(&formatContext);
NSLog(@"Couldn't open the context with the decoder");
exit(1);
}
/* Initialize buffer to store compressed packets */
AVPacket readingPacket;
av_init_packet(&readingPacket);
int lenght = 1;
long long int chunk = ((formatContext->bit_rate)*lenght/8);
int j=0;
int count = 0;
//audioChunk output;
while(av_read_frame(formatContext, &readingPacket)==0){
//if((count+readingPacket.size)>start){
if(readingPacket.stream_index == audioStream->index){
AVPacket decodingPacket = readingPacket;
// Audio packets can have multiple audio frames in a single packet
while (decodingPacket.size > 0){
// Try to decode the packet into a frame
// Some frames rely on multiple packets, so we have to make sure the frame is finished before
// we can use it
int gotFrame = 0;
int result = avcodec_decode_audio4(codecContext, frame, &gotFrame, &decodingPacket);
count += result;
if (result >= 0 && gotFrame)
{
decodingPacket.size -= result;
decodingPacket.data += result;
int a;
for(int i=0;idata[0], 1, decodingPacket.size, outfile);
// *(output.data+j)=frame->data[0][i];
//
j++;
if(j>=chunk) break;
}
// We now have a fully decoded audio frame
}
else
{
decodingPacket.size = 0;
decodingPacket.data = NULL;
}
// if(j>=chunk) break;
}
}
// }else count+=readingPacket.size;
//
// // To prevent memory leak, must free packet.
// av_free_packet(&readingPacket);
// if(j>=chunk) break;
}
fclose(outfile);But the file is created with zero bytes. I don’t know what’s wrong with this code. And I got one more error : "Format adp detected only with low score of 25, misdetection possible !"
-
get audio current freqency for each 0.1 second of audio file with ffmpeg sox or opus into file.txt
15 mars 2019, par VladI am trying to get audio freqency statistic from call record in file.opus for each 0,1 second, have try ffmpeg (spectrum) ffprobe ,
for example
sox '.$file.' −n rate 6k spectrogram −z 62 -w Hamming -o aaaaaa/test10.png stat -freq 2>aaaaaa/test10.txt
return spectrum
all of them return values but no freqency found any other library ? Or what I am doing wrong I now it retrun spectrum but I need concrete freqency of human voice it is possible with ffmpeg or ffprobe or sox ? I am working in php but running shel comands any help will be aprisiatied. What should be my next step ? I am lost I have no idea how could get freqency from this numbers or "it is possible " ??? What is the first step comand in sox etc. -
converting .mov file to .h264 file
29 août 2011, par Robin Ryeok, this is the case, i actually want to parse frames from a mov file. get the encoded h264 frames. and i've managed to do so by using ffmpeg but when i try to make a movie again by using
ffmpeg -i test* test.mov
i gettest00: Invalid data found when processing input
so there is something not correct with the structure of the frames. as i understand it a frame should have the following appearance :00 00 00 01 XX data -------------
where XX is say whether it is a I-,P- or B-frame. or more specifically
type(XX) = 0x0F && XX
says if it is I(type(XX) = 5 ?),P(type(XX) = 7 ?) or B(type(XX) = 8 ?) frame. I'm not sure about these number, i've been looking for it but not found good sources. so that's question number one, what number should the NALU be for the different frames ?anyway, when i use av_read_frame on the mov file, i get frame that look like this :
4B = size, 1B = XX and then data. (at least this is what i think i get)
the files where i store the frames are always size long when i look at them in a hexeditor(otherwise as well of course). and XX is always 65(ie. type(XX) = 5) in the first and then 61(ie. type(XX) = 1) for a couple of frames and then back to being 65 for one frame and so on.
i guess that these are frames like : I P P P P P P I P P P P P P P I P P P P P P P .... however then my assumption about the type numbers for the different frame types are false, which is highly likely. (any suggestion on reading about this ? except the ISO/IEC 14496-10, i don't understand it really).
I've tried to remove the size and append 00 00 00 01 before the XX byte and the data but without success. any tips on how i could modify the frames to be valid H264 encoded frames ?