Recherche avancée

Médias (91)

Autres articles (92)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

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

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (12521)

  • blank transparent pngs behave like black canvas

    10 novembre 2015, par Anay Bose

    I am trying to create a scrolling image with imagemagick’s roll and crop functions. Its a frame-by—frame animation. The source image is a transparent png with some text written on it. The following code works and it creates the required frames, including some blank png images at first for a nice, smooth effect. These blank pngs are what creating problems when I am trying to convert my image frames into video with ffmpeg. FFMPEG is seemingly considering these blank pngs as black/dark images, so the resulting video contains a blackout for a few seconds in the beginning—which I do not want.

    I am using png codec with bgra pixel format. My ffmpeg command (shown below) creates smooth, clear animation with images that have some text on it.

    "ffmpeg -i trans/trans-%d.png -vcodec png -pix_fmt bgra overlay-0.mov";

    The blank pngs behave like black canvas, but as I try to write some text on them or surround them with a border (i.e. colorize in some way) the problem disappears—which seems very strange. I have tested all my images ; they are all transparent. For the past few hours, I have been searching for a solution, no luck so far. Please note those blank pngs are required in the beginning for a smooth effect, and I cannot omit them. I have uploaded a sample video in Youtube. Please note the black fade out.

    https://www.youtube.com/watch?v=Te3LuItxcDk&feature=youtu.be

    https://youtu.be/Te3LuItxcDk

    PHP code :

      $increment = 40;
      $count = 0;

      for ($x=40; $x <= 640 ; $x+=$increment)
      {
        $roll = new Imagick(DOCROOT . '/composite-0.png');
        $roll->rollImage($x, 0);
        $roll->writeImage(DOCROOT . '/roll/roll-' . $x . '.png');

       $crop = new Imagick(DOCROOT . '/roll/roll-' . $x . '.png');
       $crop->cropImage($x, 720, 0, 0);
       $crop->writeImage(DOCROOT . '/roll/crop-' . $x . '.png');

       $extent = new Imagick(DOCROOT . '/roll/crop-' . $x . '.png');
       # $extent->setImageBackgroundColor(new ImagickPixel('none'));
       $extent->setImageBackgroundColor(new ImagickPixel('transparent'));
       $extent->extentImage(640, $extent->getImageHeight(), 0, 0);
       $extent->setImageFormat('png');
       $extent->writeImage(DOCROOT . '/trans/trans-' . $count . '.png');

       $count++;
      }
  • FFmpeg error when trying to stream file into it

    15 décembre 2015, par nadermx

    I’m trying to put a stream into a ffmpeg pipe.

    The issue I am having is that when I send the data to ffmpeg I get a error 127

    It also shows /bin/sh: 2: -acodec: not found

    Here is the console log I’m running via python

    from subprocess import Popen, PIPE
    from flask import Flask, stream_with_context, request, Response
    from signal import signal, SIGPIPE, SIG_DFL
    signal(SIGPIPE,SIG_DFL)

    def console(cmd, add_newlines=False):
       p = Popen(cmd, shell=True, stdout=PIPE)
       while True:
           data = p.stdout.read()
           if add_newlines:
               data += '\n'
           yield data

           p.poll();
           if isinstance(p.returncode, int):
               if p.returncode > 0:
                   # return code was non zero, an error?
                   print 'error:', p.returncode

               break

           sleep(2)

    And here is the actual route I am running the application in.

    @app.route('/large.mp3')
    def generate_large_mp3():
       url = 'https://www.youtube.com/watch?v=zGEiJ44K3Oo'
       result = ''.join(data.strip() for data in console('youtube-dl --simulate --get-url %s' % url))
       mp3 = console('sudo ffmpeg -i %s -acodec libmp3lame  -f mp3 -' % result, add_newlines=True)

       return Response(stream_with_context(mp3), mimetype='video/mp3')

    Here is the error output

    /bin/sh: 2: https://r13---sn-ab5l6nes.googlevideo.com/videoplayback?id=cc6122278e0adcea: not found
    /bin/sh: 2: -acodec: not found
    ffmpeg version git-2015-12-10-3652dd5 Copyright (c) 2000-2015 the FFmpeg developers
     built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
     configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-openssl --enable-nonfree --enable-version3 --enable-gnutls
     libavutil      55. 10.100 / 55. 10.100
     libavcodec     57. 17.100 / 57. 17.100
     libavformat    57. 19.100 / 57. 19.100
     libavdevice    57.  0.100 / 57.  0.100
     libavfilter     6. 20.100 /  6. 20.100
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
    [https @ 0x384d0a0] HTTP error 403 Forbidden
    https://r13---sn-ab5l6nes.googlevideo.com/videoplayback?id=cc6122278e0adcea: Server returned 403 Forbidden (access denied)
    127.0.0.1 - - [15/Dec/2015 00:55:59] "GET /large.mp3 HTTP/1.1" 200 -
    error: 127

    I have tried many different urls and all of them end up with the same issue.
    I have also tried installing every dependency I have been able to find and still no luck

  • FFmpegWrapper - get exact segment start or end times ?

    21 décembre 2015, par Stefan Kendall

    Right now, I’m using FFmpegWrapper, and I watch for changes via kernel events. This gets the segments when they’re created, but I’m not sure how accurate this is.

    Really, I want to know the presentation timestamp of when the hls segment is created. Right now I capture and encode frames manually and write packets via
    FFOutputFile *outputFile;
    [_outputFile writePacket:_packet error:&error];

    So I have each frame’s presentationTimestamp, but I don’t know which frame goes to which eventual MPEG-TS segment. Once I write to the FFOutputFile, it’s a blackbox to me.

    Is there any way to know what frame will go to what segment ahead of time, or get a callback from FFmpeg when a new segment is written ?

    Exact times are ideal. Close times are better. Watching the directory for new files via kernel events is what I have right now, so any solution of that time magnitude isn’t useful.