
Recherche avancée
Autres articles (76)
-
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;
Sur d’autres sites (8141)
-
Révision 92681 : Suppression des barres verticales entre les boutons, maintenant qu’ils sont bien ...
6 novembre 2015, par nicolas.dorigny@gmail.com -
Decoding with FFMPEG on Visual Studio 2010
6 juin 2013, par user2439801I just started using FFMPEG with C++ and try to code an audio decoder then write the decoded audio into a file.
However i'm not sure about which data to write to the output file. As far as i know from looking at the sample codes it seems to be the AVFrame -> data[0].
But when i try to print it on the consoles, i get some random numbers that are different each time i run the program. And when i try to write this AVFrame->data[0] into a file i keep getting an error.So my question is how can i write the decoded audio after i call the function av_codec_decode_audio4 ?
Below i attached my code and i pass the argument "C :\02.mp3" which is a path for a valid mp3 file on my PC.
Thank you for your help.
// TestFFMPEG.cpp : Audio Decoder
//
#include "stdafx.h"
#include <iostream>
#include <fstream>
#include <sstream>
extern "C" {
#include
#include
#include
}
using namespace std;
int main(int argc, char* argv[])
{
int audioStream = -1;
AVCodec *aCodec;
AVPacket avPkt;
AVFrame *decode_frame = avcodec_alloc_frame();
AVCodecContext *aCodecCtxt;
AVFormatContext *pFormatCtxt = NULL;
if(argc != 2) { // Checking whether there is enough argument
return -1;
}
av_register_all(); //Initialize CODEC
avformat_network_init();
av_init_packet (&avPkt);
if (avformat_open_input (&pFormatCtxt, argv[1],NULL,NULL)!= 0 ){ //Opening File
return -2;
}
if(avformat_find_stream_info (pFormatCtxt,NULL) < 0){ //Get Streams Info
return -3;
}
AVStream *stream = NULL;
//av_read_play (pFormatCtxt); //open streams
for (int i = 0; i < pFormatCtxt->nb_streams ; i++) { //Find Audio Stream
if (pFormatCtxt->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO){
audioStream =i;
}
}
aCodecCtxt = pFormatCtxt ->streams [audioStream]->codec; // opening decoder
aCodec = avcodec_find_decoder( pFormatCtxt->streams [audioStream] ->codec->codec_id);
if (!aCodec) {
return -8;
}
if (avcodec_open2(aCodecCtxt,aCodec,NULL)!=0) {
return -9;
}
int cnt = 0;
while(av_read_frame(pFormatCtxt,&avPkt) >= 0 ){
if (avPkt.stream_index == audioStream){
int check = 0;
int result = avcodec_decode_audio4 (aCodecCtxt,decode_frame,&check, &avPkt);
cout << "Decoded : "<< (int) decode_frame->data[0] <<", "<< "Check : " << check << ", Format :" << decode_frame->format <<" " << decode_frame->linesize[0]<< " "<<cnt return="return" acodec="acodec">id;
}
</cnt></sstream></fstream></iostream> -
Using ffmpeg static libraries in an visual studio explress C++ 2010 project
29 octobre 2015, par Yvo GötzAs the title says, I have been trying to get ffmpeg/libav libraries to work in MSVC++ 2010.
However, I keep running in the following error while coding on debug mode.code :
extern "C"
{
#ifndef __STDC_CONSTANT_MACROS
#define __STDC_CONSTANT_MACROS
#endif
#include
#include
#include
#include
}
int main( int argc, char* argv[] )
{
av_register_all();
return 0;
}console :
1>------ Build started: Project: ffmpeg, Configuration: Debug Win32 ------
1>ffmpeg.obj : error LNK2019: unresolved external symbol _av_register_all referenced in function _main
1>C:\Users\okki\documents\visual studio 2010\Projects\ffmpeg\Debug\ffmpeg.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========I used zeranoe’s latest build git-56ba331 (2013-05-14).
And I have tried the following to fix this :
- configuring the project to look for both the x64 and x86 libraries.
- Add the DLLs from the ’shared’ package to both library folders.
- Add the library directory to both the linker options and VC++ Directories.
I have been stuck on this for a while, and any suggestion can help.
If any extra info is needed I will happily provide.