
Recherche avancée
Médias (21)
-
1,000,000
27 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Four of Us are Dying
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Corona Radiata
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Lights in the Sky
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Head Down
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (111)
-
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 (...) -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras. -
Que fait exactement ce script ?
18 janvier 2011, parCe script est écrit en bash. Il est donc facilement utilisable sur n’importe quel serveur.
Il n’est compatible qu’avec une liste de distributions précises (voir Liste des distributions compatibles).
Installation de dépendances de MediaSPIP
Son rôle principal est d’installer l’ensemble des dépendances logicielles nécessaires coté serveur à savoir :
Les outils de base pour pouvoir installer le reste des dépendances Les outils de développements : build-essential (via APT depuis les dépôts officiels) ; (...)
Sur d’autres sites (10333)
-
Streaming converted movie with mp4 container in NodeJS, movie playing very fast
20 septembre 2016, par MustafaI have used stream-transcoder module to convert a file make it a stream. So the file is not stored, it is on the fly.
app.get("/video", function(req,res){
res.writeHead(200, {'Content-Type': 'video/mp4'});
var src = "movie.avi";
var Transcoder = require('stream-transcoder');
var stream = fs.createReadStream(src);
new Transcoder(stream)
.maxSize(1280, 720)
.videoCodec('h264')
.videoBitrate(800 * 1000)
.fps(25)
.sampleRate(44100)
.channels(2)
.audioBitrate(128 * 1000)
.format('mp4')
.on('finish', function() {
console.log("finished");
})
.stream().pipe(res);
});It works nicely, it is fast, but too fast, the audio is played at the same speed, however the video does not respect the frame rate, whatever is recieved from ffmpeg is immeidately shown, fastly. Additionally, it does not show the total time, I believe it is the problem. I need to somehow specify the length, framerate, but I could not find enough information on that. I thought the stream recieved from ffmpeg should contain that. And I could not find respective headers for that in HTTP.
Here are the flags that this stream-transcoder module uses for MP4 :
[ '-i',
'-',
'-vf',
'scale=min(trunc(1280/hsub)*hsub\\,trunc(a*720/hsub)*hsub):min(trunc(720/vsub)*vsub\\,trunc(1280/a/vsub)*vsub)',
'-vcodec',
'h264',
'-b:v',
800000,
'-r',
25,
'-ar',
44100,
'-ac',
2,
'-ab',
128000,
'-f',
'mp4',
'-movflags',
'frag_keyframe+faststart',
'pipe:1' ]When I use VP8 encoder and WebM, it works nicely, the time is displayed, video plays normal speed.
-
Noise when decoding mp3 using libavcodec on iOS
11 janvier 2014, par TrenskowI have this methods. It first sets up an audio input if necessary. Then it reads a frame, and returns the frame converted using an AudioConverterRef (wrapped in an KFInlineConverterUnit class) to my Core Audio graph. At the end of the method it tears down the input, if audio output has stopped.
- (NSData *)readNextChunk {
/* Setup audio input */
if (_formatContext == NULL && self.runLoopActive) {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
av_register_all();
});
avformat_network_init();
av_init_packet(&_packet);
_formatContext = avformat_alloc_context();
[self handleError:avformat_open_input(&_formatContext, [[_url absoluteString] cStringUsingEncoding:NSUTF8StringEncoding], NULL, NULL)];
[self handleError:avformat_find_stream_info(_formatContext, NULL)];
_audioStreamIndex = -1;
for (NSInteger index = 0 ; index < _formatContext->nb_streams ; index++)
if (_formatContext->streams[index]->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
_audioStreamIndex = index;
break;
}
if (_audioStreamIndex > -1) {
_codec = avcodec_find_decoder(_formatContext->streams[_audioStreamIndex]->codec->codec_id);
_codecContext = _formatContext->streams[_audioStreamIndex]->codec;
[self handleError:avcodec_open2(_codecContext, _codec, NULL)];
}
if (self.timeOffset > .0) {
int64_t timestamp = AV_TIME_BASE * self.timeOffset;
av_seek_frame(_formatContext, -1, timestamp, AVSEEK_FLAG_ANY);
}
}
/* Read and decode next frame */
NSData *chunk = nil;
AVFrame *frame = avcodec_alloc_frame();
while (self.runLoopActive && _formatContext != NULL && av_read_frame(_formatContext, &_packet) >= 0) {
if (_packet.stream_index == _audioStreamIndex) {
int gotFrame = 0;
int len = avcodec_decode_audio4(_codecContext, frame, &gotFrame, &_packet);
[self handleError:len];
if (gotFrame) {
/* Setup a converter for my Audio Graph */
AudioStreamBasicDescription inputAudioDescription = [self audioDescriptionForCodecContext];
if (!_converter || memcmp(&inputAudioDescription, _converter.inputAudioDescription, sizeof(AudioStreamBasicDescription)) != 0)
_converter = [KFInlineConverterUnit newWithInputAudioDescription:inputAudioDescription
outputAudioDescription:self.audioDescription];
/* Convert frames */
if (inputAudioDescription.mFormatFlags & kAudioFormatFlagIsNonInterleaved) {
NSMutableArray *buffers = [@[] mutableCopy];
for (NSInteger i = 0 ; i < frame->channels ; i++) {
[buffers addObject:[NSData dataWithBytes:frame->data[i] length:frame->nb_samples * inputAudioDescription.mBytesPerFrame]];
}
chunk = [_converter convertBuffer:buffers];
} else
chunk = [_converter convertBuffer:@[[NSData dataWithBytes:frame->data[0] length:frame->nb_samples * inputAudioDescription.mBytesPerFrame]]];
if (_packet.data != NULL)
av_free_packet(&_packet);
break;
}
}
}
avcodec_free_frame(&frame);
/* Tear down if output has stopped */
if (!self.runLoopActive) {
avformat_free_context(_formatContext);
_formatContext = NULL;
avformat_network_deinit();
}
return chunk;
}Basically everything is fine. I am developing this for iOS, and when I test it in the iOS Simulator everything works smoothly. It plays all audio formats with no problems.
The problem arises, when I run the code on an actual device. Then mp3 files are audible - but VERY distorted. I have tried everything in my mind to make this work, but I cannot figure what's going wrong.
I can say that the problem does NOT lay in the converter. I've extracted the audio before it hits the decoder, and it sounds the same. So the converter just converts the distorted audio. So I think it might be an MP3 decoder issue.
Anyone experienced this before ?
-
ffmpeg error loading shared OpenCV libraries
19 septembre 2017, par chronosynclasticI installed FFmpeg 3.3 from a PPA repository following the guide here. I already have OpenCV 3.3 installed on my Ubuntu 16.04 system with all the necessary libraries under
/usr/local/lib
. However, when I try to run ffmpeg, I get the error :ffmpeg: error while loading shared libraries:
libopencv_core.so.2.4: cannot open shared object file: No such file or directoryDoes FFmpeg only work with OpenCV 2.4 libraries ? I have the corresponding library for OpenCV under
/usr/local/lib/libopencv_core.so.3.3
but somehow FFmpeg looks for the version 2.4.