Recherche avancée

Médias (17)

Mot : - Tags -/wired

Autres articles (50)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • 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

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

Sur d’autres sites (10113)

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

  • I can’t play HEVC encoded Flv format video files with ffplay

    25 décembre 2023, par 1337zzz

    I could not decode a video file

    &#xA;

    I have a video file in FLV format. Someone told me that the encoding format of this video is HEVC, so I tried to play this video with ffplay. But I found that native ffplay cannot play HEVC encoded files in flv format, so I found relevant information to decode HEVC encoded files in FLV format, but this file still cannot be played.

    &#xA;

    The following is the error message, the content is that the NAL part of the analysis failed

    &#xA;

    [hevc @ 0x7fba4800fc00] Invalid NAL unit size in extradata.&#xA;[flv @ 0x7fba4800f000] Could not find codec parameters for stream 0 (Video: hevc, none, 5494 kb/s): unspecified size&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; and &#x27;probesize&#x27; options&#xA;&#xA;

    &#xA;

    I tried to use ffplay to play other HEVC encoded videos in FLV format, and the result was no problem. So I use a hexadecimal editor to view the file that cannot be played normally. Below is the data of the first frame of video.

    &#xA;

    000003a0: xx xx xx xx xx xx xx 09 00 00 4E 00 00 00 00 00    ..........N.....&#xA;000003b0: 00 00 1E 00 00 00 00 01 00 00 00 FF E2 00 17 40    ............b..@&#xA;000003c0: 01 0C 01 FF FF 01 00 01 00 00 B0 00 00 03 00 00    ..........0.....&#xA;000003d0: 03 00 96 1D 94 09 00 1E 42 01 01 01 00 01 00 00    ........B.......&#xA;000003e0: B0 00 00 03 00 00 03 00 96 A0 01 E0 20 02 1C 5A    0..........`...Z&#xA;000003f0: 1D 96 49 0A 40 A2 01 00 07 44 01 C0 13 18 21 20    ..I.@"...D.@..!.&#xA;

    &#xA;

    We can see that 09 represents the video type, 4E represents the length of TAG data, and 1C represents the key frame of HEVC, but I can’t judge whether the following data is HEVC encoded data, so I suspect that the latter data may not be encoded by HEVC.

    &#xA;

    Question

    &#xA;

    Is there any way to detect the encoding format of the video based on the hexadecimal data, or who can tell me which video encoding format the following data is ?

    &#xA;

    Thank you very much !

    &#xA;