Recherche avancée

Médias (0)

Mot : - Tags -/logo

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

Autres articles (53)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (6926)

  • Anomalie #4128 (En cours) : Bug de génération de boucle avec les modèles Spip

    11 avril 2018, par Julien PORIAU

    Dans les modèles personnalisés Spip, les images (boucle documents ou logos) sont mal générées et provoque un bug d’encodage visible dans le front-end lors du passage dans une autre langue (balises multi).
    Nous n’avons pas trouvé où était le souci dans Spip, mais les caractères qui remontent dans le code source, ressemblent aux octets qui composent le fichier binaire d’une image.
    Voir en live ici : http://spip-dev.nidecker.com/probleme-de-langue.html?lang=ca.

    Pour essayer d’isoler cette anomalie, nous avons procédé de la sorte avec l’aide de mon développeur :

    1. Nous sommes reparti d’un SPIP 3.1.7 entièrement neuf (minimal), avec deux modèles Spip, rien d’autre.
    Le bug se reproduit, ce qui exclus un problème lié aux squelettes ou autres plugins.

    Nous n’avons pas réussi a déterminer précisément ce qui génère ce bug, à part que c’est dans un contexte où on appelle une langue pas définie dans le multi.
    En fonction du contenu de l’article, du nombre de modèles dans l’article, en fonction des boucles dans les inclure, le bug n’arrive pas au même endroit...

    Le problème vient de la génération des logos ou documents : si on supprime les balises #LOGO_* ou si on renomme IMG en IMG_, plus d’erreur.
    Même sans traitements, avec juste [(#LOGO_*)], rien à faire.

    2. Nous avons pensé que c’était peut être une image au mauvais format : On a alors tenté de passer ImageOptim sur tout le répertoire /IMG, redimensionné tous les logos en vignettes png de 320x240, rien à faire...

    3. On a fini par passer ce site de test en 3.2, pas mieux.

    4. Nous avons épluché les caches générés dans /tmp/cache et /tmp/cache/skel, tout paraît normal de ce côté là..

    5. On a ensuite un peu avancé en enlevant dans mes_options.php la variable $GLOBALS['forcer_lang'] = true".
    Sur la version minimal, plus de bug. Mais sur le site de production, le problème réside toujours.
    Mais en faisant des tests avec et sans (et en supprimant bien /tmp/cache/ à chaque fois), ça se confirme pour la version minimal.

    6. A partir d’une copie de la version production, nous avons désactivé tout les plugins, passer ImageOptim sur /IMG et rien a faire.. Impossible de déterminé d’où vient le problème :(

    7. Nous avons essayé d’écrire comme ceci : [<img src="http://core.spip.org/projects/spip/(#LOGO_MOT|image_reduire{50,*}|extraire_attribut{src})" alt="" style='max-width: 300px; max-height: 300px' />]
    Cela fonctionne sur la version minimal mais pas sur la version production.

    8. Dans la version minimal, j’ai encore récemment testé une dernière chose. J’ai supprimé les documents non sollicités sur ma page de teste (spip.php ?article1441&lang=ca).
    Avec la requête SQL suivante : DELETE FROM jones_documents WHERE id_document NOT IN (1948,1949,2534,2535,630,631,1783,1784,1785,1786,1787,1788,1781,1782)
    Le bug n’apparait plus..

    Je sèche..

    Vous trouverez ici en téléchargement une archive de la version minimal (Spip 3.1.7) : https://www.dropbox.com/s/dek0zg7jafl8uxe/jones.zip?dl=0] ( 20mo)
    Pour reproduire le bug, il suffit de passer la variable "&lang=ca" dans l’article 1441 (localhost/spip.php ?article1441&lang=ca).

    Je donne volontiers un accès à la version production si besoin.

  • Can I know which byte range to read from a remote mp4 file for FFMpeg to decode a keyframe ?

    12 octobre 2023, par db9117

    I need to decode a of keyframe of a video file (mp4, h264 encoded). I know the timestamp of the keyframe I want to extract/decode. I want to minimize amount of data being read in memory. For this, I need to know beforehand exactly the minimal byte range I would require that encompasses this keyframe. How do I know what is the minimal byte range in the whole mp4 byte stream I need to read in order to be able to decode the keyframe ?

    &#xA;

    I currently find the appropriate keyframe in the index_entries contained in the header. I get its byte position (pos attribute) and timestamp (timestamp attribute). I calculate the range as follows :

    &#xA;

    startBytes : minimum of :

    &#xA;

      &#xA;
    1. the pos of the keyframe
    2. &#xA;

    3. the pos of the nearest index entry in the audio stream happening at or before the keyframe's timestamp.
    4. &#xA;

    &#xA;

    This way when it's decoding the frame, if it also needs the audio content for demuxing, it would have it.

    &#xA;

    endBytes : maximum of :

    &#xA;

      &#xA;
    1. the pos of the next frame in the video stream's index, after the keyframe
    2. &#xA;

    3. the pos of the next frame in the audio stream's index after the timestamp of the wished keyframe.
    4. &#xA;

    &#xA;

    This way I know that I have everything up until the next frame in the index, which theoretically should be enough to decode the keyframe only.

    &#xA;

    I then read the appropriate byte range.

    &#xA;

    When I try to decode the frame, I run in a loop until I succeed :

    &#xA;

      &#xA;
    • avcodec_read_frame
    • &#xA;

    • avcodec_send_packet
    • &#xA;

    • avcodec_receive_frame
    • &#xA;

    &#xA;

    I ignore AVERROR(EAGAIN) errors.

    &#xA;

    avcodec_receive_frame fails multiple times with error AVERROR(EAGAIN) which I ignore, until it fails saying that the memory it wants to read isn't available (wants to read after endBytes). I explicitly tell it to fail if it wants to read more than it has already read.

    &#xA;

    Note : for other keyframes at other positions in other videos, it sometimes succeeds (probably because the range is big enough by chance), but it fails more often than not.

    &#xA;

    My question is : Why is the end of the range not enough to be able to decode only the one keyframe ? Is there any way to more precisely calculate the exact range in bytes I would need in order to decode a particular keyframe ?

    &#xA;

  • ffmpeg ProcessBuilder No such file or directory

    24 avril 2020, par silentsudo

    I am trying to get media duration using ffmpeg command from a java program. I am calling this method from within spring boot application.&#xA;I am using ProcessBuilder.

    &#xA;&#xA;

    File object is valid and exists for privacy I have replaced file path in error logs.

    &#xA;&#xA;

    My Code is as below :

    &#xA;&#xA;

    private String getMediaDuration(File file) {&#xA;        final String command = "/usr/bin/ffmpeg -version";//-i " &#x2B; file.getAbsolutePath() &#x2B; " 2>&amp;1 | grep Duration | cut -c 13-20";&#xA;        try {&#xA;            ProcessBuilder builder = new ProcessBuilder("/usr/bin/ffmpeg",&#xA;                    "-version");&#xA;            builder.directory(file.getParentFile());&#xA;&#xA;            System.out.println("Directory : " &#x2B; builder.directory().exists());&#xA;            System.out.println("Directory : " &#x2B; builder.directory().getAbsolutePath());&#xA;            final Process process = builder.start();&#xA;            final InputStream is = process.getInputStream();&#xA;            final InputStreamReader isr = new InputStreamReader(is);&#xA;            final BufferedReader br = new BufferedReader(isr);&#xA;            String line;&#xA;            while ((line = br.readLine()) != null) {&#xA;                System.out.println(line);&#xA;            }&#xA;            return line;&#xA;        } catch (Exception e) {&#xA;            e.printStackTrace();&#xA;        }&#xA;        return null;&#xA;    }&#xA;

    &#xA;&#xA;

    Unfortunately nothing seems to be working&#xA;Error below :

    &#xA;&#xA;

    java.io.IOException: Cannot run program "/usr/bin/ffmpeg -version" (in directory "/abc/xyz"): error=2, No such file or directory&#xA;    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)&#xA;    at ....getMediaDuration(FFmpegRunner.java:208)&#xA;    at ....ffmpegprocessor.FFmpegRunner.run(FFmpegRunner.java:61)&#xA;    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)&#xA;    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)&#xA;    at java.lang.Thread.run(Thread.java:748)&#xA;Caused by: java.io.IOException: error=2, No such file or directory&#xA;    at java.lang.UNIXProcess.forkAndExec(Native Method)&#xA;    at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)&#xA;    at java.lang.ProcessImpl.start(ProcessImpl.java:134)&#xA;    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)&#xA;    ... 5 more&#xA;</init>

    &#xA;&#xA;

    Output for whereis ffmpeg

    &#xA;&#xA;

    ffmpeg: /usr/bin/ffmpeg /usr/share/ffmpeg /usr/share/man/man1/ffmpeg.1.gz&#xA;

    &#xA;&#xA;

    Please help me understand where it is going wrong. Thank you.

    &#xA;