Recherche avancée

Médias (91)

Autres articles (42)

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

  • Le plugin : Gestion de la mutualisation

    2 mars 2010, par

    Le plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
    Installation basique
    On installe les fichiers de SPIP sur le serveur.
    On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
    On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
    < ?php (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

Sur d’autres sites (3814)

  • Creating MOV from PNGs with ffmpeg : playback issue in older quicktime (7.6.6)

    15 avril 2013, par Jim Lindstrom

    I'm using ffmpeg to create a MOV file from a series of images. When I view the movie in Quicktime 7.7.x, it looks great (left image). When I view in Quicktime 7.6.6 I get this weird issue (on the right) :

    In Quicktime 7.7.x
    In Quicktime 7.6.6

    Any idea even what this is, much less how to fix it ?

    Details

    My source images are a mix of PNGs and JPGs that I pre-process with ImageMagick (to draw text, captions, etc). I store intermediate results as MPCs, and final frames as PNMs.

    To draw the above frame, I'm doing this :

    convert -background none -fill white -font my_font.ttf -pointsize 132 -gravity \
           center -size 945x550 caption:"Stills Demo" background-template.png     \
           +swap -composite -resize 1920x1080! /tmp/title_screen4338355.png
    convert -auto-orient /tmp/title_screen4338355.png -resize 100% -type TrueColor \
           /tmp/1b2764754ce6e420986ed74b942bcf67.mpc
    convert /tmp/1b2764754ce6e420986ed74b942bcf67.mpc -set option:distort:viewport \
           1920x1080+0+0  +distort SRT &#39;960.0,540.0 1.0 0 960.0,540.0&#39;            \
           /tmp/stills-project-6224/video_frames/img_0000.pnm

    I render frames with ffmpeg like so :

    ffmpeg -y -f image2 -i /tmp/stills-project-6224/video_frames/img_%04d.pnm      \
          -i /tmp/soundtrack_8702693.wav -vcodec libx264 -pix_fmt yuvj444p        \
          -b:v 2200k  -r 25 -strict experimental                                  \
          /tmp/stills-project-6224/video_rendered/output.mov

    The rest of the video is fine. The other images are photos (jpgs or pngs) that I process in the same way. I have also noticed that if I don't apply text to this background-template, the image shows up fine, so I think the issue has something to do with either how I'm processing or saving that image.

  • How to improve the output video quality with ffmpeg and h264_videotoolbox flag ?

    13 avril 2023, par Anthony Kong

    Currently I am using this command to convert

    &#xA;

    ffmpeg -i <srcfile> -vcodec libx264 -profile:v main -level 3.1 -preset slower -crf 18 -x264-params ref=4 -acodec copy -movflags &#x2B;faststart <outfile>&#xA;</outfile></srcfile>

    &#xA;

    to convert some dashcam footage for viewing on an iOS device.

    &#xA;

    The above command took about 30 min to complete on a 2017 Macbookpro with 16G of RAM.

    &#xA;

    I want to speed it. One thing I tried is to harness the GPU in the computer. Therefore I added the flag -c:v h264_videotoolbox

    &#xA;

    It sped up by a lot. I can complete the conversion in 1 min.

    &#xA;

    However, when I inspected the output, the GPU version suffers from banding and blurry.

    &#xA;

    Here is a screenshot. CPU version on the left and GPU version on the right.

    &#xA;

    enter image description here

    &#xA;

    To highlight the difference, here are the parts of the videos

    &#xA;

      &#xA;
    1. Trees in reflections
    2. &#xA;

    &#xA;

    enter image description here

    &#xA;

      &#xA;
    1. corrugated iron sheet wall
    2. &#xA;

    &#xA;

    enter image description here

    &#xA;

    Is there any switch that I can manipulate to make the GPU version clearer ?

    &#xA;

  • Is there a way to program the (Download) button to save a group of images as a one video ?

    9 février 2024, par Lina Al-fawzan

    This is my entire code. Its function is that everything the user writes or says will have images returned to him according to what he wrote/said, and the next image will be shown to him after he presses “close,” and he can save each image separately. I want to make a simple modification to it. First, instead of a close button, I want each image to be displayed for 3 seconds and the next one to be displayed, and so on... “all of them in one window”, and for the “download” button to be when the last image is displayed, and for them all to be saved in one video.

    &#xA;

    import &#x27;package:flutter/material.dart&#x27;;&#xA;import &#x27;package:flutter/services.dart&#x27; show rootBundle;&#xA;import &#x27;dart:convert&#x27;;&#xA;import &#x27;dart:typed_data&#x27;;&#xA;import &#x27;package:image_gallery_saver/image_gallery_saver.dart&#x27;;&#xA;import &#x27;package:speech_to_text/speech_to_text.dart&#x27; as stt;&#xA;&#xA;void main() {&#xA;  runApp(MyApp());&#xA;}&#xA;&#xA;class MyApp extends StatelessWidget {&#xA;  @override&#xA;  Widget build(BuildContext context) {&#xA;    return MaterialApp(&#xA;      home: MyHomePage(),&#xA;    );&#xA;  }&#xA;}&#xA;&#xA;class MyHomePage extends StatefulWidget {&#xA;  @override&#xA;  _MyHomePageState createState() => _MyHomePageState();&#xA;}&#xA;&#xA;class _MyHomePageState extends State<myhomepage> {&#xA;  TextEditingController _textEditingController = TextEditingController();&#xA;  late stt.SpeechToText _speech;&#xA;  bool _isListening = false;&#xA;&#xA;  @override&#xA;  void initState() {&#xA;    super.initState();&#xA;    _speech = stt.SpeechToText();&#xA;  }&#xA;&#xA;  void _listen() async {&#xA;    if (!_isListening) {&#xA;      bool available = await _speech.initialize(&#xA;        onStatus: (val) => print(&#x27;onStatus: $val&#x27;),&#xA;        onError: (val) => print(&#x27;onError: $val&#x27;),&#xA;      );&#xA;      if (available) {&#xA;        setState(() => _isListening = true);&#xA;        _speech.listen(&#xA;          onResult: (val) => setState(() {&#xA;            _textEditingController.text = val.recognizedWords;&#xA;            if (val.hasConfidenceRating &amp;&amp; val.confidence > 0) {&#xA;              _showImages(val.recognizedWords);&#xA;            }&#xA;          }),&#xA;        );&#xA;      }&#xA;    } else {&#xA;      setState(() => _isListening = false);&#xA;      _speech.stop();&#xA;    }&#xA;  }&#xA;&#xA;  @override&#xA;  Widget build(BuildContext context) {&#xA;    return Scaffold(&#xA;      appBar: AppBar(&#xA;        title: Text(&#x27;Image Viewer&#x27;),&#xA;      ),&#xA;      body: Padding(&#xA;        padding: const EdgeInsets.all(16.0),&#xA;        child: Column(&#xA;          mainAxisAlignment: MainAxisAlignment.center,&#xA;          children: [&#xA;            TextField(&#xA;              controller: _textEditingController,&#xA;              decoration: const InputDecoration(&#xA;                labelText: &#x27;Enter a word&#x27;,&#xA;              ),&#xA;            ),&#xA;            SizedBox(height: 16.0),&#xA;            ElevatedButton(&#xA;              onPressed: () {&#xA;                String userInput = _textEditingController.text;&#xA;                _showImages(userInput);&#xA;              },&#xA;              child: Text(&#x27;Show Images&#x27;),&#xA;            ),&#xA;            SizedBox(height: 16.0),&#xA;            ElevatedButton(&#xA;              onPressed: _listen,&#xA;              child: Text(_isListening ? &#x27;Stop Listening&#x27; : &#x27;Start Listening&#x27;),&#xA;            ),&#xA;          ],&#xA;        ),&#xA;      ),&#xA;    );&#xA;  }&#xA;&#xA;Future<void> _showImages(String userInput) async {&#xA;  String directoryPath = &#x27;assets/output_images/&#x27;;&#xA;  print("User Input: $userInput");&#xA;  print("Directory Path: $directoryPath");&#xA;&#xA;  List<string> assetFiles = await rootBundle&#xA;      .loadString(&#x27;AssetManifest.json&#x27;)&#xA;      .then((String manifestContent) {&#xA;    final Map manifestMap = json.decode(manifestContent);&#xA;    return manifestMap.keys&#xA;        .where((String key) => key.startsWith(directoryPath))&#xA;        .toList();&#xA;  });&#xA;&#xA;  List<string> imageFiles = assetFiles.where((String assetPath) =>&#xA;      assetPath.toLowerCase().endsWith(&#x27;.jpg&#x27;) ||&#xA;      assetPath.toLowerCase().endsWith(&#x27;.gif&#x27;)).toList();&#xA;&#xA;  List<string> words = userInput.split(&#x27; &#x27;); // Tokenize the sentence into words&#xA;&#xA;  for (String word in words) {&#xA;    String wordImagePath = &#x27;$directoryPath$word.gif&#x27;;&#xA;&#xA;    if (imageFiles.contains(wordImagePath)) {&#xA;      await _showDialogWithImage(wordImagePath);&#xA;    } else {&#xA;      for (int i = 0; i &lt; word.length; i&#x2B;&#x2B;) {&#xA;        String letter = word[i];&#xA;        String letterImagePath = imageFiles.firstWhere(&#xA;          (assetPath) => assetPath.toLowerCase().endsWith(&#x27;$letter.jpg&#x27;),&#xA;          orElse: () => &#x27;&#x27;,&#xA;        );&#xA;        if (letterImagePath.isNotEmpty) {&#xA;          await _showDialogWithImage(letterImagePath);&#xA;        } else {&#xA;          print(&#x27;No image found for $letter&#x27;);&#xA;        }&#xA;      }&#xA;    }&#xA;  }&#xA;}&#xA;&#xA;  &#xA;&#xA;  Future<void> _showDialogWithImage(String imagePath) async {&#xA;    await showDialog<void>(&#xA;      context: context,&#xA;      builder: (BuildContext context) {&#xA;        return AlertDialog(&#xA;          content: Image.asset(imagePath),&#xA;          actions: [&#xA;            TextButton(&#xA;              onPressed: () {&#xA;                Navigator.of(context).pop();&#xA;              },&#xA;              child: Text(&#x27;Close&#x27;),&#xA;            ),&#xA;            TextButton(&#xA;              onPressed: () async {&#xA;                await _downloadImage(imagePath);&#xA;                Navigator.of(context).pop();&#xA;              },&#xA;              child: Text(&#x27;Download&#x27;),&#xA;            ),&#xA;          ],&#xA;        );&#xA;      },&#xA;    );&#xA;  }&#xA;&#xA;  Future<void> _downloadImage(String assetPath) async {&#xA;    try {&#xA;      final ByteData data = await rootBundle.load(assetPath);&#xA;      final List<int> bytes = data.buffer.asUint8List();&#xA;&#xA;      final result = await ImageGallerySaver.saveImage(Uint8List.fromList(bytes));&#xA;&#xA;      if (result != null) {&#xA;        ScaffoldMessenger.of(context).showSnackBar(&#xA;          SnackBar(&#xA;            content: Text(&#x27;Image saved to gallery.&#x27;),&#xA;          ),&#xA;        );&#xA;      } else {&#xA;        ScaffoldMessenger.of(context).showSnackBar(&#xA;          SnackBar(&#xA;            content: Text(&#x27;Failed to save image to gallery.&#x27;),&#xA;          ),&#xA;        );&#xA;      }&#xA;    } catch (e) {&#xA;      print(&#x27;Error downloading image: $e&#x27;);&#xA;    }&#xA;  }&#xA;}&#xA;&#xA;</int></void></void></void></string></string></string></void></myhomepage>

    &#xA;