Recherche avancée

Médias (91)

Autres articles (71)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-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

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

Sur d’autres sites (7397)

  • ffmpeg : How to get ffmpeg to ignore or fill in missing frames in the input image sequence [closed]

    6 février 2024, par Greg E

    I have input frames image.0001.png, image.0002.png etc. Converting them to mp4 with

    


    ffmpeg -f image2 -i image.%04d.png -vcodec libx264 -crf 1 -pix_fmt yuv420p out.mp4

    


    However if there are missing frames in the sequence, eg. image.0020.png is missing, ffmpeg stops at frame 19 and makes a truncated movie with 19 frames.

    


    I'd like ffmpeg to just ignore the missing frame 0020, or repeat 0019 as 0020, or anything else sensible (look ahead and pull 0021 back to be 0020 ?).

    


    For context, this is a moving geometric art thing and a skipped frame will be a noticeable jerk in the movie, probably a repeated frame will be smoother.

    


    Thanks for any assistance.

    


    (Environment : Mac M1, Sonoma 14.3, ffmpeg 6.1.1)

    


  • ffmpeg 3.3.2 and newer native aac encoder maximum number of channels [on hold]

    21 mars 2018, par AndySP

    I’m attempting to convert a MOGG (Multi-channel OGG) audio file with 16 channels into an AAC file using FFMPEG native AAC encoder (tried version 3.3.2 and also version 86344-gb5a0971). I’m using Audacity as the source and Export -> External Application to pipe the output to FFMPEG using the command :

    ffmpeg -i - -c:a aac -b:a 240k "%f"

    Its returning "Unsupported number of channels : 16" and then failing. If I reduce the number of channels to 6 it works fine but obviously I’m not willing to remove 10 channels before exporting.

    Does anyone have an idea if its possible to get ffmpeg to accept more than 6 channels in AAC ?

  • How to fill audio AVFrame (ffmpeg) with the data obtained from CMSampleBufferRef (AVFoundation) ?

    24 mai 2013, par Aleksei2414904

    I am writing program for streaming live audio and video from webcamera to rtmp-server. I work in MacOS X 10.8, so I use AVFoundation framework for obtaining audio and video frames from input devices. This frames come into delegate :

    -(void) captureOutput:(AVCaptureOutput*)captureOutput didOutputSampleBuffer:    (CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection*)connection ,

    where sampleBuffer contains audio or video data.

    When I recieve audio data in the sampleBuffer, I'm trying to convert this data into AVFrame and encode AVFramewith libavcodec :

       aframe = avcodec_alloc_frame();  //AVFrame *aframe;
       int got_packet, ret;
       CMItemCount numSamples = CMSampleBufferGetNumSamples(sampleBuffer); //CMSampleBufferRef

       NSUInteger channelIndex = 0;

       CMBlockBufferRef audioBlockBuffer = CMSampleBufferGetDataBuffer(sampleBuffer);

       size_t audioBlockBufferOffset = (channelIndex * numSamples * sizeof(SInt16));

       size_t lengthAtOffset = 0;

       size_t totalLength = 0;

       SInt16 *samples = NULL;

       CMBlockBufferGetDataPointer(audioBlockBuffer, audioBlockBufferOffset, &lengthAtOffset, &totalLength, (char **)(&samples));

               const AudioStreamBasicDescription *audioDescription = CMAudioFormatDescriptionGetStreamBasicDescription(CMSampleBufferGetFormatDescription(sampleBuffer));

       aframe->nb_samples =(int) numSamples;

       aframe->channels=audioDescription->mChannelsPerFrame;

       aframe->sample_rate=(int)audioDescription->mSampleRate;

        //my webCamera configured to produce 16bit 16kHz LPCM mono, so sample format hardcoded here, and seems to be correct
       avcodec_fill_audio_frame(aframe, aframe->channels, AV_SAMPLE_FMT_S16,

                                (uint8_t *)samples,

                                 aframe->nb_samples *

                                av_get_bytes_per_sample(AV_SAMPLE_FMT_S16) *

                                aframe->channels, 0);  
       //encoding audio
       ret = avcodec_encode_audio2(c, &pkt, aframe, &got_packet);
       if (ret < 0) {
           fprintf(stderr, "Error encoding audio frame: %s\n", av_err2str(ret));
           exit(1);
       }

    The problem is that when I get so formed frames, I can hear the wanted sound, but it is slowing down and discontinuous (as if after each data frame comes the same frame of silence). It seems that something is wrong in the transformation from CMSampleBuffer to AVFrame , because the preview from the microphone created with AVFoundation from the same sample buffers played normally.

    I would be grateful for your help.

    UPD : Creating and initializing the AVCodceContext structure
     

       audio_codec= avcodec_find_encoder(AV_CODEC_ID_AAC);
       if (!(audio_codec)) {
           fprintf(stderr, "Could not find encoder for '%s'\n",
                   avcodec_get_name(AV_CODEC_ID_AAC));
           exit(1);
       }
       audio_st = avformat_new_stream(oc, audio_codec);  //AVFormatContext *oc;
       if (!audio_st) {
           fprintf(stderr, "Could not allocate stream\n");
           exit(1);
       }

         audio_st->id=1;
         audio_st->codec->sample_fmt= AV_SAMPLE_FMT_S16;
         audio_st->codec->bit_rate = 64000;
         audio_st->codec->sample_rate= 16000;
         audio_st->codec->channels=1;
         audio_st->codec->codec_type= AVMEDIA_TYPE_AUDIO;