
Recherche avancée
Autres articles (62)
-
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 (...) -
(Dés)Activation de fonctionnalités (plugins)
18 février 2011, parPour 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 (...) -
Activation de l’inscription des visiteurs
12 avril 2011, parIl est également possible d’activer l’inscription des visiteurs ce qui permettra à tout un chacun d’ouvrir soit même un compte sur le canal en question dans le cadre de projets ouverts par exemple.
Pour ce faire, il suffit d’aller dans l’espace de configuration du site en choisissant le sous menus "Gestion des utilisateurs". Le premier formulaire visible correspond à cette fonctionnalité.
Par défaut, MediaSPIP a créé lors de son initialisation un élément de menu dans le menu du haut de la page menant (...)
Sur d’autres sites (10137)
-
Encrypting a video file with the 3DES algorithm
14 mai 2022, par Roro98I am encrypting a video file using 3DES algorithm and ffmpeg library.In my program, I use two channels, each connected to its own instance of FFmpeg. Basically, I tried to read the images one by one from the input pipe, invert the color of each pixel with the 3DES algorithm, then write the modified images to the output pipe. The input video I'm using is mp4 type, but I have a segmantation problem Can someone help me ?


#include 
#include 
#include 
#include 
#include 
//#include "key.txt"
#define W 720
#define H 720
unsigned char frame[H][W][3] = {0}; 
unsigned char frame0[H][W][3] = {0}; 
FILE* out;
int LEFT[17][32], RIGHT[17][32];
int IPpixel[64];
int EXPpixel[48];
int XORpixel[48];
int X[8][6];
int X2[32];
int R[32];
int key56bit[56];
int key48bit[17][48];
int CIPHER[64];
int ENCRYPTED[64];
 
 int main()
 { 
 int x,y,count;
 int32_t L , R ;
 FILE *pipein0 = popen("ffmpeg -i video2.mp4 -f image2pipe -vcodec rawvideo -pix_fmt rgb24 -", "r");
 out = popen("ffmpeg -y -f rawvideo -vcodec rawvideo -pix_fmt rgb24 -s 1280x720 -r 25 -i - -f mp4 -q:v 5 -an -vcodec mpeg4 output1.mp4", "wb"); 
 fclose(out);
 out = fopen("decrypted.txt", "wb+");
 fclose(out);
 out = fopen("cipher.txt", "wb+");
 fclose(out);
 create16Keys();
 while(1)
 {
 // Read a frame from the input pipe into the buffer
 count = fread(frame, 1, H*W*3, pipein0);
 if (count != H*W*3) break;
 // Process this frame
 for (y=0 ; y<h for="for"></h>///****** il faut divise la valeur de pixel et prandre le left of value and the rigth of value*************////
 L =frame[y][x][0];///red
 R= frame[y][x][0];
 long int n1 = findFileSize() / 8;
 convertCharToBit(n1);
 encrypt(n1);
 decrypt(n1);
 frame[y][x][0]=L & R;
 L =frame[y][x][1];///green
 R= frame[y][x][1];
 long int n2 = findFileSize() / 8;
 convertCharToBit(n2);
 encrypt(n2);
 decrypt(n2); 
 frame[y][x][1]=L & R; 
 L =frame[y][x][2];///blue
 R= frame[y][x][2];
 long int n3 = findFileSize() / 8;
 convertCharToBit(n3);
 encrypt(n3);
 decrypt(n3);
 frame[y][x][2]=L & R;
 fwrite(frame0, 1, H*W*3, out);
 }
 }
 fflush(pipein0);
 pclose(pipein0);
 fflush(out);
 pclose(out);
 return 0;
 }



