
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (33)
-
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community. -
Création définitive du canal
12 mars 2010, parLorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
A la validation, vous recevez un email vous invitant donc à créer votre canal.
Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...)
Sur d’autres sites (5672)
-
Background transparency lost on new machine using matplotlib and ffmpeg
23 octobre 2023, par Jan TurowskiI am creating animated physics graphs with a transparent background for later use in a NLE. On my old machine at work they display and render with background transparency just fine. The exact same code however loses background transparency in the ffmpeg render on both my Linux and my Windows machine at home. The animations are displayed just fine on all machines.


As I first thought it was a Linux issue, I tried to run the code on my Windows machine expecting it to work again. Unfortunately it did not.


Reduced code :


import numpy as np
import matplotlib.pylab as plt
from matplotlib.animation import FuncAnimation
import matplotlib.animation as animation
from matplotlib.pyplot import figure
from matplotlib import style
import locale
from matplotlib.ticker import (MultipleLocator, AutoMinorLocator)
# Set to German locale to get comma decimal separater
locale.setlocale(locale.LC_NUMERIC, "de_DE")
# Tell matplotlib to use the locale we set above
plt.rcParams['axes.formatter.use_locale'] = True

# plt.clf()
# plt.rcdefaults()

# Style und Font definieren

style.use('dark_background')

# Pfeile erstellen
def arrowed_spines(fig, ax):

 xmin, xmax = ax.get_xlim()
 ymin, ymax = ax.get_ylim()

 # removing the default axis on all sides:
 for side in ['bottom','right','top','left']:
 ax.spines[side].set_visible(False)

 # removing the axis ticks
 # plt.xticks([]) # labels
 # plt.yticks([])
 # ax.xaxis.set_ticks_position('none') # tick markers
 # ax.yaxis.set_ticks_position('none')

 # get width and height of axes object to compute
 # matching arrowhead length and width
 dps = fig.dpi_scale_trans.inverted()
 bbox = ax.get_window_extent().transformed(dps)
 width, height = bbox.width, bbox.height

 # manual arrowhead width and length
 hw = 1./20.*(ymax-ymin)
 hl = 1./20.*(xmax-xmin)
 lw = 1. # axis line width
 ohg = 0.3 # arrow overhang

 # compute matching arrowhead length and width
 yhw = hw/(ymax-ymin)*(xmax-xmin)* height/width
 yhl = hl/(xmax-xmin)*(ymax-ymin)* width/height

 # draw x and y axis
 ax.arrow(xmin, 0, xmax-xmin, 0., fc='w', ec='w', lw = lw,
 head_width=hw, head_length=hl, overhang = ohg,
 length_includes_head= True, clip_on = False)

 ax.arrow(0, ymin, 0., ymax-ymin, fc='w', ec='w', lw = lw,
 head_width=yhw, head_length=yhl, overhang = ohg,
 length_includes_head= True, clip_on = False)

# Meine easing-Funktion
def ease(n):
 if n < 0.0:
 return 0
 elif n > 1.0:
 return 1
 else:
 return 3*n**2-2*n**3

# Meine Floor/Warte Funktion
def wait(n):
 if n < 0.0:
 return 0
 else:
 return n

# Canvas erstellen
fig = plt.figure()
ax = fig.add_subplot(111)
fig.set_size_inches([8,9])

def f(x):
 return -0.05*x**2+125
xlin = np.linspace(0,60,100)


# Beschriftung und Optik

plt.xlabel(r"$x$ in $\rm{m}$", horizontalalignment='right', x=1.0)
plt.ylabel(r"$y$ in $\rm{m}$", horizontalalignment='right', y=1.0)
ax.set_xlim(0,100)
ax.set_ylim(0,139)
plt.grid(alpha=.4)
plt.xticks(np.arange(0, 100, 20))
plt.yticks(np.arange(0, 140, 20))
ax.yaxis.set_minor_locator(MultipleLocator(10))
ax.xaxis.set_minor_locator(MultipleLocator(10))
ax.tick_params(axis='x', direction = "inout", length= 10.0, which='both', width=3)
ax.tick_params(axis='y', direction = "inout", length= 10.0, which='both', width=3)


xsub = np.array([0])

# statische Linien definieren
line2, = ax.plot(xsub,f(xsub),linewidth=5,zorder=0,c = 'b')
arrowed_spines(fig, ax)
plt.tight_layout()

# Linien animieren
def animate(i):

 xsub = xlin[0:wait(i-20)]
 global line2
 line2.remove()
 line2, = ax.plot(xsub, f(xsub), linewidth=5, zorder=0,c = "b")
 plt.tight_layout()

animation = FuncAnimation(fig, animate, np.arange(0, 130, 1), interval=100)

plt.show()

# animation.save(r"YOUR\PATH\HERE\reduced_x-y.mov", codec="png",
 dpi=100, bitrate=-1,
 savefig_kwargs={'transparent': True, 'facecolor': 'none'})




-
How to set background transparency for animation with ffmpeg
23 octobre 2023, par Jan TurowskiI am creating animated physics graphs with a transparent background for later use in a NLE. On my old machine at work they display and render with background transparency just fine. The exact same code however loses background transparency in the ffmpeg render on both my Linux and my Windows machine at home. The animations are displayed just fine on all machines.


