Recherche avancée

Médias (91)

Autres articles (74)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • 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 ;

Sur d’autres sites (12873)

  • lavf/qsv_scale : add scaling modes support

    18 juin 2019, par Zhong Li
    lavf/qsv_scale : add scaling modes support
    

    low_power mode will use a fixed HW engine (SFC), thus can offload EU usage.
    high quality mode will take EU usage (AVS sampler).

    Performance and EU usage (Render usage) comparsion on Intel(R) Xeon(R) CPU E3-1225 v5 @ 3.30GHz :

    High quality mode : ffmpeg -hwaccel qsv -c:v h264_qsv -i bbb_sunflower_1080p_30fps_normal_2000frames.h264 \
    - vf scale_qsv=w=1280:h=736:mode=hq -f null -
    fps=389
    RENDER usage : 28.10 (provided by MSDK metrics_monitor)

    Low Power mode : ffmpeg -hwaccel qsv -c:v h264_qsv -i /bbb_sunflower_1080p_30fps_normal_2000frames.h264 \
    - vf scale_qsv=w=1280:h=736:mode=low_power -f null -
    fps=343
    RENDER usage : 0.00

    Low power mode (SFC) may be disabled if not supported by
    MSDK/Driver/HW, and replaced by AVS mode interanlly.

    Signed-off-by : Zhong Li <zhong.li@intel.com>

    • [DH] libavfilter/vf_scale_qsv.c
  • Integrate FFmpeg on iOS [on hold]

    11 décembre 2018, par Caleb

    I have referred links, still I have confusion. If any one has an idea then please share with me.
I am searching to implement FFmpeg on iOS for GIF , as like the example given for android, 


    Please refer this =>
    https://medium.com/wolox-driving-innovation/https-medium-com-wolox-driving-innovation-the-power-of-ffmpeg-on-android-ef6e0c01d59f

    I have referred these links,

    https://github.com/DeviLeo/DLGPlayer

    https://github.com/ElfSundae/FFmpeg-iOS-build

    https://github.com/kewlbear/FFmpeg-iOS-build-script

    

what is the correct way to achieve this.
Any help would be highly appreciated.

  • 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;