Recherche avancée

Médias (0)

Mot : - Tags -/diogene

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

Autres articles (79)

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

  • FFMPEG PHP Message : Unable to save frame

    30 avril 2020, par Hitesh Vala Ahir

    Hello I have try to take thumbnail through FFMPEG but get the error message like Message : Unable to save frame.

    



    PHP 7.0

    



    php-ffmpeg/php-ffmpeg : ^0.16.0

    



    Below is the code

    



    require &#x27;vendor/autoload.php&#x27;;&#xA;&#xA;&#xA;&#xA;$sec =1;&#xA;$movie = &#x27;video1581091620.mp4&#x27;;&#xA;$thumbnail = &#x27;thumbnail.png&#x27;;&#xA;&#xA;try{&#xA;$ffmpeg = FFMpeg\FFMpeg::create();&#xA;$video = $ffmpeg->open($movie);&#xA;$frame = $video->frame(FFMpeg\Coordinate\TimeCode::fromSeconds($sec));&#xA;$frame->save($thumbnail);&#xA;echo &#x27;<img src="http://stackoverflow.com/feeds/tag/&#38;#x27;.$thumbnail.&#38;#x27;" style='max-width: 300px; max-height: 300px' />&#x27;;&#xA;}catch(Exception $e) {&#xA;  echo &#x27;Message: &#x27; .$e->getMessage();&#xA;}&#xA;

    &#xA;

  • Matplotlib can not save animation

    1er avril 2020, par Justin Furuness

    I have a matplotlib animation and it will not save. If I do not save it, it runs totally fine and without error. When I try to save it errors with a message that is not helpful. I have googled this error and checked everything, but I cannot seem to find an answer to this problem. I have installed ffmpeg. Am I doing something wrong that is obvious ? I am running on ubuntu 19.10 with matplotlib 3.2.1 if that matters.

    &#xA;&#xA;

    The code to save the animation is below :

    &#xA;&#xA;

        def run_animation(self, total_rounds):&#xA;        anim = animation.FuncAnimation(self.fig, self.animate,&#xA;                                       init_func=self.init,&#xA;                                       frames=total_rounds * 100,&#xA;                                       interval=40,&#xA;                                       blit=True)&#xA;#        Writer = animation.writers[&#x27;ffmpeg&#x27;]&#xA;#        writer = Writer(fps=15, metadata=dict(artist=&#x27;Me&#x27;), bitrate=1800)&#xA;        anim.save(&#x27;animation.mp4&#x27;)&#xA;

    &#xA;&#xA;

    The error traceback :

    &#xA;&#xA;

    2020-04-01 02:20:58,279-INFO: MovieWriter._run: running command: ffmpeg -f rawvideo -vcodec rawvideo -s 1200x500 -pix_fmt rgba -r 25.0 -loglevel error -i pipe: -vcodec h264 -pix_fmt yuv420p -y animation.mp4&#xA;Traceback (most recent call last):&#xA;  File "/home/anon/.local/lib/python3.7/site-packages/matplotlib/backend_bases.py", line 2785, in _wait_cursor_for_draw_cm&#xA;    self.set_cursor(cursors.WAIT)&#xA;  File "/home/anon/.local/lib/python3.7/site-packages/matplotlib/backends/backend_gtk3.py", line 468, in set_cursor&#xA;    self.canvas.get_property("window").set_cursor(cursord[cursor])&#xA;AttributeError: &#x27;NoneType&#x27; object has no attribute &#x27;set_cursor&#x27;&#xA;

    &#xA;&#xA;

    Thanks a million for your help

    &#xA;

  • Save a Twilio of format 8Khz `mulaw` to a file

    2 avril 2020, par Joe

    There are a couple of posts that address the question, but I wasn't able to successfully playback a saved file. It usually plays back at half speed.

    &#xA;&#xA;

    Convert 8kHz mulaw to 16KHz PCM in real time

    &#xA;&#xA;

    Using the accepted answer in the above question, I saved the raw and base64 decoded the audio in go :

    &#xA;&#xA;

    // Media event&#xA;type Media struct {&#xA;    Track     string `json:"track"`&#xA;    Chunk     string `json:"chunk"`&#xA;    Timestamp string `json:"timestamp"`&#xA;    Payload   string `json:"payload"`&#xA;}&#xA;&#xA;// SaveAudio will upgrade connection to websocket and save the audio to file&#xA;func SaveAudio(w http.ResponseWriter, r *http.Request) {&#xA;    utility.DebugLogf("SaveAudio")&#xA;    c, err := upgrader.Upgrade(w, r, nil)&#xA;    if err != nil {&#xA;        log.Print("upgrade:", err)&#xA;        return&#xA;    }&#xA;&#xA;    defer utility.SafeClose(c)&#xA;    inBuf := bytes.Buffer{}&#xA;&#xA;    loop := true&#xA;    for loop == true {&#xA;        _, message, err := c.ReadMessage()&#xA;        utility.PanicIfErr(err)&#xA;        decMessage := TwilioWSSMessage{}&#xA;        err = json.Unmarshal(message, &amp;decMessage)&#xA;        utility.PanicIfErr(err)&#xA;&#xA;        switch decMessage.Event {&#xA;        case "connected":&#xA;            utility.DebugLogf("Connected a %s protocol version:%s", decMessage.Protocol, decMessage.Version)&#xA;        case "start":&#xA;            utility.DebugLogf("Starting audio stream: %#v", decMessage.Start)&#xA;        case "media":&#xA;            chunk, err := base64.StdEncoding.DecodeString(decMessage.Media.Payload)&#xA;            utility.PanicIfErr(err)&#xA;            _, err = inBuf.Write(chunk)&#xA;            utility.PanicIfErr(err)&#xA;        case "stop":&#xA;            utility.DebugLogf("Ending audio stream: %#v", decMessage.Stop)&#xA;            loop = false&#xA;        default:&#xA;            utility.LogWarningf("Unrecognized event type: %s", decMessage.Event)&#xA;            loop = false&#xA;        }&#xA;    }&#xA;&#xA;    saveRaw(&amp;inBuf)&#xA;}&#xA;&#xA;func saveRaw(buf *bytes.Buffer) {&#xA;    rawOut, err := os.Create("out.ulaw")&#xA;    utility.PanicIfErr(err)&#xA;&#xA;    _, err = rawOut.Write(buf.Bytes())&#xA;    utility.PanicIfErr(err)&#xA;}&#xA;

    &#xA;&#xA;

    Then I used ffmpeg to convert from mulaw to the default pcm_s16le :

    &#xA;&#xA;

    ffmpeg -f mulaw -ar 8000 -ac 1 -i out.ulaw mulaw_decoded.wav &#xA;

    &#xA;&#xA;

    Then upsampled the audio from 8k->16k and play it with vlc :

    &#xA;&#xA;

    ffmpeg -i mulaw_decoded.wav -ar 16000 upsampled.wav &amp;&amp; vlc upsampled.wav&#xA;

    &#xA;&#xA;

    But it plays at half speed.

    &#xA;&#xA;

    Ultimately I'd like to do it all in rust or go, but I can't even get it working locally with just ffmpeg.

    &#xA;&#xA;

    Thanks in advance.

    &#xA;&#xA;


    &#xA;&#xA;

    output of the above two ffmpeg operations combined with the suggested sox resampler :

    &#xA;&#xA;

    cmd :

    &#xA;&#xA;

    ffmpeg -y -loglevel verbose -f mulaw -ar 8000 -ac 1 -bits_per_raw_sample 8 -i testsamples/raw_mulaw_bytes -af aresample=resampler=soxr -ar 16000 upsampled.wav&#xA;

    &#xA;&#xA;

    output :

    &#xA;&#xA;

    [mulaw @ 0x7fecc0814000] Estimating duration from bitrate, this may be inaccurate&#xA;Guessed Channel Layout for Input Stream #0.0 : mono&#xA;Input #0, mulaw, from &#x27;testsamples/raw_mulaw_bytes&#x27;:&#xA;  Duration: 00:00:20.74, bitrate: 64 kb/s&#xA;    Stream #0:0: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (pcm_mulaw (native) -> pcm_s16le (native))&#xA;Press [q] to stop, [?] for help&#xA;[graph_0_in_0_0 @ 0x7fecc0505600] tb:1/8000 samplefmt:s16 samplerate:8000 chlayout:0x4&#xA;[Parsed_aresample_0 @ 0x7fecc0505280] ch:1 chl:mono fmt:s16 r:8000Hz -> ch:1 chl:mono fmt:s16 r:16000Hz&#xA;Output #0, wav, to &#x27;upsampled.wav&#x27;:&#xA;  Metadata:&#xA;    ISFT            : Lavf58.29.100&#xA;    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 Hz, mono, s16, 256 kb/s&#xA;    Metadata:&#xA;      encoder         : Lavc58.54.100 pcm_s16le&#xA;No more output streams to write to, finishing.&#xA;size=     648kB time=00:00:20.74 bitrate= 256.0kbits/s speed=1.55e&#x2B;03x&#xA;video:0kB audio:648kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.011753%&#xA;Input file #0 (testsamples/raw_mulaw_bytes):&#xA;  Input stream #0:0 (audio): 519 packets read (165920 bytes); 519 frames decoded (165920 samples);&#xA;  Total: 519 packets (165920 bytes) demuxed&#xA;Output file #0 (upsampled.wav):&#xA;  Output stream #0:0 (audio): 200 frames encoded (331840 samples); 200 packets muxed (663680 bytes);&#xA;  Total: 200 packets (663680 bytes) muxed&#xA;[AVIOContext @ 0x7fecc0433cc0] Statistics: 4 seeks, 6 writeouts&#xA;[AVIOContext @ 0x7fecc042a6c0] Statistics: 165920 bytes read, 0 seeks&#xA;

    &#xA;&#xA;

    The audio sounds the same as before

    &#xA;