Recherche avancée

Médias (0)

Mot : - Tags -/organisation

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (21)

  • Liste des distributions compatibles

    26 avril 2011, par

    Le tableau ci-dessous correspond à la liste des distributions Linux compatible avec le script d’installation automatique de MediaSPIP. Nom de la distributionNom de la versionNuméro de version Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    Si vous souhaitez nous aider à améliorer cette liste, vous pouvez nous fournir un accès à une machine dont la distribution n’est pas citée ci-dessus ou nous envoyer le (...)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

Sur d’autres sites (4967)

  • libFLAC : CPUID detecion improvements.

    28 juin 2014, par Erik de Castro Lopo
    libFLAC : CPUID detecion improvements.
    

    According to docs, it’s incorrect to just call CPUID with EAX=1.
    One must to ensure that this value is supported.

    CPUs that don’t support CPUID level 1 are very old, but...
    if FLAC tests CPUID presence it should also test CPUID level support.

    Also the function FLAC__cpu_have_cpuid_asm_ia32 was simplified
    according to the docs at Intel website and in Wikipedia.

    Patch-from : lvqcl <lvqcl.mail@gmail.com>

    • [DH] src/libFLAC/cpu.c
    • [DH] src/libFLAC/ia32/cpu_asm.nasm
  • avcodec/vc1dec : Re-order init to avoid initting hwaccel too early

    8 août 2015, par Philip Langdale
    avcodec/vc1dec : Re-order init to avoid initting hwaccel too early
    

    At least for vdpau, the hwaccel init code tries to check the video
    profile and ensure that there is a matching vdpau profile available.

    If it can’t find a match, it will fail to initialise.

    In the case of wmv3/vc1, I observed initialisation to fail all the
    time. It turns out that this is due to the hwaccel being initialised
    very early in the codec init, before the profile has been extracted
    and set.

    Conceptually, it’s a simple fix to reorder the init code, but it gets
    messy really fast because ff_get_format(), which is what implicitly
    trigger hwaccel init, is called multiple times through various shared
    init calls from h263, etc. It’s incredibly hard to prove to my own
    satisfaction that it’s safe to move the vc1 specific init code
    ahead of this generic code, but all the vc1 fate tests pass, and I’ve
    visually inspected a couple of samples and things seem correct.

    Signed-off-by : Philip Langdale <philipl@overt.org>

    • [DH] libavcodec/vc1dec.c
  • How to Match ASS Subtitle Font Size with Flutter Text Size for a 1080p Video ?

    16 décembre 2024, par Mostafa Fathi

    I’m working on a project where I need to synchronize the font size of ASS subtitles with the text size a user sees in a Flutter application. The goal is to ensure that the text size in a 1080p video matches what the user sees in the app.

    &#xA;

    What I've Tried :

    &#xA;

      &#xA;
    1. Calculating font size using height ratio (PlayResY/DeviceHeight) :
    2. &#xA;

    &#xA;

      &#xA;
    • I used the formula :
    • &#xA;

    &#xA;

    FontSize_ASS = FontSize_Flutter * (PlayResY / DeviceHeight)&#xA;

    &#xA;

      &#xA;
    • While the result seemed logical, the final output in the video was smaller than expected.
    • &#xA;

    &#xA;

      &#xA;
    1. Adding a scaling factor :
    2. &#xA;

    &#xA;

      &#xA;
    • I introduced a scaling factor (around 3.0) to address the size discrepancy.
    • &#xA;

    • This improved the result but still felt inconsistent and lacked precision.
    • &#xA;

    &#xA;

      &#xA;
    1. Using force_style in FFmpeg :
    2. &#xA;

    &#xA;

      &#xA;
    • I applied the force_style parameter to control the font size in FFmpeg directly.
    • &#xA;

    &#xA;

    ffmpeg -i input.mp4 -vf "subtitles=subtitle.ass:force_style=&#x27;FontSize=90&#x27;" -c:a copy output.mp4&#xA;

    &#xA;

      &#xA;
    • While it produced better results, it’s not an ideal solution as it bypasses the calculations in the ASS file.
    • &#xA;

    &#xA;

      &#xA;
    1. Aligning PlayResX and PlayResY in the ASS file :&#xA;I ensured that these parameters matched the target video resolution (1920×1080) :
    2. &#xA;

    &#xA;

    PlayResX: 1920&#xA;PlayResY: 1080&#xA;

    &#xA;

      &#xA;
    • Despite this adjustment, the font size didn’t align perfectly with the Flutter app text size.
    • &#xA;

    &#xA;

      &#xA;
    1. Reading font metrics from the font file dynamically :&#xA;To improve precision, I wrote a function in Flutter that reads font metrics (units per EM, ascender, and descender) from the TTF font file and calculates a more accurate scaling factor :
    2. &#xA;

    &#xA;

    Future readFontMetrics(&#xA;      String fontFilePath, &#xA;      double originalFontSize,&#xA;) async {&#xA;  final fontData = await File(fontFilePath).readAsBytes();&#xA;  final fontBytes = fontData.buffer.asUint8List();&#xA;  final byteData = ByteData.sublistView(fontBytes);&#xA;&#xA;  int numTables = readUInt16BE(byteData, 4);&#xA;  int offsetTableStart = 12;&#xA;  Map> tables = {};&#xA;&#xA;  for (int i = 0; i &lt; numTables; i&#x2B;&#x2B;) {&#xA;    int recordOffset = offsetTableStart &#x2B; i * 16;&#xA;    String tag =&#xA;        utf8.decode(fontBytes.sublist(recordOffset, recordOffset          &#x2B; 4));&#xA;    int offset = readUInt32BE(byteData, recordOffset &#x2B; 8);&#xA;    int length = readUInt32BE(byteData, recordOffset &#x2B; 12);&#xA;&#xA;    tables[tag] = {&#xA;      &#x27;offset&#x27;: offset,&#xA;      &#x27;length&#x27;: length,&#xA;    };&#xA;  }&#xA;&#xA;  if (!tables.containsKey(&#x27;head&#x27;) || !tables.containsKey(&#x27;hhea&#x27;){&#xA;    print(&#x27;Required tables not found in the font file.&#x27;);&#xA;    return null;&#xA;  }&#xA;&#xA;  int headOffset = tables[&#x27;head&#x27;]![&#x27;offset&#x27;]!;&#xA;  int unitsPerEm = readUInt16BE(byteData, headOffset &#x2B; 18);&#xA;&#xA;  int hheaOffset = tables[&#x27;hhea&#x27;]![&#x27;offset&#x27;]!;&#xA;  int ascender = readInt16BE(byteData, hheaOffset &#x2B; 4);&#xA;  int descender = readInt16BE(byteData, hheaOffset &#x2B; 6);&#xA;&#xA;  print(&#x27;unitsPerEm: $unitsPerEm&#x27;);&#xA;  print(&#x27;ascender: $ascender&#x27;);&#xA;  print(&#x27;descender: $descender&#x27;);&#xA;&#xA;  int nominalSize = unitsPerEm;&#xA;  int realDimensionSize = ascender - descender;&#xA;  double scaleFactor = realDimensionSize / nominalSize;&#xA;  double realFontSize = originalFontSize * scaleFactor;&#xA;&#xA;  print(&#x27;Scale Factor: $scaleFactor&#x27;);&#xA;  print(&#x27;Real Font Size: $realFontSize&#x27;);&#xA;&#xA;  return realFontSize;&#xA;}&#xA;

    &#xA;

      &#xA;
    • This function dynamically reads the font properties (ascender, descender, and unitsPerEM) and calculates a scale factor to get the real font size. Despite this effort, discrepancies persist when mapping it to the ASS font size.
    • &#xA;

    &#xA;

    Question :&#xA;How can I ensure that the font size in the ASS file accurately reflects the size the user sees in Flutter ? Is there a reliable method to calculate or align the sizes correctly across both systems ? Any insights or suggestions would be greatly appreciated.

    &#xA;

    Thank you ! 🙏

    &#xA;