
Recherche avancée
Autres articles (38)
-
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.
Sur d’autres sites (8033)
-
fftools/ffmpeg : clean up #includes
25 mars 2023, par Anton Khirnov -
How do i write/replace frames in an existing video ?
7 novembre 2014, par RuchirI am doing a code on video steganography. I have written the following code :
def video_write(msg,enc_key) :
FFMPEG_BIN = "ffmpeg.exe"
import subprocess as sp
command = [ FFMPEG_BIN,
’-i’, ’vidfl.mp4’,
’-f’, ’image2pipe’,
’-pix_fmt’, ’rgb24’,
’-vcodec’, ’rawvideo’, ’-’]
pipe = sp.Popen(command, stdout = sp.PIPE,bufsize=10**8)
import math
import numpy as np
# read 1280*720*3 bytes (= 1 frame)
raw_image = pipe.stdout.read(1280*720*3)
# transform the byte read into a numpy array
image = np.fromstring(raw_image, dtype=’uint8’)
# throw away the data in the pipe’s buffer.
pipe.stdout.flush()
image = image.reshape((720,1280,3))
image1= np.full(1280*720*3,0,int)
image1 = image1.reshape((720,1280,3))
for i in range(0,720) :
for j in range(0,1280) :
for k in range(0,3) :
image1[i,j,k]="%08d" % int(bin(image[i,j,k])[2 :])Data Hiding
c=0
for i in msg:
c=c+1
msg_arr=np.full(c,'r',str)
r=0
for i in msg:
msg_arr[r]=i
r=r+1
msg_arrn=np.full(c,0,int)
k=0
for i in msg_arr:
msg_arrn[k]=ord(i)
k=k+1
msg_len=str(c)
length=0
for i in msg_len:
length=length+1
if length<7:
padtext= 7- length
for i in range(0,padtext):
msg_len='0'+msg_len
msg_head='t'+msg_len
msg_temp_head= msg_head+msg
l=c+padtext+2
msg_temp_arr=np.full(l,0,int)
for i in range(0,l):
msg_temp_arr[i]=ord(msg_temp_head[i])
msg_enc=np.full(l,0,int)
for i in range(0,l):
msg_enc[i]=int(bin(msg_temp_arr[i]^enc_key)[2:])
rm = 0; gm = 0; bm = 0;
rn = 0; gn = 0; bn = 0;
maxM=720
maxN=1280
z=0
for z in range(0,l):
tempcode= msg_enc[z]
dgts= int(math.log10(tempcode))+1
if dgts<8:
pad= 8- dgts
tempcode= str(tempcode)
for i in range(0,pad):
tempcode='0'+tempcode
a=int(tempcode[0])
if a==0:
image[rm,rn,0]= image[rm,rn,0] & 254
else:
image[rm,rn,0]= image[rm,rn,0]|1
rm= rm+1
if rm>maxM:
rn=rn+1
rm=0
a=int(tempcode[1])
if a==0:
image[gm,gn,1]= image[gm,gn,1]&254
else:
image[gm,gn,1]= image[gm,gn,1]|1
gm=gm+1
if gm>maxM:
gn=gn+1
gm=0
a=int(tempcode[2])
if a==0:
image[bm,bn,2]= image[bm,bn,2]&254
else:
image[bm,bn,2]= image[bm,bn,2]|1
bm=bm+1
if bm>maxM:
bn=bn+1
bm=0
a=int(tempcode[3])
if a==0:
image[bm,bn,2]= image[bm,bn,2]&254
else:
image[bm,bn,2]= image[bm,bn,2]|1
bm=bm+1
if bm>maxM:
bn=bn+1
bm=0
a=int(tempcode[4])
if a==0:
image[gm,gn,1]= image[gm,gn,1]&254
else:
image[gm,gn,1]= image[gm,gn,1]|1
gm=gm+1
if gm>maxM:
gn=gn+1
gm=0
a=int(tempcode[5])
if a==0:
image[rm,rn,0]= image[rm,rn,0] & 254
else:
image[rm,rn,0]= image[rm,rn,0]|1
rm= rm+1
if rm>maxM:
rn=rn+1
rm=0
a=int(tempcode[6])
if a==0:
image[rm,rn,0]= image[rm,rn,0] & 254
else:
image[rm,rn,0]= image[rm,rn,0]|1
rm= rm+1
if rm>maxM:
rn=rn+1
rm=0
a=int(tempcode[7])
if a==0:
image[gm,gn,1]= image[gm,gn,1]&254
else:
image[gm,gn,1]= image[gm,gn,1]|1
gm=gm+1
if gm>maxM:
gn=gn+1
gm=0Replace first frame of an existing video ’vidfl_test.mp4’ with frame image.
command = [ FFMPEG_BIN,
'-y', # (optional) overwrite output file if it exists
'-f', 'rawvideo',
'-vcodec','rawvideo',
'-s', 'hd720', # size of one frame
'-pix_fmt', 'rgb24',
'-r', '15', # frames per second
'-i', '-', # The input comes from a pipe
'-an', # Tells FFMPEG not to expect any audio
'-vcodec', 'mpeg',
'vidfl_test.mp4' ]
pipe = sp.Popen( command, stdin=sp.PIPE, stderr=sp.PIPE)
pipe.stdin.write(image.tostring())This code does not write any frames in the video ’vidfl_test.mp4’. Please help me out with the writing frame in video part of the code.
-
avcodec/simple_idct : use predefined M_SQRT2
14 novembre 2015, par Ganesh Ajjanagaddeavcodec/simple_idct : use predefined M_SQRT2
M_SQRT2 is defined in math.h, or in avutil/mathematics.h for
compatibility hacks. This uses this value instead of a floating literal.Fixed point values produced by C_FIX(), R_FIX() remain identical.
Reviewed-by : Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by : Ganesh Ajjanagadde <gajjanagadde@gmail.com>