-
create video editor error stream specifier [on hold]
25 mai 2018, par OussamaI am a beginner in ffmpeg, and I started by creating a video editor, but I encountered an error while executing an ffmpeg command :
’Stream specifier’ ’ in filtergraph description .... matches no streams’
Here is the command :
’ffmpeg -y -i icone1.jpg -i icone2.jpg -i icone3.jpg -i icone4.jpg -loop 1 -framerate 24 -t 5 -i image1.jpg -loop 1 -framerate 24 -t 5 -i image2.jpg -i song.mp3 -filter_complex " color=black@0:1365x701,format=yuva444p[c0] ; color=black@0:1365x701,format=yuva444p[c1] ; [c0][4]scale2ref[ct0][mv0] ; [c1][5]scale2ref[ct1][mv1] ; [ct0]setsar=1,split=2[t00][t01] ; [ct1]setsar=1,split=1[t10] ; [t00]drawtext=fontfile=’arial’:text=’azaazzaza’:fontcolor=red:fontsize=30[tfi00] ; [t01]drawtext=fontfile=’arial’:text=’drtgfh’:fontcolor=red:fontsize=30[tfi01] ; [t10]drawtext=fontfile=’arial’:text=’uygfdsdsqds’:fontcolor=blue:fontsize=30[tfi10] ; [mv0][tfi00]overlay=x=55.0000:y=12.0000:shortest=1[mv0] ; [mv0][tfi01]overlay=x=55.0000:y=12.0000:shortest=1[mv0] ; [mv1][tfi10]overlay=x=55.0000:y=55.0000:shortest=1[mv1] ; [0]scale=500:500,setsar=sar=1[img0] ; [1]scale=500:500,setsar=sar=1[img1] ; [2]scale=40:50,setsar=sar=1[img2] ; [3]scale=500:500,setsar=sar=1[img3] ; [mv0][img0]overlay=20.0000:20.0000[mv01] ; [mv01][img1]overlay=12.0000:12.0000[mv02] ; [mv1][img2]overlay=20.0000:12.0000[mv12] ; [mv12][img3]overlay=55.0000:12.0000[mv13] ; [mv02]scale=1280:720,setsar=sar=1[fram0] ; [mv13]scale=1280:720,setsar=sar=1[fram1] ; [5]atrim=duration=10[a1] ; [fram0][fram1]concat=n=2:v=1:a=0[all]" -map [all] -map [a1] video-8.mp4’
-
How do I properly save an animation involving circles with matplotlib.animation and ffmpeg ?
12 juillet 2020, par bghostI recently tried out matplotlib.animation, and it's a wonderful tool. I can now make and save basic animations (ie that only involve straight lines) without any issues. However, when I made an animation involving circles, even though the interactive display was perfect, the saved mp4 file wasn't really satisfying. In the mp4 file, the edges of the circles were blurred, and if the circles were made semi-transparent (ie with an alpha value < 1), they all suddenly became completely opaque after a couple of frames. I suspected it was due to the fact that my bitrate wasn't high enough, but I went up to 10000 kb/s (instead of 1800), and exactly the same phenomenon occurred.


What can be done to solve these 2 issues (blurred edges + negated transparency) in the generated mp4 file ?


Here is a simple animation that describes what I just said :


import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation

fig = plt.figure(figsize=(11, 7))
ax = plt.axes(xlim=(-1.2, 1.2), ylim=(-0.7, 0.7))
ax.set_aspect('equal')

dict_circles = {}
dict_circles['ring'] = plt.Circle((-0.5, 0), 0.5, color='b', lw=2, fill=False)
dict_circles['disk'] = plt.Circle((-0.5, 0), 0.5, color='b', alpha=0.2)

def init():
 for circle in dict_circles.values():
 ax.add_patch(circle)
 return(dict_circles.values())

nb_frames = 100
X_center = np.linspace(-0.5, 0.5, nb_frames)

def animate(frame):
 for circle in dict_circles.values():
 circle.center = (X_center[frame], 0)
 ax.add_patch(circle)
 return(dict_circles.values())

ani = animation.FuncAnimation(fig, animate, init_func=init, frames=nb_frames, blit=True, interval=10, repeat=False)
plt.show()

plt.rcParams['animation.ffmpeg_path'] = 'C:\\ffmpeg\\bin\\ffmpeg.exe'
Writer = animation.writers['ffmpeg']
writer_ref = Writer(fps=15, bitrate=1800)

ani.save('Blue circle.mp4', writer=writer_ref)