
Recherche avancée
Autres articles (91)
-
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 ;
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (16689)
-
Distorted audio output from microphone input
25 août 2016, par Mohammad Abu MusaI am writing an ogg encoder with chrome native client, I managed to successfully export the files as the wave samples come in put I have two issues
- Timing in the file
- The voice is distorted, I hear noises instead of the voice collected from the microphone
Here how the code works, first I collect the microphone samples and process it as the following
const char* data = static_cast<const>(buffer.GetDataBuffer());
audio_buffer_size = buffer.GetDataBufferSize();
uint32_t channels = buffer.GetNumberOfChannels();
uint32_t samples = buffer.GetNumberOfSamples() / channels;
if (channel_count_ != channels || sample_count_ != samples) {
channel_count_ = channels;
sample_count_ = samples;
samples_.resize(sample_count_ * channel_count_);
// Try (+ 5) to ensure that we pick up a new set of samples between each
// timer-generated repaint.
timer_interval_ = (sample_count_ * 1000) / buffer.GetSampleRate() + 5;
// Start the timer for the first buffer.
if (first_buffer_) {
first_buffer_ = false;
ScheduleNextTimer();
}
}
memcpy(samples_.data(), data,
sample_count_ * channel_count_ * sizeof(char));
</const>The result is a
vector
called samples_ of typechar
for the other information they are as follows- Samples 480
- Channels 1
- Sample Rate 48000
- Time Interval is 15
On the function
ScheduleNextTimer
I make the encoding and the storage of the packets toogg
file. I used the standard code provided in the encoder example but I do not think I am doing write since I am not importing from a wave file, I am rather collecting raw bytes so I do not think the loops I am using are correct.
Attempt #1for (int i = 0; i < sampread; i++) {
for (int j = 0; j < audioCh; j++) {
vorbis_buffer[j][i] = ((samples_[count + 1] << 8)
| (0x00ff & (int) samples_[count])) / 32768.f;
count += 2;
}
}Attempt #2
for(int i=0;i4;i++){
vorbis_buffer[0][i]=((samples_[i*4+1]<<8)|
(0x00ff&(int)samples_[i*4]))/32768.f;
vorbis_buffer[1][i]=((samples_[i*4+3]<<8)|
(0x00ff&(int)samples_[i*4+2]))/32768.f;
}Both of these attempts did not work. My question is should I keep using the
vector
or should I change it to something else. what are these values in theloop
I do not get them or what they represent and how does the timing work.Here is what I get from
ffprob
Input #0, ogg, from 'file.ogg':
Duration: 00:01:21.00, start: 0.000000, bitrate: 118 kb/s
Stream #0:0: Audio: vorbis, 44100 Hz, stereo, fltp, 80 kb/s -
How to run the "ffmpeg -i input.mp4 output.avi" in Node.js ? [duplicate]
3 septembre 2016, par ThalesThis question already has an answer here :
I have a application on Electron that needs receive video and convert him another format, but I don’t know how to do. I’m thinking to do with node, but I need how to run the command "ffmpeg -i input.mp4 output.avi". I don’t know if this way is better. I thank first of all and I apologize for the ignorance.
-
Use Output of FFMPEG as the Input of another FFMPEG command, in one execution
1er juillet 2022, par Xavi FontI asked a question earlier but had too many steps and was too long maybe to receive an answer, so here is a simple one that will help me A LOT.


I have a command, could be anything
ffmpeg -loop 1 -i my_dog_playing.jpg -t 5 output.mp4
and want to take that output and add stuff to it, like a complex_filter (say... an image overlay on the corner), but I want to do so before that output.mp4 is encoded (rendered) so that no time is wasted (I want it to be done within one command).