
Recherche avancée
Autres articles (27)
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
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 -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...)
Sur d’autres sites (6214)
-
Avisynth processing source having multiaudio tracks
22 mai 2014, par TarunI wrote following avisynth script
A1 = FFAudioSource("speed_2mins.mxf",track=1)
A2 = FFAudioSource("speed_2mins.mxf",track=2)
V = FFVideoSource("speed_2mins.mxf",width=200,height=100)
AV1 = AudioDub(V,A1)
AudioDub(AV1,A2)In hope of getting 2 audio tracks in the output, but i still got only one audio track when I processed the .avs file using ffmpeg
How to get multi audio tracks output using avisynth ?
-
FFMPEG FTP is not working
16 mai 2014, par SENTHIL SARAVANANI want convert video files using FFMPEG and upload into my server using FTP. For this i used the following ffmpeg command
ffmpeg -i C:\Users\sen\Desktop\sss\input.mov ftp://root:xxxxxxxxxxx@xxx.xxx.xxx.24/output.flv
But ffmpeg shows like authentication failed, i hope i give valid server credentials only. Please refer the ffmpeg screen for more detail
How can solve this issue.
-
Decoding audio w/ ffmpeg error on Android
14 août 2012, par strandedWell, I knew I was going out of my comfort zone when I decided to try and decode audio using ffmpeg on Android but now I will have to admit that I'm stranded.
It took me many days to just build ffmpeg for Android. Roman's10 guide did not work for me but finally things started looking up, thanks to this tutorial. So because of Dmitry's help I managed to build the armeabi version (not armeabi-v7) for my phone (LG P500) and everything basic works.But when I try to use avcodec_decode_audio3() things go downhill :( Never before have I felt so close to making things work (after all it seems to be only one line that is troublesome)
but unable to though. I've read many questions here on SO that have brought me closer to the goal. Googling, on the other hand, has had limited results - making questions here the only fruit.Yes, I know ! I ramble. But I can't help it, I'm only trying to explain in detail where I'm stuck and how I got there. So without further ado I bring you the code :
NATIVE CODE :
#include
#include <android></android>log.h>
#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
#define LOG_TAG "mylib"
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)
#define INBUFF_SIZE 4096
#define AUDIO_INBUFF 20480
#define AUDIO_REFILL_SIZE 4096
jint Java_com_nothingworks_for_me_MainActivity_decode(JNIEnv * env, jobject this, jstring jfilename){
const char *filename = (*env)->GetStringUTFChars(env, jfilename, NULL);
AVCodec *codec;
AVCodecContext *c= NULL;
int audioStream;
int out_size, len, i;
FILE *f, *outfile;
uint8_t *outbuf;
uint8_t inbuf[AUDIO_INBUFF + FF_INPUT_BUFFER_PADDING_SIZE];
AVPacket avpkt;
AVFormatContext *pFormatCtx;
av_register_all();
avcodec_init();
av_init_packet(&avpkt);
if(av_open_input_file(&pFormatCtx, filename, NULL, 0, NULL)!=0)
{
LOGE("Can't open file '%s'\n", filename);
return 1;
}
else
{
LOGI("File was opened\n");
LOGI("File '%s', Codec %s",
pFormatCtx->filename,
pFormatCtx->iformat->name
);
}
if (av_find_stream_info(pFormatCtx) < 0){
LOGE("Can't find stream info");
}
audioStream = -1;
for (i = 0; i < pFormatCtx->nb_streams; i++) {
if (pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_AUDIO) {
audioStream = i;
break;
}
}
if (audioStream == -1) {
LOGE("Didn't find stream!");
}
c = pFormatCtx->streams[audioStream]->codec;
codec = avcodec_find_decoder(c->codec_id);
if (!codec) {
LOGE("Unsupported Codec!");
}
c= avcodec_alloc_context();
/* open it */
if (avcodec_open(c, codec) < 0) {
LOGE("Can't open codec");
exit(1);
}
outbuf = av_malloc(AVCODEC_MAX_AUDIO_FRAME_SIZE * 2);
f = fopen(filename, "rb");
if (!f) {
LOGE("Can't open file");
exit(1);
}
/* decode until eof */
avpkt.data = inbuf;
avpkt.size = fread(inbuf, 1, AUDIO_INBUFF, f);
LOGI("avpkt.size %d", avpkt.size);
while (avpkt.size > 0) {
out_size = AVCODEC_MAX_AUDIO_FRAME_SIZE * 2;THINGS GO WRONG HERE ! avcodec_decode_audio3() The code continues from ▲ to ▼ :
len = avcodec_decode_audio3(c, (int16_t *)outbuf, &out_size, &avpkt);
LOGI("data_size %d len %d", out_size, len);
if (len < 0) {
LOGE("Error while decoding");
exit(1);
}
if (out_size > 0) {
}
avpkt.size -= len;
avpkt.data += len;
if (avpkt.size < AUDIO_REFILL_SIZE) {
/* Refill the input buffer, to avoid trying to decode
* incomplete frames. Instead of this, one could also use
* a parser, or use a proper container format through
* libavformat. */
memmove(inbuf, avpkt.data, avpkt.size);
avpkt.data = inbuf;
len = fread(avpkt.data + avpkt.size, 1,
AUDIO_INBUFF - avpkt.size, f);
if (len > 0)
avpkt.size += len;
}
}
fclose(f);
free(outbuf);
avcodec_close(c);
av_free(c);
return 0;
}
What happens is that avcodec_decode_audio3() returns -1 and that's pretty much it :(
I have no idea what to do next. I can't find much info about this and I only started fiddling with C less than two weeks ago so your guidance is my only hope now [play dramatic sound]. Hope someone can shed a little light on this mystery.Ohh ! And the native code is some kind of a hybrid between what I have found here on SO, like this and this, and the ffmpeg example. On the java side I only have a call to this native method and pass it string which is the path to a MP3 song on my droid. I don't use AudioTrack or anything else in my java code yet 'cause I'm only trying to get the decoding to work for now.
-Drama Queen OUT !