Recherche avancée

Médias (2)

Mot : - Tags -/media

Autres articles (39)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (6458)

  • Compressed mp4 video is taking too long time to play (exoplayer)

    10 août 2018, par User

    Video(mp4) is recorded from android camera and sent to backend, here I am using ffmpeg wrapper to compress the video[44mb video to 5.76mb]. compression is working well, But when I send the video for play in android(exo player), is taking too long time to start.

    below is my code to compress :

    FFmpegBuilder builder = new FFmpegBuilder()
                      .setInput("D:/dummyVideos/myvideo.mp4")     // Filename, or a FFmpegProbeResult
                      .overrideOutputFiles(true) // Override the output if it exists
                      .addOutput("D:/dummyVideos/myvideo_ffmpeg.mp4")   // Filename for the destination
                      .setFormat("mp4")       // Format is inferred from filename, or can be set
                      .disableSubtitle()       // No subtiles
                      .setAudioChannels(1)         // Mono audio
                      .setAudioCodec("aac")       // using the aac codec
                      .setAudioSampleRate(48_000) // at 48KHz
                      .setAudioBitRate(32768)     // at 32 kbit/s
                      .setVideoCodec("libx264")     // Video using x264
                      .setVideoFrameRate(24, 1)     // at 24 frames per second
                      .setVideoResolution(1280, 720) // at 640x480 resolution
                      .setVideoBitRate(762800)
                      .setStrict(FFmpegBuilder.Strict.EXPERIMENTAL) // Allow FFmpeg to use experimental specs
                      .done();

    Can anyone tell me why video is taking too long time to play in exo player ? Is anything wrong in the compression ?

  • 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 ?

  • wrong play audio sasamples

    7 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, &amp;packet) >= 0)
    {
       if(packet.stream_index == videoStream)
       {
           // reade image
       }
       else if(packet.stream_index == audioStream)
       {
           int b = av_dup_packet(&amp;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, &amp;frame, &amp;got_frame, &amp;packet);
                   if(len1 &lt; 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 ?