
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (84)
-
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
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 -
Automated installation script of MediaSPIP
25 avril 2011, parTo overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
The documentation of the use of this installation script is available here.
The code of this (...)
Sur d’autres sites (5207)
-
video4linux2 : Avoid a floating point exception
27 juillet 2014, par Bernhard Übelacker -
how to decode wmp3 video using libavcodec ? (ffmpeg)
13 mars 2012, par Renan EliasI'm developing an application that reads a live tv stream from the internet and I need to play it on my ipad application.
I've compiled the ffmpeg into my ipad application to use the libavcodec lib, but I've not been able to use it in this lib...
I know how to get the stream packets, read if it is an audio or video packet, but I don't know how to use the lib to convert the original packet codecs to h264 and mp3 codec...
I need to convert an stream packet wmv3 to h264 and save it on a file.
My code is below...
AVFormatContext* pFormatCtx = avformat_alloc_context();
int i, videoStream, audioStream;
AVCodecContext *pCodecCtx;
AVCodecContext *aCodecCtx;
AVCodec *pCodec;
AVCodec *aCodec;
AVFrame *pFrame;
AVFrame *pFrameRGB;
AVPacket packet;
int frameFinished;
int numBytes;
uint8_t *buffer;
static struct SwsContext *img_convert_ctx;
// Register all formats and codecs
av_register_all();
avcodec_register_all();
avformat_network_init();
// Open video file
if(avformat_open_input(&pFormatCtx, [objURL cStringUsingEncoding:NSASCIIStringEncoding] ,NULL,NULL) != 0){
return -1;
}
// Retrieve stream information
if(avformat_find_stream_info(pFormatCtx, NULL)<0)
return -1; // Couldn't find stream information
// Dump information about file onto standard error
av_dump_format(pFormatCtx, 0, [objURL cStringUsingEncoding:NSASCIIStringEncoding], 0);
// Find the first video stream
videoStream=-1;
audioStream=-1;
for(i=0; i < pFormatCtx->nb_streams; i++) {
if(pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO && videoStream < 0) {
videoStream=i;
}
if(pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_AUDIO && audioStream < 0) {
audioStream=i;
}
}
if(videoStream==-1)
return -1; // Didn't find a video stream
if(audioStream==-1)
return -1;
// Get a pointer to the codec context for the video stream
pCodecCtx=pFormatCtx->streams[videoStream]->codec;
// Find the decoder for the video stream
pCodec=avcodec_find_decoder(pCodecCtx->codec_id);
if(pCodec==NULL) {
fprintf(stderr, "Unsupported codec!\n");
return -1; // Codec not found
}
// Open codec
if(avcodec_open2(pCodecCtx, pCodec, NULL)<0)
return -1; // Could not open codec
// Get a pointer to the codec context for the audio stream
aCodecCtx=pFormatCtx->streams[audioStream]->codec;
// Find the decoder for the audio stream
aCodec = avcodec_find_decoder(aCodecCtx->codec_id);
if(!aCodec) {
fprintf(stderr, "Unsupported codec!\n");
return -1; // Codec not found
}
// Open codec
if(avcodec_open2(aCodecCtx, aCodec, NULL)<0)
return -1; // Could not open codec
// Allocate video frame
pFrame=avcodec_alloc_frame();
// Allocate an AVFrame structure
pFrameRGB=avcodec_alloc_frame();
if(pFrameRGB==NULL)
return -1;
// Determine required buffer size and allocate buffer
numBytes=avpicture_get_size(PIX_FMT_RGB24, pCodecCtx->width,
pCodecCtx->height);
buffer=(uint8_t *)av_malloc(numBytes*sizeof(uint8_t));
// Assign appropriate parts of buffer to image planes in pFrameRGB
// Note that pFrameRGB is an AVFrame, but AVFrame is a superset
// of AVPicture
avpicture_fill((AVPicture *)pFrameRGB, buffer, PIX_FMT_RGB24,
pCodecCtx->width, pCodecCtx->height);
// Read frames and save first five frames to disk
i=0;
while(av_read_frame(pFormatCtx, &packet)>=0) {
// Is this a packet from the video stream?
if(packet.stream_index==audioStream) {
NSLog(@"Audio.. i'll solve the video first...");
} else if(packet.stream_index==videoStream) {
/// HOW CONVERT THIS VIDEO PACKET TO H264 and save on a file? :(
}
// Free the packet that was allocated by av_read_frame
av_free_packet(&packet);
}
// Free the RGB image
av_free(buffer);
av_free(pFrameRGB);
// Free the YUV frame
av_free(pFrame);
// Close the codec
avcodec_close(pCodecCtx);
// Close the video file
avformat_close_input(&pFormatCtx);
return 0; -
Accessing webcam mic from command line version of FFMPEG for android
19 mai 2014, par user1545779I am currently testing audio and video streaming from a webcam using a command line version of FFMPEG on an android box. I am having a problem accessing the webcam mic
Using Ubuntu as a reference, the correct command to determine the recording devices available is arecord -L . Unfortunately arecord -L does not work on the Android box
The current command option alsa for accessing the webcam mic is ffmpeg -f alsa -alsa_device_name.. and the previous option of oss does not work either, ie ffmpeg -f -oss.. does not work either.
The listed audio devices shown in /dev/snd shows the mic portion of the webcam as pcmC3D0c and controlC3. The reason I know this is because if I unplug the webcam these values vanish from the directory listing.
Has anyone tried successfully to access the mic portion of a webcam using ffmpeg on an android box ?
How do you formulate the correct format of the command to access the webcam mic.Please note that I am able to access the audio and video on my Ubuntu PC using ffmpeg hence i know that both devices work