
Recherche avancée
Médias (91)
-
Spoon - Revenge !
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
My Morning Jacket - One Big Holiday
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Zap Mama - Wadidyusay ?
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
David Byrne - My Fair Lady
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Beastie Boys - Now Get Busy
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Granite de l’Aber Ildut
9 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
Autres articles (49)
-
Les statuts des instances de mutualisation
13 mars 2010, parPour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...) -
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
Librairies et binaires spécifiques au traitement vidéo et sonore
31 janvier 2010, parLes logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
Binaires complémentaires et facultatifs flvtool2 : (...)
Sur d’autres sites (4490)
-
FFMPEG API - Recording video and audio - Syncing problems
16 juin 2016, par SolidusI’m developing an app which is able to record video from a webcam and audio from a microphone. I’ve been using QT but unfortunately the camera module does not work on windows which led me to use ffmpeg to record the video/audio.
My Camera module is now working well besides a slight problem with syncing. The audio and video sometimes end up out of sync by a small difference (less than 1 second I’d say, although it might be worse with longer recordings).
When I encode the frames I add the PTS in the following way (which I took from the muxing.c example) :
- For the video frames I increment the PTS one by one (starting at 0).
- For the audio frames I increment the PTS by the
nb_samples
of the audio frame (starting at 0).
I am saving the file at 25 fps and asking for the camera to give me 25 fps (which it can). I am also converting the video frames to the
YUV420P
format. For the audio frames conversion I need to use aAVAudioFifo
because the microfone sends bigger samples than the mp4 stream supports, so I have to split them in chuncks. I used the transcode.c example for this.I am out of ideas in what I should do to sync the audio and video. Do I need to use a clock or something to correctly sync up both streams ?
The full code is too big to post here but should it be necessary I can add it to github for example.
Here is the code for writing a frame :
int FFCapture::writeFrame(const AVRational *time_base, AVStream *stream, AVPacket *pkt) {
/* rescale output packet timestamp values from codec to stream timebase */
av_packet_rescale_ts(pkt, *time_base, stream->time_base);
pkt->stream_index = stream->index;
/* Write the compressed frame to the media file. */
return av_interleaved_write_frame(oFormatContext, pkt);
}Code for getting the elapsed time :
qint64 FFCapture::getElapsedTime(qint64 *previousTime) {
qint64 newTime = timer.elapsed();
if(newTime > *previousTime) {
*previousTime = newTime;
return newTime;
}
return -1;
}Code for adding the PTS (video and audio stream, respectively) :
qint64 time = getElapsedTime(&previousVideoTime);
if(time >= 0) outFrame->pts = time;
//if(time >= 0) outFrame->pts = av_rescale_q(time, outStream.videoStream->codec->time_base, outStream.videoStream->time_base);
qint64 time = getElapsedTime(&previousAudioTime);
if(time >= 0) {
AVRational aux;
aux.num = 1;
aux.den = 1000;
outFrame->pts = time;
//outFrame->pts = av_rescale_q(time, aux, outStream.audioStream->time_base);
} -
Opus Audio Codec in Linphone Android 2013 Version
2 septembre 2015, par RedturboI want to just enabled Opus Audio Codec in my VOIP application, I have try code from here : http://stackoverflow.com/questions/31635522/force-using-just-opus-codec-in-linphone-android/31652551#31652551
I try to check findpayloadtype first :
for (PayloadType pt : mLc.getAudioCodecs()) {
pt = mLc.findPayloadType("PCMA", 8000, 1);
Log.d("LinphoneManager", "PayloadType PCMA : " + pt);
}
for (PayloadType pt : mLc.getAudioCodecs()) {
pt = mLc.findPayloadType("PCMU", 8000, 1);
Log.d("LinphoneManager","PayloadType PCMU : "+pt);
}
for (PayloadType pt : mLc.getAudioCodecs()) {
pt = mLc.findPayloadType("OPUS", 8000, 1);
Log.d("LinphoneManager","PayloadType P : "+pt);
}PCMA and PCMU show value in log :
[PCMA] clock [8000], bitrate [64000]
[PCMU] clock [8000], bitrate [64000]
but OPUS show null value :
null
is that something wrong with my code to got OPUS audio codec, or something else ?
-
How to add an arbitrary, formatted timestamp to a video with FFMPEG ?
3 septembre 2015, par Neil M.I am calling ffmpeg from a custom tool to concatenate video files while overlaying a timestamp in the output. The output video needs to have a timestamp starting at an arbitrary time. The format must be a 12-hour clock with seconds and meridiem, e.g. 10:34:59 AM or 6:13:09 PM. Here’s the full command I’m using right now :
ffmpeg\bin\ffmpeg.exe -y -i "concat:input.mod" -ss 00:00:00 -t 00:02:17
-an -vcodec libx264 -profile:v baseline -level 13 -b:v 2000k -vf
"drawtext=fontcolor=white:fontsize=16:fontfile="/Windows/Fonts/arial.ttf":
box=1:boxcolor=black@0.3:x=(w-text_w-10):y=(h-text_h-5):
timecode='02\:36\:17\;00':rate=30000/1001" output.mp4This outputs a 2 minute, 17 second duration video beginning at the start of the input file. The output video has a timecode in the bottom-right corner beginning at the time 02:36:17 and ending at 02:38:34. What I want is exactly this, but instead of printing "02:36:17 ;00" on frame 0 and counting up from there, it should print "2:36:17 AM" on frame 0 and count up from there.
I have tried using the localtime function to output formatted time, but the time value it uses is the time that the drawtext filter is called. It doesn’t take a parameter for an arbitrary time.
I have also looked at the pts function, which seems to allow an arbitrary offset but only supports two formatting options, neither of which is the clock format I need.
What is the proper way to add a timestamp with an arbitrary starting time and format using ffmpeg ?