
Recherche avancée
Autres articles (51)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;
Sur d’autres sites (6983)
-
using ffmpeg/ffprobe to create a waveform json using php
7 mars 2015, par edwardsmarkfI have many ogg & opus files on my server and need to generate json-waveform numeric arrays on an as-needed basis (example below).
recently i discovered the node based waveform-util which uses ffmpeg/ffprobe for rendering a JSON waveform and it works perfectly. i am undecided if having a node process constantly running is the optimum solution to my issue.
since ffmpeg seems to be able to handle anything i can throw at it, i wish to stick with an ffmpeg solution.
i have three questions :
1) is there a php equivalent ? i have found a couple that generate PNG images but not one that generates JSON-waveform numeric arrays
2) are there any significant advantages of going with the node-based solution rather than a php based solution (assuming there is a php based solution) ?
3) is there a way using CLI ffmpeg/ffprobe to generate a json-waveform ? i saw all the -show_ options (-show_data, -show_streams, -show_frames) but nothing looked like it produced what i am looking for.
the json-waveform needs to be in this format :
[ 0.0002, 0.001, 0.15, 0.14, 0.356 .... ]
thank you all.
-
FFMpeg Command work in command line, but not in python script. (Semi Solved)
20 février 2015, par FooldjOkay, kind of a weird problem. But I’m not sure whether it’s python, ffmpeg, or some stupid thing I’m doing wrong.
I’m trying to take a video, and take 1 frame a second, and output that frame to an image. Right now, if i use the command line with ffmpeg :
ffmpeg -i test.avi -r 1 -f image2 image-%3d.jpeg -pix_fmt rgb24 -vcodec rawrvideo
It outputs about 10 images, the images look fine, awesome. Now I have this code (right now some code from some github, as I wanted stuff that i was relatively sure would work, and mine is allll convoluted)
import subprocess as sp
import numpy as np
import re
import cv2
import time
FFMPEG_BIN = r'ffmpeg.exe'
INPUT_VID = 'test.avi'
def getInfo():
command = [FFMPEG_BIN,'-i', INPUT_VID, '-']
pipe = sp.Popen(command, stdout=sp.PIPE, stderr=sp.PIPE)
pipe.stdout.readline()
pipe.terminate()
infos = pipe.stderr.read()
infos_list = infos.split('\r\n')
res = re.search(' \d+x\d+ ',infos)
res = [int(x) for x in res.group(0).split('x')]
return res
res = getInfo()
command = [ FFMPEG_BIN,
'-i', INPUT_VID,
'-f', 'image2pipe',
'-pix_fmt', 'rgb24',
'-vcodec', 'rawvideo', '-']
pipe = sp.Popen(command, stdout = sp.PIPE, bufsize=10**8)
n = 0
im2 = []
try:
mog = cv2.BackgroundSubtractorMOG2(120,2,True)
while True:
raw_image = pipe.stdout.read(res[0]*res[1]*3)
# transform the byte read into a numpy array
image = np.fromstring(raw_image, dtype='uint8')
image = image.reshape((res[1],res[0],3))
rgbImg = image.copy()
fname = ('_tmp%03d.png'%time.time())
cv2.imwrite(fname, rgbImg)
# throw away the data in the pipe's buffer.
#pipe.stdout.flush()
n += 1
print n
except:
print 'done',n
pipe.kill()
cv2.destroyAllWindows()When I run this, I get 10 images, but they all have a Blue Tint ! I cannot for the life of me figure out why. I’ve done tons of searches, I’ve tried quite a few different codecs (usually just messes things up worse). The media info for the video file is here :
General
Complete name : test.avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 85.0 KiB
Duration : 133ms
Overall bit rate : 5 235 Kbps
Video
ID : 0
Format : JPEG
Codec ID : MJPG
Duration : 133ms
Bit rate : 1 240 Kbps
Width : 640 pixels
Height : 480 pixels
Display aspect ratio : 4:3
Frame rate : 30.000 fps
Color space : YUV
Chroma subsampling : 4:2:2
Bit depth : 8 bits
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.135
Stream size : 20.1 KiB (24%)Any suggestions ? It seems like it should be an RGB mixup...just not sure where at...
EDIT : So I fixed the problem by switching the blue and red channels with this code :
bChannel = rgbImg[ :, :,0]
rChannel = rgbImg[ :, :,2]
gChannel = rgbImg[ :, :,1]rgbArray = np.zeros((res[1],res[0],3), 'uint8')
rgbArray[...,0] = rChannel
rgbArray[...,1] = gChannel
rgbArray[...,2] = bChannelSo I guess this is now a question of, why is python mixing up these channels ? Is it a problem with python, or ffmpeg, the codec ?
Thanks !
-
Error using javacv library for live streaming camera to server
22 juin 2015, par Prathyush KumarI am new to live-streaming i’m following this link
here for implementing camera streaming to server with ffserver listening onport 8090
.But my code breaks at this linepublic void startRecording() {
try {
recorder.start(); //breaks here
startTime = System.currentTimeMillis();
recording = true;
audioThread.start();
} catch (FFmpegFrameRecorder.Exception e) {
e.printStackTrace();
}
}I debugged a little bit to find out what is happening and i found out in this line in
FFmpegFrameRecorder.class
if((this.oformat.flags() & 1) == 0) {
AVIOContext pb1 = new AVIOContext((Pointer)null);
if((ret = avformat.avio_open(pb1, this.filename, 2)) < 0) {//throwing exception here
this.release();
throw new Exception("avio_open error() error " + ret + ": Could not open \'" + this.filename + "\'");
}
this.oc.pb(pb1);
}ret is -5 which is less than 0 and so it cannot open the file(rtmp ://live:live@192.168.0.115:8090/live/test.flv).
I am not able to understand whats happening in avformat.class Please help
Is this any configuration problem for ffserver or is it anything else ?I’m not able to figure this out please any help would be greatly appreciated.