
Recherche avancée
Médias (2)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (38)
-
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
MediaSPIP Player : problèmes potentiels
22 février 2011, parLe lecteur ne fonctionne pas sur Internet Explorer
Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...)
Sur d’autres sites (9541)
-
Decode audio using libavcodec and play using libAO ?
21 mars 2012, par Ashika Umanga UmagiliyaI use following code snippet to decode audio files (tested with MP3,WAV,WMV).
But when it plays the audio , it just gives static sounds and crashes time to time.
Any hints on what i am doing wrong here ?#include
#include
#include
#include
extern "C" {
#include "libavutil/mathematics.h"
#include "libavformat/avformat.h"
#include "libswscale/swscale.h"
#include <ao></ao>ao.h>
}
void die(const char *msg)
{
fprintf(stderr,"%s\n",msg);
exit(1);
}
int main(int argc, char **argv)
{
const char* input_filename=argv[1];
//avcodec_register_all();
av_register_all();
//av_ini
AVFormatContext* container=avformat_alloc_context();
if(avformat_open_input(&container,input_filename,NULL,NULL)<0){
die("Could not open file");
}
if(av_find_stream_info(container)<0){
die("Could not find file info");
}
av_dump_format(container,0,input_filename,false);
int stream_id=-1;
int i;
for(i=0;inb_streams;i++){
if(container->streams[i]->codec->codec_type==AVMEDIA_TYPE_AUDIO){
stream_id=i;
break;
}
}
if(stream_id==-1){
die("Could not find Audio Stream");
}
AVDictionary *metadata=container->metadata;
AVCodecContext *ctx=container->streams[stream_id]->codec;
AVCodec *codec=avcodec_find_decoder(ctx->codec_id);
if(codec==NULL){
die("cannot find codec!");
}
if(avcodec_open(ctx,codec)<0){
die("Codec cannot be found");
}
//ctx=avcodec_alloc_context3(codec);
//initialize AO lib
ao_initialize();
int driver=ao_default_driver_id();
ao_sample_format sformat;
sformat.bits=16;
sformat.channels=2;
sformat.rate=44100;
sformat.byte_format=AO_FMT_NATIVE;
sformat.matrix=0;
ao_device *adevice=ao_open_live(driver,&sformat,NULL);
//end of init AO LIB
AVPacket packet;
av_init_packet(&packet);
AVFrame *frame=avcodec_alloc_frame();
int buffer_size=AVCODEC_MAX_AUDIO_FRAME_SIZE;
uint8_t buffer[buffer_size];
packet.data=buffer;
packet.size =buffer_size;
int len;
int frameFinished=0;
while(av_read_frame(container,&packet)>=0)
{
if(packet.stream_index==stream_id){
//printf("Audio Frame read \n");
int len=avcodec_decode_audio4(ctx,frame,&frameFinished,&packet);
//frame->
if(frameFinished){
//printf("Finished reading Frame %d %d\n",packet.size,len);
ao_play(adevice, (char*)frame->data, len);
}
}
}
av_close_input_file(container);
ao_shutdown();
return 0;
} -
Getting accurate time from FFMPeg with Objective C (Audio Queue Services)
2 avril 2012, par WinstonMy iPhone app plays an audio file using FFMPeg.
I'm getting the elapsed time (to show to user) from the playing audio (in minutes and seconds after converting from microseconds, given by FFMPeg) like so :
AudioTimeStamp currentTimeStamp;
AudioQueueGetCurrentTime (audioQueue, NULL, &currentTimeStamp, NULL);
getFFMPEGtime = currentTimeStamp.mSampleTime/self.basicAudioDescription.mSampleRate;
self.currentAudioTime = [NSString stringWithFormat: @"%02d:%02d",
(int) getFFMPEGtime / (int)60000000,
(int) ((getFFMPEGtime % 60000000)/1000000)];Everything works fine, but when I scrub back or forward to play another portion of the song, the elapsed time will go back to zero, no matter the current position. The timer will always zero out.
I know I'm suposed to do some math to keep track of the old time and the new time, maybe constructing another clock or so, perhaps implementing another callback function, etc... I'm not sure what way I should go.
My questions are :
1) What's the best approach to keep track of the elapsed time when going back/forward in a song, avoiding the clock to always going back to zero ?
2) Should I look deeply into FFMPeg functions or should I stick with Objective-C and Cocoa Touch for solving this problem ?
Please, I need some advices/ideas from experienced programmers. I'm stuck. Thanks beforehand !
-
Stream H264 To Android Using FFMPEG
26 février 2013, par GroovyDotComI'm trying to stream a .ts file containing H.264 and AAC as an RTP stream to an Android device.
I tried :
.\ffmpeg -fflags +genpts -re -i 1.ts -vcodec copy -an -f rtp rtp ://127.0.0.1:10
000 -vn -acodec copy -f rtp rtp ://127.0.0.1:20000 -newaudioFFMPEG displays what should be in your SDP file and I copied this into an SDP file and tried playing from VLC and FFPLAY. VLC plays audio but just gives errors re : bad NAL unit types for video. FFPLAY doesn't play anything.
My best guess if that the FFMPEG H.264 RTP implementation is broken or at least it doesn't work in video passthru mode (i.e. using the -vcodec copy).
I need a fix for FFMPEG or an alternate simple open-source solution. I don't want to install FFMPEG in my Android client.
thanks.