Recherche avancée

Médias (91)

Autres articles (57)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (3539)

  • Invalid data found when processing input on ffmpeg m4s to mp4 transfer

    1er mars 2020, par keith scott

    The result of the power shell window

    I saw a post on here about converting m4s to mp4 and I have followed the steps of concatenating all the files into another m4s file that I called all.m4s and when I use the command ffmpeg -i allm4s.m4s -c copy video.mp4. I made the combined m4s file by coding an exe to add all the m4s files that have the word video in them to the m4s file. Here is the source code written in c# if you compile the code then that is the code I have used to make the m4s

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.IO;

    namespace files
    {
       class Program
       {
           static void Main(string[] args)
           {
               string dir = Directory.GetCurrentDirectory();
               string[] info = Directory.GetFiles(dir);
               Console.WriteLine(dir + "\\allm4s.m4s");
               Console.ReadKey();
               foreach (string name in info)
               {
                   if (Path.GetFileName(name).Contains(".m4s") && Path.GetFileName(name).Contains("video"))
                   {
                       using (Stream srcStream = File.OpenRead(name))
                       {
                           using (Stream destStream = File.OpenWrite(dir+"\\allm4s.m4s"))
                           {
                               srcStream.CopyTo(destStream);
                               Console.WriteLine(destStream+name);
                           }
                       }
                   }
               }
               Console.ReadKey();
           }
       }
    }

    I think if there is to be an issue it is to do with this allm4s.m4s file as the file size is about 1.5mb even though each segment m4s is about 750kb each and there are quite a lot.If anyone has a way of adding concatenating lots of files together through a program/application that would be useful.

  • lavc/videotoolboxenc : add hdr10, linear, hlg color transfer function for videotoolboxenc

    26 juin 2019, par Limin Wang
    lavc/videotoolboxenc : add hdr10, linear, hlg color transfer function for videotoolboxenc
    

    Below is the testing ffmpeg command for the setting :
    ./ffmpeg -i input.ts -c:v hevc_videotoolbox -color_primaries bt2020 -colorspace bt2020_ncl -color_trc smpte2084 smpte2048.ts
    ./ffmpeg -i input.ts -c:v hevc_videotoolbox -color_primaries bt2020 -colorspace bt2020_ncl -color_trc linear linear.ts
    ./ffmpeg -i input.ts -c:v hevc_videotoolbox -color_primaries bt2020 -colorspace bt2020_ncl -color_trc arib-std-b67 hlg.ts

    Signed-off-by : Limin Wang <lance.lmwang@gmail.com>
    Signed-off-by : Rick Kern <kernrj@gmail.com>

    • [DH] configure
    • [DH] libavcodec/videotoolboxenc.c
  • Video from Android Camera muxed with libavformat not playable in all players and audio not synced

    19 janvier 2021, par Debrugger

    I'm using avformat to mux encoded video and audio received from Android into an mp4 file. The resulting file is playable through ffplay though it sometimes outputs "No Frame !" during playback. VLC kind of plays it back but with glitches that look like the effect when movement data for one video is combined with color data from another. The video player on my phone does not play it at all.

    &#xA;

    On top of that audio is not properly synced, even though MediaCodec manages to produce a proper file with nothing more than the code below has available (ie. presentationTimeStamp in microseconds.

    &#xA;

    This is my code (error checking omitted for clarity) :

    &#xA;

    // Initializing muxer&#xA;AVStream *videoStream = avformat_new_stream(outputContext, nullptr);&#xA;videoStreamIndex = videoStream->index;&#xA;&#xA;videoStream->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;&#xA;videoStream->codecpar->codec_id = AV_CODEC_ID_H264;&#xA;videoStream->codecpar->bit_rate = bitrate;&#xA;videoStream->codecpar->width = width;&#xA;videoStream->codecpar->height = height;&#xA;videoStream->time_base.num = 1;&#xA;videoStream->time_base.den = 90000;&#xA;&#xA;AVStream* audioStream = avformat_new_stream(outputContext, nullptr);&#xA;audioStreamIndex = audioStream->index;&#xA;audioStream->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;&#xA;audioStream->codecpar->codec_id = AV_CODEC_ID_MP4ALS;&#xA;audioStream->codecpar->bit_rate = audiobitrate;&#xA;audioStream->codecpar->sample_rate = audiosampleRate;&#xA;audioStream->codecpar->channels = audioChannelCount;&#xA;audioStream->time_base.num = 1;&#xA;audioStream->time_base.den = 90000;&#xA;&#xA;avformat_write_header(outputContext, &amp;opts);&#xA;&#xA;writtenAudio = writtenVideo = false;&#xA;&#xA;&#xA;// presentationTimeUs is the absolute timestamp when the encoded frame was received in Android code. &#xA;// This is what is usually fed into MediaCodec&#xA;int writeVideoFrame(uint8_t *data, int size, int64_t presentationTimeUs) {&#xA;    AVPacket pkt;&#xA;    av_init_packet(&amp;pkt);&#xA;    pkt.flags |= AV_PKT_FLAG_KEY; // I know setting this on every frame is wrong. When do I set it?&#xA;    pkt.data = data;&#xA;    pkt.size = size;&#xA;    pkt.dts = AV_NOPTS_VALUE;&#xA;    pkt.pts = presentationTimeUs;&#xA;    if (writtenVideo) { // since the timestamp is absolute we have to subtract the initial offset&#xA;        pkt.pts -= firstVideoPts;&#xA;    }&#xA;    // rescale from microseconds to the stream timebase&#xA;    av_packet_rescale_ts(&amp;pkt, AVRational { 1, 1000000 }, outputContext->streams[videoStreamIndex]->time_base);&#xA;    pkt.dts = AV_NOPTS_VALUE;&#xA;    pkt.stream_index = videoStreamIndex;&#xA;    if (!writtenVideo) {&#xA;        AVStream* videoStream = outputContext->streams[videoStreamIndex];&#xA;        videoStream->start_time = pkt.pts;&#xA;        firstVideoPts = presentationTimeUs;&#xA;    }&#xA;    if (av_interleaved_write_frame(outputContext, &amp;pkt) &lt; 0) {&#xA;        return 1;&#xA;    }&#xA;    writtenVideo = true;&#xA;    return 0;&#xA;}&#xA;&#xA;int writeAudioFrame(uint8_t *data, int size, int64_t presentationTimeUs) {&#xA;    AVPacket pkt;&#xA;    av_init_packet(&amp;pkt);&#xA;    pkt.data = data;&#xA;    pkt.size = size;&#xA;    pkt.stream_index = audioStreamIndex;&#xA;    pkt.pts = presentationTimeUs;&#xA;    av_packet_rescale_ts(&amp;pkt, AVRational { 1, 1000000}, outputContext->streams[audioStreamIndex]->time_base);&#xA;    pkt.flags |= AV_PKT_FLAG_KEY;&#xA;    pkt.dts = AV_NOPTS_VALUE;&#xA;    if (!writtenAudio) {&#xA;        outputContext->streams[audioStreamIndex]->start_time = pkt.pts;&#xA;    }&#xA;    if (av_interleaved_write_frame(outputContext, &amp;pkt) &lt; 0) {&#xA;        return 1;&#xA;    }&#xA;    writtenAudio = true;&#xA;    return 0;&#xA;}&#xA;&#xA;void close() {&#xA;    av_write_trailer(outputContext);&#xA;    running = false;&#xA;&#xA;    // cleanup AVFormatContexts etc&#xA;}&#xA;

    &#xA;

    I think I'm doing the same as shown in avformat docs and examples, and the produced video is somewhat usable (reencoding it with ffmpeg yields a working video). But some things must still be wrong.

    &#xA;