
Recherche avancée
Médias (1)
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
Autres articles (11)
-
Menus personnalisés
14 novembre 2010, parMediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
Menus créés à l’initialisation du site
Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...) -
Soumettre améliorations et plugins supplémentaires
10 avril 2011Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...) -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users.
Sur d’autres sites (4175)
-
Decode .wav file and write it into another file using ffmpeg
16 février 2017, par deshuHow to decode a .wav file and write it into another file using ffmpeg ?
I got decoded data by this piece of code :
-(void)audioDecode:(const char *)outfilename inFileName:(const char *)filename
{
const char* input_filename=filename;
//avcodec_register_all();
av_register_all();
avcodec_register_all();
// av_register_all();
//av_ini
// AVFormatContext* container=avformat_alloc_context();
// if(avformat_open_input(&container,filename,NULL,NULL)<0){
// NSLog(@"Could not open file");
// }
AVCodec *codec;
AVCodecContext *c= NULL;
int len;
FILE *f, *outfile;
uint8_t inbuf[AUDIO_INBUF_SIZE + FF_INPUT_BUFFER_PADDING_SIZE];
AVPacket avpkt;
AVFrame *decoded_frame = NULL;
av_init_packet(&avpkt);
printf("Decode audio file %s to %s\n", filename, outfilename);
avcodec_register_all();
AVFrame* frame = av_frame_alloc();
if (!frame)
{
fprintf(stderr, "Could not allocate audio frame\n");
exit(1);
}
AVFormatContext* formatContext = NULL;
/* Opening the file, and check if it has opened */
if (avformat_open_input(&formatContext, filename, NULL, NULL) != 0)
{
av_frame_free(&frame);
NSLog(@"Could not open file");
}
if (avformat_find_stream_info(formatContext, NULL) < 0)
{
av_frame_free(&frame);
avformat_close_input(&formatContext);
NSLog(@"Error finding the stream info");
}
outfile = fopen(outfilename, "wb");
if (!outfile) {
av_free(c);
exit(1);
}
/* Find the audio Stream, if no audio stream are found, clean and exit */
AVCodec* cdc = NULL;
int streamIndex = av_find_best_stream(formatContext, AVMEDIA_TYPE_AUDIO, -1, -1, &cdc, 0);
if (streamIndex < 0)
{
av_frame_free(&frame);
avformat_close_input(&formatContext);
NSLog(@"Could not find any audio stream in the file");
exit(1);
}
/* Open the audio stream to read data in audioStream */
AVStream* audioStream = formatContext->streams[streamIndex];
/* Initialize the codec context */
AVCodecContext* codecContext = audioStream->codec;
codecContext->codec = cdc;
/* Open the codec, and verify if it has opened */
if (avcodec_open2(codecContext, codecContext->codec, NULL) != 0)
{
av_frame_free(&frame);
avformat_close_input(&formatContext);
NSLog(@"Couldn't open the context with the decoder");
exit(1);
}
/* Initialize buffer to store compressed packets */
AVPacket readingPacket;
av_init_packet(&readingPacket);
int lenght = 1;
long long int chunk = ((formatContext->bit_rate)*lenght/8);
int j=0;
int count = 0;
//audioChunk output;
while(av_read_frame(formatContext, &readingPacket)==0){
//if((count+readingPacket.size)>start){
if(readingPacket.stream_index == audioStream->index){
AVPacket decodingPacket = readingPacket;
// Audio packets can have multiple audio frames in a single packet
while (decodingPacket.size > 0){
// Try to decode the packet into a frame
// Some frames rely on multiple packets, so we have to make sure the frame is finished before
// we can use it
int gotFrame = 0;
int result = avcodec_decode_audio4(codecContext, frame, &gotFrame, &decodingPacket);
count += result;
if (result >= 0 && gotFrame)
{
decodingPacket.size -= result;
decodingPacket.data += result;
int a;
for(int i=0;idata[0], 1, decodingPacket.size, outfile);
// *(output.data+j)=frame->data[0][i];
//
j++;
if(j>=chunk) break;
}
// We now have a fully decoded audio frame
}
else
{
decodingPacket.size = 0;
decodingPacket.data = NULL;
}
// if(j>=chunk) break;
}
}
// }else count+=readingPacket.size;
//
// // To prevent memory leak, must free packet.
// av_free_packet(&readingPacket);
// if(j>=chunk) break;
}
fclose(outfile);But the file is created with zero bytes. I don’t know what’s wrong with this code. And I got one more error : "Format adp detected only with low score of 25, misdetection possible !"
-
How to create videos with small file size but large resolution ?
13 février 2017, par Gregory MagarshakIs there a programmatic way to create videos that capture, essentially, a powerpoint presentation, that would be not much larger than the audio + screenshots of the powerpoint itself ?
I want to make software that produces videos with the full resolution of a powerpoint on a large screen, and with a person speaking over it and wvwn doodling. Kind of like "bcontext" software. And then I want to export videos for youtube and other places to be hosted. But I want them to be SMALL. So they can be downloaded by people with slow connections eg in India.
What factors can affect video size and how can i take advantage of the relative "stillness" of most pixels at most times to make the compression preserve the full sharpness and yet take advantage of the lack of visual changes ? What software do you recommend ?
-
Error : The path is not of a legal form while using NReco.VideoConverter
26 janvier 2017, par DyonI am trying to convert a .flac-file to a .wav-file using NReco.VideoConverter, but I keep getting an error and I do not know why.
This is the piece of code I am using for the conversion ://Create the NReco.VideoConverter.FFMpegConverter object
var ffmpeg = new FFMpegConverter();
//inputFile will be something like this:
//type: string, "C:\\some\\folder\\fullTrackName" + ".flac"
var inputFile = Path.Combine(downloadFolder + fullTrackNameNoExtension + ".flac");
//outputFile will be something like this:
//type: string, "C:\\some\\folder\\musicfile" + ".wav"
var outputFile = Path.Combine(downloadFolder + fullTrackNameNoExtension + ".wav");
//Convert the file using NReco.VideoConverter.FFMpegConverter
ffmpeg.ConvertMedia(inputFile, outputFile, null);inputFile/outputFile would be like this, this is what I see when I insert a breakpoint and check the values of in/outputFile :
string, inputFile/outputFile : "Z :\Downloads\Audio - File (Original Mix).flac" (or .wav)
And this is the error I receive when I run ffmpeg.ConvertMedia :
System.ArgumentException: The path is not of a legal form.
at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.GetFullPathInternal(String path)
at System.IO.File.InternalGetLastWriteTimeUtc(String path, Boolean checkHost)
at NReco.VideoConverter.FFMpegConverter.EnsureFFMpegLibs()
at NReco.VideoConverter.FFMpegConverter.ConvertMedia(Media input, Media output, ConvertSettings settings)
at NReco.VideoConverter.FFMpegConverter.ConvertMedia(String inputFile, String inputFormat, String outputFile, String outputFormat, ConvertSettings settings)
at NReco.VideoConverter.FFMpegConverter.ConvertMedia(String inputFile, String outputFile, String outputFormat)
at APPLICATION_Name.APPLICATION_Class.ConvertFile(String downloadFolder, String fullTrackName, String fullTrackNameNoExtension, String downloadQuality, String downloadType) in X:\APPLICATION_Name\DownloadTrack.cs:line 244