
Recherche avancée
Autres articles (61)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...) -
Utilisation et configuration du script
19 janvier 2011, parInformations spécifiques à la distribution Debian
Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
Récupération du script
Le script d’installation peut être récupéré de deux manières différentes.
Via svn en utilisant la commande pour récupérer le code source à jour :
svn co (...)
Sur d’autres sites (6924)
-
Animated line chart with pandas, matplotlib and ffmpeg
10 avril 2020, par Mark KIn producing an animated line chart, I have below data and codes.



But when the chart produced, it shows no line. What did I do wrong ?



Thank you.



import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.animation as animation

title = 'Heroin Overdoses'

data = {'Year' : ["1999","2000","2001","2002","2003","2004","2005","2006","2007","2008","2009","2010","2011","2012","2013","2014","2015","2016"], 
'Heroin Overdoses' : [280,443,413,486,475,148,197,170,448,103,137,160,483,356,352,300,466,278]}
overdose = pd.DataFrame(data)

Writer = animation.writers['ffmpeg']
writer = Writer(fps=20, metadata=dict(artist='Me'), bitrate=1800)

fig = plt.figure(figsize=(10,6))
plt.xlim(1999, 2016)
plt.ylim(np.min(overdose)[0], np.max(overdose)[0])
plt.xlabel('Year',fontsize=20)
plt.ylabel(title,fontsize=20)
plt.title('Heroin Overdoses per Year',fontsize=20)

def animate(i):
 data = overdose.iloc[:int(i+1)] #select data range
 p = sns.lineplot(x=data.index, y=data[title], data=data, color="r")
 p.tick_params(labelsize=17)
 plt.setp(p.lines,linewidth=7)

ani = matplotlib.animation.FuncAnimation(fig, animate, frames=17, repeat=True)

ani.save('C:\\folder\\line chart.mp4', writer=writer)



-
FFMpeg Input link in1:v0 parameters (size > 640x352, SAR 0:1) do not match the corresponding output link in0:v0 > parameters [duplicate]
25 avril 2020, par Android DeveloperI am using below command to concatenate videos-



String command[] = {"-i",inputFile1AbsolutePath,"-i",inputFile2AbsolutePath .....,"-i",inputFileNAbsolutePath,"-filter_complex","[0:v0] [0:a0] [1:v1] [1:a1]...[N:vN] concat=n=N:v=1:a=1 [v] [a],"-map","[v]","-map","[a]", outputFileAbsolutePath};




and got below error-





FAILED with output : ffmpeg version n3.0.1 Copyright (c) 2000-2016 the
 FFmpeg developers
 built with gcc 4.8 (GCC)
 configuration : —target-os=linux
 —cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi-
 —arch=arm —cpu=cortex-a8 —enable-runtime-cpudetect —sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot
 —enable-pic —enable-libx264 —enable-libass —enable-libfreetype —enable-libfribidi —enable-libmp3lame —enable-fontconfig —enable-pthreads —disable-debug —disable-ffserver —enable-version3 —enable-hardcoded-tables —disable-ffplay —disable-ffprobe —enable-gpl —enable-yasm —disable-doc —disable-shared —enable-static —pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config —prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a —extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include
 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' —extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib
 -Wl,-z,relro -Wl,-z,now -pie' —extra-libs='-lpng -lexpat -lm' —extra-cxxflags=
 libavutil 55. 17.103 / 55. 17.103
 libavcodec 57. 24.102 / 57. 24.102
 libavformat 57. 25.100 / 57. 25.100
 libavdevice 57. 0.101 / 57. 0.101
 libavfilter 6. 31.100 / 6. 31.100
 libswscale 4. 0.100 / 4. 0.100
 libswresample 2. 0.101 / 2. 0.101
 libpostproc 54. 0.100 / 54. 0.100
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
 '/storage/emulated/0/Download/g3cm1tt7qtd41.mp4' :
 Metadata :
 major_brand : iso6
 minor_version : 1
 compatible_brands : mp42iso6avc1isom
 creation_time : 2020-01-30 11:13:07
 Duration : 00:00:00.00, start : 0.042667, bitrate : N/A
 Stream #0:0(und) : Video : h264 (Main) (avc1 / 0x31637661), yuv420p,
 854x480 [SAR 2136:2135 DAR 89:50], 1225 kb/s, 30 fps, 30 tbr, 15360
 tbn, 60 tbc (default)
 Stream #0:1(eng) : Audio : aac (LC) (mp4a / 0x6134706D), 48000 Hz,
 stereo, fltp, 128 kb/s (default)
 Input #1, mov,mp4,m4a,3gp,3g2,mj2, from
 '/storage/emulated/0/WhatsApp/Media/WhatsApp
 Video/VID-20200404-WA0000.mp4' :
 Metadata :
 major_brand : mp42
 minor_version : 0
 compatible_brands : mp42isom
 Duration : 00:03:43.14, start : 0.000000, bitrate : 774 kb/s
 Stream #1:0(und) : Video : h264 (Baseline) (avc1 / 0x31637661), yuv420p,
 640x352, 675 kb/s, 29.97 fps, 29.97 tbr, 600 tbn, 1200 tbc (default)
 Stream #1:1(und) : Audio : aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono,
 fltp, 96 kb/s (default)
 [Parsed_concat_0 @ 0xb4529400] Input link in1:v0 parameters (size
 640x352, SAR 0:1) do not match the corresponding output link in0:v0
 parameters (854x480, SAR 2136:2135)
 [Parsed_concat_0 @ 0xb4529400] Failed to configure output pad on
 Parsed_concat_0
 Error configuring complex filters.
 Invalid argument





Seeing this answer i tried using-



[0:v]setsar=1[v0]; [0:a0] [1:v]setsar=1[v1]; [1:a1]




but did not worked !



How can i resolve this ?


-
plot freezedetect and blackdetect graphs ffmpeg
7 juillet 2021, par AnupI want to plot freezedetect and blackdetect responses from ffmpeg onto a graph. Is there any method to do it ?


Example : A line graph with frames/ seconds in the x-axis, that will have a value 1 when no freeze or black screen, and 0 when it detects an anomaly.


Any pointers would be helpful. Thanks in advance.