Recherche avancée

Médias (3)

Mot : - Tags -/image

Autres articles (38)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • 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

Sur d’autres sites (5646)

  • Get PTS from raw H264 mdat generated by iOS AVAssetWriter

    26 décembre 2012, par kolyuchiy

    I'm trying to simultaneously read and write H.264 mov file written by AVAssetWriter. I managed to extract individual NAL units, pack them into ffmpeg's AVPackets and write them into another video format using ffmpeg. It works and the resulting file plays well except the playback speed is not right. How do I calculate the correct PTS/DTS values from raw H.264 data ? Or maybe there exists some other way to get them ?

    Here's what I've tried :

    1. Limit capture min/max frame rate to 30 and assume that the output file will be 30 fps. In fact its fps is always less than values that I set. And also, I think the fps is not constant from packet to packet.

    2. Remember each written sample's presentation timestamp and assume that samples map one-to-one to NALUs and apply saved timestamp to output packet. This doesn't work.

    3. Setting PTS to 0 or AV_NOPTS_VALUE. Doesn't work.

    From googling about it I understand that raw H.264 data usually doesn't contain any timing info. It can sometimes have some timing info inside SEI, but the files that I use don't have it. On the other hand, there are some applications that do exactly what I'm trying to do, so I suppose it is possible somehow.

  • Trying to redirect binary stdout of ffmpeg to NeroAacEnc stdin

    2 mai 2017, par Ben

    I am trying to write a program in C# 2010 that converts mp3 files to an audio book in m4a format via ffmpeg.exe and NeroAACenc.exe.
    For doing so I redirect stdout of ffmpeg to stdin of the Nero encoder within my application using the build in Diagnostics.Process class.

    Everything seems to work as expected but for some reason StandardOutput.BaseStream
    of ffmpeg stops receiving data at some time. The process does not exit and the ErrorDataReceived event is also not getting raised.
    The produced output m4a file has always a length of 2 minutes. The same applies if I just encode the mp3 file to a temp wav file without feeding Nero.

    I tried the same via the command line and this works without any problem.

    ffmpeg -i test.mp3 -f wav - | neroAacEnc -ignorelength -if - -of test.m4a

    Can anyone please tell me what I am doing wrong here ?
    Thanks in advance.

    class Encoder
    {
       private byte[] ReadBuffer = new byte[4096];
       private Process ffMpegDecoder = new Process();
       private Process NeroEncoder = new Process();
       private BinaryWriter NeroInput;

       //Create WAV temp file for testing
       private Stream s = new FileStream("D:\\test\\test.wav", FileMode.Create);
       private BinaryWriter outfile;

       public void Encode()
       {
           ProcessStartInfo ffMpegPSI = new ProcessStartInfo("ffmpeg.exe", "-i D:\\test\\test.mp3 -f wav -");
           ffMpegPSI.UseShellExecute = false;
           ffMpegPSI.CreateNoWindow = true;
           ffMpegPSI.RedirectStandardOutput = true;
           ffMpegPSI.RedirectStandardError = true;
           ffMpegDecoder.StartInfo = ffMpegPSI;

           ProcessStartInfo NeroPSI = new ProcessStartInfo("neroAacEnc.exe", "-if - -ignorelength -of D:\\test\\test.m4a");
           NeroPSI.UseShellExecute = false;
           NeroPSI.CreateNoWindow = true;
           NeroPSI.RedirectStandardInput = true;
           NeroPSI.RedirectStandardError = true;
           NeroEncoder.StartInfo = NeroPSI;

           ffMpegDecoder.Exited += new EventHandler(ffMpegDecoder_Exited);
           ffMpegDecoder.ErrorDataReceived += new DataReceivedEventHandler(ffMpegDecoder_ErrorDataReceived);
           ffMpegDecoder.Start();

           NeroEncoder.Start();
           NeroInput = new BinaryWriter(NeroEncoder.StandardInput.BaseStream);

           outfile = new BinaryWriter(s);

           ffMpegDecoder.StandardOutput.BaseStream.BeginRead(ReadBuffer, 0, ReadBuffer.Length, new AsyncCallback(ReadCallBack), null);

       }

       private void ReadCallBack(IAsyncResult asyncResult)
       {
           int read = ffMpegDecoder.StandardOutput.BaseStream.EndRead(asyncResult);
           if (read > 0)
           {

               NeroInput.Write(ReadBuffer);
               NeroInput.Flush();

               outfile.Write(ReadBuffer);
               outfile.Flush();

               ffMpegDecoder.StandardOutput.BaseStream.Flush();

               ffMpegDecoder.StandardOutput.BaseStream.BeginRead(ReadBuffer, 0, ReadBuffer.Length, new AsyncCallback(ReadCallBack), null);
           }
           else
           {
               ffMpegDecoder.StandardOutput.BaseStream.Close();
               outfile.Close();
           }

       }

       private void ffMpegDecoder_Exited(object sender, System.EventArgs e)
       {
           Console.WriteLine("Exit");
       }

       private void ffMpegDecoder_ErrorDataReceived(object sender, DataReceivedEventArgs errLine)
       {
           Console.WriteLine("Error");
       }

    }
  • FFmpeg make mpeg2 ts without discontinuity

    31 mai 2012, par user1427162

    I have many MOV files recorded with iPhone and I want to convert them to mpeg2 TS. I want to use them for live video streaming with HTTP Live Streaming protocol.

    I set my iPhone to continiously send MOV files to server. Every video clip is 5 seconds long. I want to make mpeg2 TS out of them and add their urls to m3u8 playlist.
    I managed to do all of that, but when I try to play the stream VLC player plays only first two files in playlist, and last file in playlist at that moment.
    I searched the internet and I think this has something to do with discontinuity.

    Is there any way to convert multiple MOV files into multiple mpeg2 TS segments without discontinuity ?

    Or maybe I'm doing something else wrong ?
    Here is my ffmpeg command :

    ffmpeg.exe -i input,MOV -f mpegts output.ts

    and here is my m3u8 list :

    #EXTM3U
    #EXT-X-PLAYLIST-TYPE:EVENT
    #EXT-X-TARGETDURATION:10
    #EXT-X-MEDIA-SEQUENCE:0
    #EXT-X-MEDIA-SEQUENCE:0
    #EXTINF:10,
    fileSequence0.ts
    #EXTINF:10,
    fileSequence1.ts
    #EXTINF:10,
    fileSequence2.ts

    Thanks in advance