
Recherche avancée
Autres articles (93)
-
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
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 -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)
Sur d’autres sites (10008)
-
How to save/encode recorded raw PCM Data as AAC/MP4 format file in Android
28 janvier 2015, par INVISIBLEi want to save recorder pcm data as aac/mp4 format file.
i am using AudioRecord class for recording audio in android. i have success fully saved it as wave file by adding a wave header to raw data. but dont know how to save it as aac/mp4 file, because aac/mp4 format is compressed then wave.
the methods i am using for saving pcm data as wave is pasted below.recorder = new AudioRecord(MediaRecorder.AudioSource.MIC,
SavedSampleRate, RECORDER_CHANNELS, RECORDER_AUDIO_ENCODING,
bufferSize);
recorder.startRecording();
isRecording = true;
isRecording = true;
recordingThread = new Thread(new Runnable() {
@Override
public void run() {
writeAudioDataToFile();
}
}, "AudioRecorder Thread");
recordingThread.start();second
private void writeAudioDataToFile() {
byte data[] = new byte[bufferSize];
// short sData[] = new short[bufferSize];
String filename = getTempFilename();
FileOutputStream os = null;
try {
os = new FileOutputStream(filename);
} catch (Exception e) {
e.printStackTrace();
}
int read = 0;
if (null != os) {
while (isRecording) {
double sum = 0;
read = recorder.read(data, 0, bufferSize);
if (AudioRecord.ERROR_INVALID_OPERATION != read) {
try {
synchronized (this) {
// Necessary in order to convert negative shorts!
final int USHORT_MASK = (1 << 16) - 1;
final ByteBuffer buf = ByteBuffer.wrap(data).order(
ByteOrder.LITTLE_ENDIAN);
final ByteBuffer newBuf = ByteBuffer.allocate(
data.length).order(ByteOrder.LITTLE_ENDIAN);
int sample;
while (buf.hasRemaining()) {
short shortSample = buf.getShort();
sample = (int) shortSample & USHORT_MASK;
sample = sample * db_value_global;
sample = mRmsFilterSetting.filter
.apply((((int) 0) | shortSample)
* db_value_global);
newBuf.putShort((short) sample);
}
data = newBuf.array();
os.write(data);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
try {
os.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}and finally saving it as
private void copyWaveFile(ArrayList<string> inFilename, String outFilename) {
FileInputStream[] in = null;
FileOutputStream out = null;
long totalAudioLen = 0;
long totalDataLen = totalAudioLen + 36;
long longSampleRate = SavedSampleRate;
int channels = 2;
long byteRate = RECORDER_BPP * SavedSampleRate * channels / 8;
byte[] data = new byte[bufferSize];
try {
out = new FileOutputStream(outFilename);
in = new FileInputStream[inFilename.size()];
for (int i = 0; i < in.length; i++) {
in[i] = new FileInputStream(inFilename.get(i));
totalAudioLen += in[i].getChannel().size();
}
totalDataLen = totalAudioLen + 36;
WriteWaveFileHeader(out, totalAudioLen, totalDataLen,
longSampleRate, channels, byteRate);
for (int i = 0; i < in.length; i++) {
while (in[i].read(data) != -1) {
out.write(data);
}
in[i].close();
}
out.close();
} catch (Exception e) {
e.printStackTrace();
}
}
private void WriteWaveFileHeader(FileOutputStream out, long totalAudioLen,
long totalDataLen, long longSampleRate, int channels, long byteRate)
throws IOException {
byte[] header = new byte[44];
header[0] = 'R'; // RIFF/WAVE header
header[1] = 'I';
header[2] = 'F';
header[3] = 'F';
header[4] = (byte) (totalDataLen & 0xff);
header[5] = (byte) ((totalDataLen >> 8) & 0xff);
header[6] = (byte) ((totalDataLen >> 16) & 0xff);
header[7] = (byte) ((totalDataLen >> 24) & 0xff);
header[8] = 'W';
header[9] = 'A';
header[10] = 'V';
header[11] = 'E';
header[12] = 'f'; // 'fmt ' chunk
header[13] = 'm';
header[14] = 't';
header[15] = ' ';
header[16] = 16; // 4 bytes: size of 'fmt ' chunk
header[17] = 0;
header[18] = 0;
header[19] = 0;
header[20] = 1; // format = 1
header[21] = 0;
header[22] = (byte) channels;
header[23] = 0;
header[24] = (byte) (longSampleRate & 0xff);
header[25] = (byte) ((longSampleRate >> 8) & 0xff);
header[26] = (byte) ((longSampleRate >> 16) & 0xff);
header[27] = (byte) ((longSampleRate >> 24) & 0xff);
header[28] = (byte) (byteRate & 0xff);
header[29] = (byte) ((byteRate >> 8) & 0xff);
header[30] = (byte) ((byteRate >> 16) & 0xff);
header[31] = (byte) ((byteRate >> 24) & 0xff);
header[32] = (byte) (2 * 16 / 8); // block align
header[33] = 0;
header[34] = RECORDER_BPP; // bits per sample
header[35] = 0;
header[36] = 'd';
header[37] = 'a';
header[38] = 't';
header[39] = 'a';
header[40] = (byte) (totalAudioLen & 0xff);
header[41] = (byte) ((totalAudioLen >> 8) & 0xff);
header[42] = (byte) ((totalAudioLen >> 16) & 0xff);
header[43] = (byte) ((totalAudioLen >> 24) & 0xff);
out.write(header, 0, 44);
}
</string>in this piece of code i am recording small PCM files with AudioRecord and saving them as wave file by adding wave header.
is there any step by step tutorial for how to save pcm data as mp4/aac file.
thanks in advance.
-
Transcode video and upload on amazon s3
7 juillet 2019, par devI want to transcode video in 360p, 480p, 720p and then upload to amazon s3.
Currently we are using php library FFMPEG
I have successfully transcode video on my server. But I did not get that how to achieve same on amazon s3.
Do I need to first upload original video on s3 and then get that video and transcode in different format and send to amazon s3 ? is it possible ?
Or if any other way than please suggest me.
-
AAC encoder : encode out-of-phase I/S efficiently
10 janvier 2016, par Claudio FreireAAC encoder : encode out-of-phase I/S efficiently
Use the ability to invert phase with ms_mask instead of changing
the codebook when possible, to avoid having to switch codebooks
if some bands are INTENSTY_BT and others are INTENSITY_BT2, since
usually a set ms_mask uses less bits that a codebook change. While
it may not always be a win (ie : if it causes an ms_mask bitmap
to be sent when it wouldn’t have been otherwise), it’s unlikely
since the ms_mask bitmap will almost always be there already for
M/S itself.