
Recherche avancée
Médias (1)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (64)
-
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 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, parMediaSPIP 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 (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains 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 ;
Sur d’autres sites (11189)
-
FFmpeg trim filter fails to use sexagisimal time specification and the output stream is empty. Is it a bug and is there a fix ?
29 novembre 2020, par Link-akroWith ffmpeg the
trim
filter (or its audio variantatrim
) malfunctions whenever i try to write a sexagesimal time specification for the boundaries or duration parameters of the filter : the result is always an empty stream.

According to the documentation i already linked, which was generated on November 26, 2020 so far, the time duration specification should be supported.




start, end, and duration are expressed as time duration specifications




Quote of the spec.




[-][HH :]MM:SS[.m...]






[-]S+[.m...][s|ms|us]




I am working in a Windows_10-64bit and scripting in its CMD.exe command-line, should it matter.


Here is an instance of trimming a video stream out of a media file with hardcoded value for simplicity. The audio is retained unless i use
atrim
as well.
We may or may not append thesetpts
filter as recommended in the documentation henceforthsetpts=PTS-STARTPTS
if we want to shift the stream to start at the beginning of the cut range.

ffmpeg -i sample-counter.mp4 -vf "trim=start=start='1:2':end='1:5'" sample-counter-trimmed.mp4



If i use decimal it works as intended.


ffmpeg -i sample-counter.mp4 -vf "trim=start=start='2':end='5'" sample-counter-trimmed.mp4



This is the banner of my ffmpeg build. We may see it is the latest build by gyan.dev at the moment i post this.


ffmpeg version 4.3.1-2020-11-19-full_build-www.gyan.dev Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 10.2.0 (Rev5, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint



The incorrect stream is always reported as 0kB weight in the output of ffmpeg. I confirmed with
ffprobe Movie_Countdown-trim-2-5.mov -show_streams -show_entries format=duration
that the incorrect stream is duration zero.

Should i report it as a bug ? Is there some correction or workaround ?


I would rather a solution with the trim filter itself, but if not possible a CMD batch scripting.
We should not need a different filter like select or seeking option like there are tutorials and questions/answers everywhere already. Scripting would be straight-forward in a proper *nix shell+distrib and taught everywhere so it is not worth caring while CMD answers on the other hand are rare so a scripting workaround for CMD would have some microcosmic worth since making one is considerably less straight-forward than a shell with modern mathematics and parsing abilities built-in or packaged.


-
ffmpeg burned-in subtitles render in the wrong font
21 août 2024, par dv151Trying to burn in subtitles to a video in FFMPEG in GothamProBold font. No matter what I do it keeps reverting to Helvetica. From the console, I see that FFMPEG seems to load the font without error. Then switches over to font provider "coretext"


[Parsed_subtitles_0 @ 0x7fed054048c0] Loading font file '/Projects/Fonts/GothaProBol.otf'
[Parsed_subtitles_0 @ 0x7fed054048c0] Using font provider coretext
[Parsed_subtitles_0 @ 0x7fed054048c0] fontselect: (GothaProBol.otf, 400, 0) -> /System/Library/Fonts/Helvetica.ttc, -1, Helvetica



It seems like it has my font loaded, then loads what is likely a system default of Helvetica instead. My guess is that my chosen font isn't actually loading after all.


FFMPEG command (called from python) is as follows :


ffmpeg_cmd = ["ffmpeg", 
 "-i", self.source_video_uri, 
 "-y",
 "-c:v", "prores", "-profile:v", "1", 
 "-c:a", "pcm_s16be", 
 "-vf", f"subtitles={srt_uri}:fontsdir=/Projects/Fonts:force_style='Fontname=GothaProBol.otf'",
 f"{self.source_video_uri}_render.mov"]

subprocess.call(ffmpeg_cmd)



Any ideas ?


UPDATE : Found this setting in libass header file "ass.h" - which ffmpeg calls when using the subtitle filter. Don't know how to actually set this variable when ffmpeg calls libass, but here it is. Line 182 :


* \brief Default Font provider to load fonts in libass' database
 *
 * NONE don't use any default font provider for font lookup
 * AUTODETECT use the first available font provider
 * CORETEXT force a CoreText based font provider (OS X only)
 * FONTCONFIG force a Fontconfig based font provider
 *
 * libass uses the best shaper available by default.
 */
typedef enum {
 ASS_FONTPROVIDER_NONE = 0,
 ASS_FONTPROVIDER_AUTODETECT = 1,
 ASS_FONTPROVIDER_CORETEXT,
 ASS_FONTPROVIDER_FONTCONFIG,
 ASS_FONTPROVIDER_DIRECTWRITE,
} ASS_DefaultFontProvider;



RE : ANSWER BELOW : For the most part, it seems that if your font is installed in /System/Fonts or /Library/Fonts then CoreText can find it. Though in some cases, the naming conventions can be quite particular and non-intuitive. It also can't seem to find all fonts, necessarily.


For example : Gotham Pro Bold, in the /Library/Fonts folder on my system, file named "GothaProBol.otf" is correctly passed to fontname as : GothamPro-Bold or just Gotham Pro. Gotham Pro Bold, GothamPro, Gotham Pro-Bold, GothaProBol, and GothaProBol.otf do NOT work.


For most fonts it seems the preferred convention is FontName-Style/Weight as displayed in Mac OS's FontBook, not the filename.


That said, I have a novelty 'Game of Thrones.ttf' font in the same folder as Gotham Pro, and I can't get CoreText to connect to it under any of the above naming conventions.


-
How to visualize matplotlib animation in Jupyter notebook
23 avril 2020, par anonymous13I am trying to create a racing bar chart similar to the one in the link (https://towardsdatascience.com/bar-chart-race-in-python-with-matplotlib-8e687a5c8a41). 
However I am unable to see the animation in my Jupyter notebook



code



import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import matplotlib.animation as animation
from IPython.display import HTML

df = pd.read_csv('https://gist.githubusercontent.com/johnburnmurdoch/4199dbe55095c3e13de8d5b2e5e5307a/raw/fa018b25c24b7b5f47fd0568937ff6c04e384786/city_populations', 
 usecols=['name', 'group', 'year', 'value'])

current_year = 2018
dff = (df[df['year'].eq(current_year)]
 .sort_values(by='value', ascending=True)
 .head(10))

colors = dict(zip(
 ['India', 'Europe', 'Asia', 'Latin America',
 'Middle East', 'North America', 'Africa'],
 ['#adb0ff', '#ffb3ff', '#90d595', '#e48381',
 '#aafbff', '#f7bb5f', '#eafb50']
))
group_lk = df.set_index('name')['group'].to_dict()


fig, ax = plt.subplots(figsize=(15, 8))
def draw_barchart(year):
 dff = df[df['year'].eq(year)].sort_values(by='value', ascending=True).tail(10)
 ax.clear()
 ax.barh(dff['name'], dff['value'], color=[colors[group_lk[x]] for x in dff['name']])
 dx = dff['value'].max() / 200
 for i, (value, name) in enumerate(zip(dff['value'], dff['name'])):
 ax.text(value-dx, i, name, size=14, weight=600, ha='right', va='bottom')
 ax.text(value-dx, i-.25, group_lk[name], size=10, color='#444444', ha='right', va='baseline')
 ax.text(value+dx, i, f'{value:,.0f}', size=14, ha='left', va='center')
 # ... polished styles
 ax.text(1, 0.4, year, transform=ax.transAxes, color='#777777', size=46, ha='right', weight=800)
 ax.text(0, 1.06, 'Population (thousands)', transform=ax.transAxes, size=12, color='#777777')
 ax.xaxis.set_major_formatter(ticker.StrMethodFormatter('{x:,.0f}'))
 ax.xaxis.set_ticks_position('top')
 ax.tick_params(axis='x', colors='#777777', labelsize=12)
 ax.set_yticks([])
 ax.margins(0, 0.01)
 ax.grid(which='major', axis='x', linestyle='-')
 ax.set_axisbelow(True)
 ax.text(0, 1.12, 'The most populous cities in the world from 1500 to 2018',
 transform=ax.transAxes, size=24, weight=600, ha='left')
 ax.text(1, 0, 'by @pratapvardhan; credit @jburnmurdoch', transform=ax.transAxes, ha='right',
 color='#777777', bbox=dict(facecolor='white', alpha=0.8, edgecolor='white'))
 plt.box(False)

draw_barchart(2018)

import matplotlib.animation as animation
from IPython.display import HTML
fig, ax = plt.subplots(figsize=(15, 8))
animator = animation.FuncAnimation(fig, draw_barchart, frames=range(1968, 2019))
HTML(animator.to_jshtml()) 





Below is what I tried using and the errors



HTML(animator.to_jshtml()) <-- Static output with buttons unable to visualize animation
plt.rcParams["animation.html"] = "jshtml" <- no error and output
HTML(animator.to_html5_video()) <---Requested MovieWriter (ffmpeg) not available 





Note I have FFmpeg installed in my system.
Can you help me with the issue