Recherche avancée

Médias (1)

Mot : - Tags -/iphone

Autres articles (62)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • (Dés)Activation de fonctionnalités (plugins)

    18 février 2011, par

    Pour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
    SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
    Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
    MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)

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

  • Matplotlib animation error : Requested MovieWriter (ffmpeg) not available, while ffmpeg is installed

    3 juillet 2020, par Vivien Bonnot

    I'm trying to animate colormapping representations of parametric complex fonctions using Python.
I gradually put some things together, and checked that they worked properly. But I can't get the animation to be saved.

    


    I encountered this error :

    


    Requested MovieWriter (ffmpeg) not available

    


    However, ffmpeg is indeed installed on my system,
on Windows console ffmpeg -version returns all sorts of informations about ffmpeg. Additionnaly, I also installed ffmpeg in Python scripts directory using pip pip install ffmpeg, which was successfull. I also set up ffmepg path in my code : plt.rcParams['animation.ffmpeg_path'] = "C:\FFmpeg\bin\ffmpeg.exe"

    


    I'm runing out of ideas.

    


    Here is my code.
Thank you for reading.

    


    import numpy as np
import math
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.animation as animation
pi=math.pi
plt.rcParams['animation.ffmpeg_path'] = "C:\FFmpeg\bin\ffmpeg.exe"
fig = plt.figure()

def complex_array_to_rgb(X, theme='dark', rmax=None):
  absmax = rmax or np.abs(X).max()
  Y = np.zeros(X.shape + (3,), dtype='float')
  Y[..., 0] = np.angle(X) / (2 * pi) % 1
  if theme == 'light':
    Y[..., 1] = np.clip(np.abs(X) / absmax, 0, 1)
    Y[..., 2] = 1
  elif theme == 'dark':
    Y[..., 1] = 1
    Y[..., 2] = np.clip(np.abs(X) / absmax, 0, 1)
  Y = matplotlib.colors.hsv_to_rgb(Y)
  return Y

# Set up formatting for the movie files
Writer = animation.writers['ffmpeg']
writer = Writer(fps=15, metadata=dict(artist='Me'), bitrate=1800)

fps = 10
nSeconds = 1
snapshots = [ complex_array_to_rgb(np.array([[3*(x + 1j*y)**(2.9+p/300) + 1/(x + 1j*y)**2 for x in np.arange(-1,1,0.05)] for y in np.arange(-1,1,0.05)])) for p in range( nSeconds * fps ) ]

fig = plt.figure( figsize=(3,3) )

Z2=snapshots[0]
im=plt.imshow(Z2, extent=(-1,1,-1,1))

def animate_func(i):
    if i % fps == 0:
        print( '.')

    im.set_array(snapshots[i])
    return [im]
    
anim = animation.FuncAnimation(
                               fig, 
                               animate_func, 
                               frames = nSeconds * fps,
                               interval = 1000 / fps, # in ms
                               )

anim.save('test_anim.mp4', writer=writer)


    


  • Problem updating drawtext with file using ffmpeg [duplicate]

    17 novembre 2020, par drmobbins

    I have a shell script that runs to combine a 24/7 AAC audio stream with a 720p HD picture/background and streams that output live to YouTube. This is for an internet radio station. The script works perfectly except for the drawtext option. The drawtext option references a file that is updated every 15 seconds (using Python and Cron) with the correct song metadata (from the radio automation suite) and is supposed to print the contents of the metadata file to the screen. This happens one time when the ffmpeg command is run in the script, but doesn't update after a song change.

    


    I would assume that since the metadata file is changing every 15 seconds on the server that it would update the song details in the output video that could be seen on YouTube...but it doesn't.

    


    #!/bin/bash

#Quality settings
VBR="1500k"
FPS="30"
QUAL="ultrafast"
AUDIO_ENCODER="aac"

#Youtube settings
YOUTUBE_URL=" rtmp://a.rtmp.youtube.com/live2"
YOUTUBE_KEY="xxxx-xxxx-xxxx-xxxx-xxxx"

#Sources
VIDEO_SOURCE="bg720p.jpg"
AUDIO_SOURCE="http://stream.url"

#Metadata settings
TRACK_METADATA=$(cat metadata.txt)

ffmpeg \
 -loop 1 \
 -re \
 -framerate $FPS \
 -i "$VIDEO_SOURCE" \
 -thread_queue_size 512 \
 -i "$AUDIO_SOURCE" \
 -vf "drawtext=fontfile=OpenSans-Light.ttf:text=$TRACK_METADATA:x=10:y=680:fontsize=20:fontcolor=white" \
 -c:v libx264 -tune stillimage -pix_fmt yuv420p -preset $QUAL -r $FPS -g $(($FPS *2)) -b:v $VBR \
 -c:a $AUDIO_ENCODER -threads 6 -ar 44100 -b:a 64k -bufsize 512k -pix_fmt yuv420p \
 -f flv $YOUTUBE_URL/$YOUTUBE_KEY


    


    What am I missing that will make the output continually check for file changes and use drawtext to display the contents. Thanks in advance !

    


  • Change file format from flv to anything android will play

    19 octobre 2011, par Bilthon

    I need to take this file which encoded is in h264 but in a flv container and just put it in a mp4, 3gp or whatever file format the android MediaPlayer will understand.

    I want to do this natively. As I will not be decoding nor encoding anything I think I will not be wasting a lot of power (am I wrong ?)

    I followed the instructions from here http://www.roman10.net/?p=394 and could sucessfully compile and use ffmpeg and use it with mp4 and 3gp files.

    But when it comes to flv files it fails. I understand there is no format definition for flv files in that specific port of ffmpeg for android.

    There is no libavformat/flv.h header file for instance.

    Maybe that's why this works :

    extern AVInputFormat ff_mov_demuxer ;
    av_register_input_format(&ff_mov_demuxer) ;

    While this fails :

    extern AVInputFormat ff_flv_demuxer;
    av_register_input_format(&ff_flv_demuxer);

    Question is, is there a light at the end of the tunnel ? has someone done something similar ? is it useful ? I mean, I can always just throw the flv media file into a flash player and voila.. the thing is that this would be a parcial solution, as it will not work for all those folks running slower devices that can't yet run Flash.

    Nelson

    PS. Just in case. Here's some info about the file I'm talking about :

    ffmpeg -i rio.flv
    ffmpeg version N-32624-gea8de10, Copyright (c) 2000-2011 the FFmpeg developers
     built on Sep 15 2011 23:31:42 with gcc 4.5.2
     configuration: --enable-libfaac --enable-libmp3lame --enable-librtmp --enable-libtheora --enable-libx264 --enable-libxvid --enable-gpl --enable-nonfree
     libavutil    51. 16. 0 / 51. 16. 0
     libavcodec   53. 15. 0 / 53. 15. 0
     libavformat  53. 12. 0 / 53. 12. 0
     libavdevice  53.  3. 0 / 53.  3. 0
     libavfilter   2. 42. 0 /  2. 42. 0
     libswscale    2.  1. 0 /  2.  1. 0
     libpostproc  51.  2. 0 / 51.  2. 0

    Seems stream 0 codec frame rate differs from container frame rate: 2000.00 (2000/1) -> 14.99 (15000/1001)
    Input #0, flv, from 'rio.flv':
     Duration: 00:01:00.06, start: 0.000000, bitrate: 783 kb/s
       Stream #0.0: Video: h264 (Main), yuv420p, 704x480 [SAR 10:11 DAR 4:3], 14.99 tbr, 1k tbn, 2k tbc