Recherche avancée

Médias (1)

Mot : - Tags -/biographie

Autres articles (72)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

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

Sur d’autres sites (11954)

  • Animating a 2D plot (2D brownian motion) not working in Python

    8 avril 2020, par Thamu Mnyulwa

    I am trying to plot a 2D Brownian motion in Python but my plot plots the grid but does not animate the line.

    



    Attempted at performing this plot is below,

    



    !apt install ffmpeg

import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
import matplotlib.animation as animation


np.random.seed(5)


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


def generateRandomLines(dt, N):
    dX = np.sqrt(dt) * np.random.randn(1, N)
    X = np.cumsum(dX, axis=1)

    dY = np.sqrt(dt) * np.random.randn(1, N)
    Y = np.cumsum(dY, axis=1)

    lineData = np.vstack((X, Y))

    return lineData


# Returns Line2D objects
def updateLines(num, dataLines, lines):
    for u, v in zip(lines, dataLines):
        u.set_data(v[0:2, :num])

    return lines

N = 501 # Number of points
T = 1.0
dt = T/(N-1)


fig, ax = plt.subplots()

data = [generateRandomLines(dt, N)]

ax = plt.axes(xlim=(-2.0, 2.0), ylim=(-2.0, 2.0))

ax.set_xlabel('X(t)')
ax.set_ylabel('Y(t)')
ax.set_title('2D Discretized Brownian Paths')

## Create a list of line2D objects
lines = [ax.plot(dat[0, 0:1], dat[1, 0:1])[0] for dat in data]


## Create the animation object
anim = animation.FuncAnimation(fig, updateLines, N+1, fargs=(data, lines), interval=30, repeat=True, blit=False)

plt.tight_layout()
plt.show()

## Uncomment to save the animation
#anim.save('brownian2d_1path.mp4', writer=writer)


    



    However, instead of performing the plot the program is printing,
enter image description here

    



    How do I animate this plot ? I am new to python so I apologize in advanced if this is an easy question.

    



    I found this question on http://people.bu.edu/andasari/courses/stochasticmodeling/lecture5/stochasticlecture5.html , there is a walkthrough of how this code came to being.

    


  • Call ffmpeg in c++ with system() function fails

    2 septembre 2014, par zhen lee

    I write a c++ program which needs to convert some(say:10) mp4 videos to flv videos.
    I use ffmpeg in my program for each video like this :

    system("ffmpeg -i video -filter:v yadif -ar 44100 -sameq -y -f flv temp.flv")

    however,it turns out :only first video will be converted successfully,the others will fail.
    it means :
    when i change the input order of which video to convert and re-execution the program,it behave the same:only the first video(will be different each time as i changed the input video order) will be converted successfully.

    The error message like :

    [h264 @ 0xaee0740] concealing 45 DC, 45 AC, 45 MV errors
    [h264 @ 0xaee0ce0] AVC : nal size 305665
    Last message repeated 1 times
    [h264 @ 0xaee0ce0] no frame !
    [h264 @ 0xaee1280] AVC : nal size 572993
    Last message repeated 1 times
    [h264 @ 0xaee1280] no frame !
    [aac @ 0xad9ccc0] channel element 0.13 is not allocated
    Error while decoding stream #0:1
    [aac @ 0xad9ccc0] channel element 0.13 is not allocated
    Error while decoding stream #0:1
    [aac @ 0xad9ccc0] channel element 0.13 is not allocated
    Error while decoding stream #0:1
    ......
    The most strange thing is :when i run ffmpeg command in bash shell,all video will be converted successfully .

    After google it,I have try these(certainly failed) :

    1. remove -sameq option,the result is same ;
    2. write ffmpeg commod in a shell script ConvertToFlv.sh like :

      /usr/local/bin/ffmpeg -i "$dir/$1" -filter:v yadif -ar 44100 -sameq -y -f flv "$dir/temp.fiv"

      then call this script in program like

      system("ConvertToFlv.sh"+video)

      or

      system("sh ConvertToFlv.sh"+video)

      The result is same.

    The ffmpeg configure is :

     ffmpeg version 0.9.1.git Copyright (c) 2000-2012 the FFmpeg developers
     built on Dec 17 2012 16:17:30 with gcc 4.1.2 20080704 (Red Hat 4.1.2-48)
     configuration: --enable-gpl --enable-postproc --enable-nonfree --enable-postproc --enable-swscale --enable-avfilter --enable-pthreads --enable-libxvid --enable-libx264 --enable-libmp3lame --enable-libfaac --disable-ffserver --disable-ffplay
     libavutil      51. 41.100 / 51. 41.100
     libavcodec     54.  4.100 / 54.  4.100
     libavformat    54.  1.100 / 54.  1.100
     libavdevice    53.  4.100 / 53.  4.100
     libavfilter     2. 62.101 /  2. 62.101
     libswscale      2.  1.100 /  2.  1.100
     libswresample   0.  7.100 /  0.  7.100
     libpostproc    52.  0.100 / 52.  0.100

    and my machine envirment is :

    Linux master 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:14 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

    I’m irritable now,I hope someone can give me some advice,really appreciate it.

  • Layer black & white video over background so black pixels are transparent in FFMPEG

    4 février 2018, par Dan Weaver

    I’m trying to blend a video containing black and white animated text over a static background image. I can successfully blend them but no matter what blend mode I use I can’t get the effect I want.

    I’m looking for an effect similar to Photoshop’s ’Add’ blend mode where the color values of each pixel are added together. This results in no change where the top layer (video) has black pixels, effectively making the black background appear transparent.

    This is what I’m trying to achieve :
    enter image description here

    ffmpeg -i text.mp4 -loop 1 -i image.jpg \
    -filter_complex 'blend=all_mode=addition' -t 1 result.mp4

    I tried all the modes of the blend filter but none of them produce this effect. I thought Addition would be the one to work but the resulting video has a pink tint. Maybe there is some mismatch between color channels ?

    How can I get the result I’m looking for ?