Recherche avancée

Médias (29)

Mot : - Tags -/Musique

Autres articles (49)

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

  • lavc : add avcodec_free_context().

    5 avril 2014, par Anton Khirnov
    lavc : add avcodec_free_context().
    

    Right now, the caller has to manually manage some allocated
    AVCodecContext fields, like extradata or subtitle_header. This is
    fragile and prone to leaks, especially if we want to add more such
    fields in the future.

    The only reason for this behaviour is so that the AVStream codec context
    can be reused for decoding. Such reuse is discouraged anyway, so this
    commit is the first step to deprecating it.

    • [DH] doc/APIchanges
    • [DH] libavcodec/avcodec.h
    • [DH] libavcodec/options.c
    • [DH] libavcodec/version.h
  • stream_decoder : fix memory leak after seek table read error

    14 juillet 2016, par Max Kellermann
    stream_decoder : fix memory leak after seek table read error
    

    When read_metadata_seektable_() fails, the has_seek_table flag is
    never set to true, and thus free() is never called.

    Example valgrind output :

    11,185,464 bytes in 1 blocks are definitely lost in loss record 62 of 62
    at 0x4C2BC0F : malloc (vg_replace_malloc.c:299)
    by 0x4C2DE6F : realloc (vg_replace_malloc.c:785)
    by 0x40A7880 : safe_realloc_ (alloc.h:159)
    by 0x40A7911 : safe_realloc_mul_2op_ (alloc.h:205)
    by 0x40AB6B5 : read_metadata_seektable_ (stream_decoder.c:1654)
    by 0x40AAB2D : read_metadata_ (stream_decoder.c:1422)
    by 0x40A9C79 : FLAC__stream_decoder_process_until_end_of_metadata (stream_decoder.c:1055)

    It is easy to craft a FLAC file which leaks megabytes of memory on
    every attempt to open the file.

    This patch fixes the problem by removing checks which are unnecessary
    (and harmful). Checking the has_seek_table flag is not enough, as
    described above. The NULL check is not harmful, but is not helpful
    either, because free(NULL) is documented to be legal.

    After running this code block, we’re in a well-known safe state, no
    matter how inconsistent pointer and flag may have been before, for
    whatever reasons.

    Signed-off-by : Erik de Castro Lopo <erikd@mega-nerd.com>

    • [DH] src/libFLAC/stream_decoder.c
  • How to convert a Stream on the fly with FFMpegCore ?

    18 octobre 2023, par Adrian

    For a school project, I need to stream videos that I get from torrents while they are downloading on the server.&#xA;When the video is a .mp4 file, there's no problem, but I must also be able to stream .mkv files, and for that I need to convert them into .mp4 before sending them to the client, and I can't find a way to convert my Stream that I get from MonoTorrents with FFMpegCore into a Stream that I can send to my client.

    &#xA;

    Here is the code I wrote to simply download and stream my torrent :

    &#xA;

    var cEngine = new ClientEngine();&#xA;&#xA;var manager = await cEngine.AddStreamingAsync(GenerateMagnet(torrent), ) ?? throw new Exception("An error occurred while creating the torrent manager");&#xA;&#xA;await manager.StartAsync();&#xA;await manager.WaitForMetadataAsync();&#xA;&#xA;var videoFile = manager.Files.OrderByDescending(f => f.Length).FirstOrDefault();&#xA;if (videoFile == null)&#xA;    return Results.NotFound();&#xA;&#xA;var stream = await manager.StreamProvider!.CreateStreamAsync(videoFile, true);&#xA;return Results.File(stream, contentType: "video/mp4", fileDownloadName: manager.Name, enableRangeProcessing: true);&#xA;

    &#xA;

    I saw that the most common way to convert videos is by using ffmpeg. .NET has a package called FFMpefCore that is a wrapper for ffmpeg.

    &#xA;

    To my previous code, I would add right before the return :

    &#xA;

    if (!videoFile.Path.EndsWith(".mp4"))&#xA;{&#xA;    var outputStream = new MemoryStream();&#xA;    FFMpegArguments&#xA;        .FromPipeInput(new StreamPipeSource(stream), options =>&#xA;        {&#xA;            options.ForceFormat("mp4");&#xA;        })&#xA;        .OutputToPipe(new StreamPipeSink(outputStream))&#xA;        .ProcessAsynchronously();&#xA;    return Results.File(outputStream, contentType: "video/mp4", fileDownloadName: manager.Name, enableRangeProcessing: true);&#xA;}&#xA;

    &#xA;

    I unfortunately can't get a "live" Stream to send to my client.

    &#xA;