Recherche avancée

Médias (0)

Mot : - Tags -/navigation

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (57)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

  • 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 (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

Sur d’autres sites (4131)

  • Trying loop an mp3 and output the mp3 with ffmpeg

    12 février 2023, par Chewie The Chorkie

    I have a 7 second mp3. I want to loop it 3 times and give me back the output. It only plays once in the output, though.

    


    I've tried setting the duration to 21 seconds instead (the atrim parameter), but in that case the output will only play once, and the remaining 14 seconds is silent.

    


    ffmpeg -i explosion.mp3 -filter_complex "[0:a]aresample=async=1:min_hard_comp=0.100000:first_pts=0,apad,atrim=end=7,aloop=loop=3:size=0[outa]" -map "[outa]" -c:a libmp3lame -q:a 2 output.mp3


    


  • wrong play audio samples

    8 août 2014, par Ivan Lisovich

    I have a problem with a ffmpeg and NAudio libs.
    I worked with the old ffmpeg library and there the audio plays correctly.
    read video in manage c++

    // Read frames and save to list audio frames
    while(av_read_frame(pFormatCtx, &packet) >= 0)
    {
       if(packet.stream_index == videoStream)
       {
           // reade image
       }
       else if(packet.stream_index == audioStream)
       {
           int b = av_dup_packet(&packet);
           if(b >= 0) {
               int audio_pkt_size = packet.size;
               libffmpeg::uint8_t* audio_pkt_data = packet.data;
               while(audio_pkt_size > 0)
               {
                   int got_frame = 0;
                   int len1 = libffmpeg::avcodec_decode_audio4(aCodecCtx, &frame, &got_frame, &packet);
                   if(len1 < 0)
                   {
                       /* if error, skip frame */
                       audio_pkt_size = 0;
                       break;
                   }
                   audio_pkt_data += len1;
                   audio_pkt_size -= len1;
                   if (got_frame)
                   {
                       int data_size = libffmpeg::av_samples_get_buffer_size ( NULL, aCodecCtx->channels, frame.nb_samples, aCodecCtx->sample_fmt, 1 );
                       array<byte>^ managedBuf = gcnew array<byte>(data_size);
                       System::IntPtr iptr = System::IntPtr( frame.data[0] );
                       System::Runtime::InteropServices::Marshal::Copy( iptr, managedBuf, 0, data_size );
                       audioData->Add(managedBuf);
                   }
               }
           }
       }
       // Free the packet that was allocated by av_read_frame
       libffmpeg::av_free_packet(&amp;packet);
    }
    </byte></byte>

    I return audioData to c# code and play in NAudio library
    play in c#

    var recordingFormat = new WaveFormat(reader.SampleRate, 16, reader.Channels);
    var waveProvider = new BufferedWaveProvider(recordingFormat) { DiscardOnBufferOverflow = true, BufferDuration = TimeSpan.FromMilliseconds(10000) };
    var waveOut = new DirectSoundOut();
    waveOut.Init(waveProvider);
    waveOut.Play();
    foreach (byte[] data in audioData)
    {
       waveProvider.AddSamples(data, 0, data.Length);
    }

    but audio not playing.
    what am I doing wrong ?

  • CoreAudio : how to retrieve actual sampling rate of raw data ?

    13 août 2014, par jyavenard

    When attempting to play AAC-HE content in an mp4 container, the reported sampling rate found in the mp4 container appears to be half of the actual sampling rate.

    E.g it appears as 24kHz instead of 48kHz.

    Using the FFmpeg AAC decoder, retrieving the actual sampling rate can be done by simply decoding an audio packet using

    avcodec_decode_audio4

    And looking at AVCodecContext::sample_rate which will be updated appropriately. From that it’s easy to adapt the output.

    With CoreAudio decoder, I would use a AudioConverterRef set the input and output AudioStreamBasicDescription
    and call AudioConverterFillComplexBuffer

    As the converter performs all the required internal conversion including resampling it’s fine. But it plays the content after resampling it to 24kHz (as that’s what the input AudioStreamBasicDescription contains.

    Would there be a way to retrieve the actual sampling rate as found be the decoder (rather than the demuxer) in a similar fashion as one can with FFmpeg ?

    Would prefer to avoid losing audio quality if at all possible, and not downmix data

    Thanks