As I first thought it was a Linux issue, I tried to run the code on my Windows machine expecting it to work again. Unfortunately it did not.


Reduced code :


import numpy as np
import matplotlib.pylab as plt
from matplotlib.animation import FuncAnimation
import matplotlib.animation as animation
from matplotlib.pyplot import figure
from matplotlib import style
import locale
from matplotlib.ticker import (MultipleLocator, AutoMinorLocator)
# Set to German locale to get comma decimal separater
locale.setlocale(locale.LC_NUMERIC, "de_DE")
# Tell matplotlib to use the locale we set above
plt.rcParams['axes.formatter.use_locale'] = True

# plt.clf()
# plt.rcdefaults()

# Style und Font definieren

style.use('dark_background')

# Pfeile erstellen
def arrowed_spines(fig, ax):

 xmin, xmax = ax.get_xlim()
 ymin, ymax = ax.get_ylim()

 # removing the default axis on all sides:
 for side in ['bottom','right','top','left']:
 ax.spines[side].set_visible(False)

 # removing the axis ticks
 # plt.xticks([]) # labels
 # plt.yticks([])
 # ax.xaxis.set_ticks_position('none') # tick markers
 # ax.yaxis.set_ticks_position('none')

 # get width and height of axes object to compute
 # matching arrowhead length and width
 dps = fig.dpi_scale_trans.inverted()
 bbox = ax.get_window_extent().transformed(dps)
 width, height = bbox.width, bbox.height

 # manual arrowhead width and length
 hw = 1./20.*(ymax-ymin)
 hl = 1./20.*(xmax-xmin)
 lw = 1. # axis line width
 ohg = 0.3 # arrow overhang

 # compute matching arrowhead length and width
 yhw = hw/(ymax-ymin)*(xmax-xmin)* height/width
 yhl = hl/(xmax-xmin)*(ymax-ymin)* width/height

 # draw x and y axis
 ax.arrow(xmin, 0, xmax-xmin, 0., fc='w', ec='w', lw = lw,
 head_width=hw, head_length=hl, overhang = ohg,
 length_includes_head= True, clip_on = False)

 ax.arrow(0, ymin, 0., ymax-ymin, fc='w', ec='w', lw = lw,
 head_width=yhw, head_length=yhl, overhang = ohg,
 length_includes_head= True, clip_on = False)

# Meine easing-Funktion
def ease(n):
 if n < 0.0:
 return 0
 elif n > 1.0:
 return 1
 else:
 return 3*n**2-2*n**3

# Meine Floor/Warte Funktion
def wait(n):
 if n < 0.0:
 return 0
 else:
 return n

# Canvas erstellen
fig = plt.figure()
ax = fig.add_subplot(111)
fig.set_size_inches([8,9])

def f(x):
 return -0.05*x**2+125
xlin = np.linspace(0,60,100)


# Beschriftung und Optik

plt.xlabel(r"$x$ in $\rm{m}$", horizontalalignment='right', x=1.0)
plt.ylabel(r"$y$ in $\rm{m}$", horizontalalignment='right', y=1.0)
ax.set_xlim(0,100)
ax.set_ylim(0,139)
plt.grid(alpha=.4)
plt.xticks(np.arange(0, 100, 20))
plt.yticks(np.arange(0, 140, 20))
ax.yaxis.set_minor_locator(MultipleLocator(10))
ax.xaxis.set_minor_locator(MultipleLocator(10))
ax.tick_params(axis='x', direction = "inout", length= 10.0, which='both', width=3)
ax.tick_params(axis='y', direction = "inout", length= 10.0, which='both', width=3)


xsub = np.array([0])

# statische Linien definieren
line2, = ax.plot(xsub,f(xsub),linewidth=5,zorder=0,c = 'b')
arrowed_spines(fig, ax)
plt.tight_layout()

# Linien animieren
def animate(i):

 xsub = xlin[0:wait(i-20)]
 global line2
 line2.remove()
 line2, = ax.plot(xsub, f(xsub), linewidth=5, zorder=0,c = "b")
 plt.tight_layout()

animation = FuncAnimation(fig, animate, np.arange(0, 130, 1), interval=100)

plt.show()

# animation.save(r"YOUR\PATH\HERE\reduced_x-y.mov", codec="png",
 dpi=100, bitrate=-1,
 savefig_kwargs={'transparent': True, 'facecolor': 'none'})




-
Monitoring ffmpeg two-passes encoding
31 décembre 2024, par HodolI'm new in FFMPEG.


According to the official guide, https://trac.ffmpeg.org/wiki/Encode/VP9 I use the following command to convert a large h.264 file :


ffmpeg -i input.mp4 -c:v libvpx-vp9 -b:v 0 -crf 30 -pass 1 -an -f null /dev/null
ffmpeg -i input.mp4 -c:v libvpx-vp9 -b:v 0 -crf 30 -pass 2 -c:a libopus output.webm



However, the pass-1 takes too long time and it does not log progress. With
-report
option I can see something is in progress but I don't know how long I should wait.

Here's questions :


- 

- Is there any way to see the progress of 1-pass ?
- Is there any way to speed up the process ?






Thank you,