Recherche avancée

Médias (91)

Autres articles (59)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Les sons

    15 mai 2013, par
  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (3681)

  • .NET Wrapper ffmpeg convert to mp4 set size to 1920 x 1080

    1er août 2020, par Robert

    I in my application written in .NET Core I use ffmpeg to convert movie from 3gp to mp4.

    


    var conversionOptions = new ConversionOptions
{
   MaxVideoDuration = TimeSpan.FromSeconds(60),
   VideoAspectRatio = VideoAspectRatio.R16_9,
   VideoSize = VideoSize.Hd1080,
   AudioSampleRate = AudioSampleRate.Hz44100,
   //  CustomWidth = 200
};
                    
await ffmpeg.ConvertAsync(inputFile, outputFileMp4, conversionOptions);


    


    Convertion works fine, but my source movie is from mobile phone. Its frame size is 1920 x 1080 but the movie is higher than wider.
After conversion with above code the frame is the same but the movie is cuted and it is wider than taller.
I wanted to have original size

    


  • Why can't I get a manually modified MPEG-4 extended box (chunk) size to work ?

    15 avril 2019, par Moshe Rubin

    Overview

    As part of a project to write an MPEG-4 (MP4) file parser, I need to understand how an extended box (or chunk) size is processed within an MP4 file. When I tried to manually simulate an MP4 file with an extended box size, media players report that the file is invalid.

    Technical Information

    Paraphrasing the MPEG-4 specification :

    An MP4 file is formed as a series of objects called ’boxes’. All data is contained in boxes, there is no other data within the file.

    Here is a screen capture of Section 4.2 : Object Structure, which describes the box header and its size and type fields :

    MPEG-4 Object Structure (part 1)

    enter image description here

    Most MP4 box headers contain two fields : a 32-bit compact box size and a 32-bit box type. The compact box size supports a box’s data up to 4 GB. Occasionally an MP4 box may have more data than that (e.g., a large video file). In this case, the compact box size is set to 1, and eight (8) octets are added immediately following the box type. This 64-bit number is known as the ’extended box size’, and supports a box’s size up to 2^64.

    To understand the extended box size better, I took a simple MP4 file and wanted to modify the moov/trak/mdia box to use the extended box size, rather than the compact size.

    Here is what the MP4 file looks like before modifying it. The three box headers are highlighted in RED :

    MP4 file before inserting an extended box size

    My plan was as follows :

    1. Modify the moov/trak/mdia box
      • In the moov/trak/mdia, insert eight (8) octets immediately following the box type (’mdia’). This will eventually be our extended box size.
      • Copy the compact box size to the newly-inserted extended box size, adding 8 to the size to compensate for the newly inserted octets. The size is inserted in big-endian order.
      • Set the compact size to 1.
    2. Modify the moov/trak box
      • Add 8 to the existing compact box size (to compensate for the eight octets added to mdia).
    3. Modify the moov box
      • Add 8 to the existing compact box size (again, to compensate for the eight octets in mdia)

    Here’s what the MP4 file looks like now, with the modified octets are in RED :

    MP4 file after inserting an extended box size

    What have we done ?

    We have told the MP4 parser/player to take the moov/trak/mdia box size from the extended field rather than the compact size field, and have increased all parent boxes by eight (8) to compensate for the newly-inserted extended box size in the mdia box.

    What’s the problem ?

    When I attempt to play the modified MP4 file I receive error messages from different media players :

    Windows Media Player

    Windows Movies & TV App

    Why do the media players see the modified file as invalid MP4 ?

    • Did I need to alter any other fields ?
    • Does the extended box size have to be greater than 2^32 ?
    • Can it be that only specific box types support extended box size (e.g., Media Data) ?
  • vp9 : do unscaled MC in scaled path if size of this reference matches.

    4 septembre 2015, par Ronald S. Bultje
    vp9 : do unscaled MC in scaled path if size of this reference matches.
    

    This can happen if we do bidirectional MC, where one reference has the
    same size as the current frame, but the other one doesn’t.

    • [DH] libavcodec/vp9.c