
Recherche avancée
Médias (91)
-
Chuck D with Fine Arts Militia - No Meaning No
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Paul Westerberg - Looking Up in Heaven
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Le Tigre - Fake French
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Thievery Corporation - DC 3000
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Dan the Automator - Relaxation Spa Treatment
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Gilberto Gil - Oslodum
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (89)
-
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...) -
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...)
Sur d’autres sites (4638)
-
ClassX installation "codec not found" due to dependencies [migrated]
25 mars 2014, par khateebClassX is an interactive lecture streaming system developed in the Electrical Engineering Department at Stanford University.
Unlike conventional lecture capturing systems, ClassX requires very simple consumer-grade equipment and minimal human operation.I faced problems during installing it, I hope you have a solution.
BTW : I successfully installed it 2 years ago, but now I think the problem as the dependencies and Ubuntu versions are different than the versions we used two years ago.
Detailed description of the problem :
- I'm using Ubuntu 12.04
- I followed the instructions @ ClassX installation guide, and all steps till step 4 are successfully done (the encoder bin file generated).
- When trying to encode the video using the classX web system, it shows the encoding completed after few seconds.However, there are no tiles generated.
-
I tried to execute the command at CX_log.txt, and the following error appears.
mahmoud@Mahmoud-HP-Pavilion-dv5-Notebook-PC : $ sudo perl /var/www/ClassXWebSystem/system/publishers/web/actions/encode.pl "/var/www/ClassXWebSystem/content/encoding/FALL_2013_2014/CS106A_FALL_2013_2014/lecSEven" "/var/www/ClassXWebSystem/content/encoding/FALL_2013_2014/CS106A_FALL_2013_2014/.encoding_1372706251" "/var/www/ClassXWebSystem/content/streaming/FALL_2013_2014/CS106A_FALL_2013_2014/lecSEven" "/var/www/ClassXWebSystem/system/publishers/bin" classx y n n
[sudo] password for mahmoud :
00068.jpg
..
.
00068.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/ClassXWebSystem/content/encoding/FALL_2013_2014/CS106A_FALL_2013_2014/.encoding_1372706251/00068.mp4' :
Metadata :
major_brand : isom
minor_version : 512
compatible_brands : isomiso2avc1mp41
encoder : Lavf52.39.0
Duration : 00:02:30.05, start : 0.000000, bitrate : 8141 kb/s
Stream #0.0(und) : Video : h264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 8007 kb/s, 29.95 fps, 29.97 tbr, 2997 tbn, 59.94 tbc
Stream #0.1(und) : Audio : aac, 44100 Hz, stereo, s16, 128 kb/s
Output #0, mp4, to '/var/www/ClassXWebSystem/content/encoding/FALL_2013_2014/CS106A_FALL_2013_2014/.encoding_1372706251/stream0.mp4' :
Stream #0.0 : Video : [0][0][0][0] / 0x0000, yuv420p, 640x360, q=32-36, 64 kb/s, 90k tbn, 14.99 tbc
codec not found
-
Writing frames from camera using skvideo.io.FFmpegWriter
28 juin 2018, par Liam DeaconI’m trying to finely control the video encoding of camera image frames captured on the fly using
skvideo.io.FFmpegWriter
andcv2.VideoCapture
, e.g.from skvideo import io
import cv2
fps = 60
stream = cv2.VideoCapture(0) # 0 is for /dev/video0
print("fps: {}".format(stream.set(cv2.CAP_PROP_FPS, fps)))
stream.set(cv2.CAP_PROP_FRAME_WIDTH, 1920)
stream.set(cv2.CAP_PROP_FRAME_HEIGHT, 1080)
print("bit_depth: {}".format(stream.set(cv2.CAP_PROP_FORMAT, cv2.CV_8U)))
video = io.FFmpegWriter('/tmp/test_ffmpeg.avi',
inputdict={'-r': fps, '-width': 1920, '-height': 1080},
outputdict={'-r': fps, '-vcodec': 'libx264', '-pix_fmt': 'h264'}
)
try:
for i in range(fps*10): # 10s of video
ret, frame = stream.read()
video.writeFrame(frame)
finally:
stream.release()
try:
video.close()
except:
passHowever, I get the following exception (in Jupyter notebook) :
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
in <module>()
18 while range(fps*10):
19 ret, frame = stream.read()
---> 20 video.writeFrame(frame)
21 except BaseException as err:
22 raise err
/usr/local/lib/python3.6/site-packages/skvideo/io/ffmpeg.py in writeFrame(self, im)
446 T, M, N, C = vid.shape
447 if not self.warmStarted:
--> 448 self._warmStart(M, N, C)
449
450 # Ensure that ndarray image is in uint8
/usr/local/lib/python3.6/site-packages/skvideo/io/ffmpeg.py in _warmStart(self, M, N, C)
412 cmd = [_FFMPEG_PATH + "/" + _FFMPEG_APPLICATION, "-y"] + iargs + ["-i", "-"] + oargs + [self._filename]
413
--> 414 self._cmd = " ".join(cmd)
415
416 # Launch process
TypeError: sequence item 3: expected str instance, int found
</module>Changing this to
video.writeFrame(frame.tostring())
results inValueError: Improper data input
, leaving me stumped.How should I go about writing each frame (as returned by OpenCV) to my FFmpegWriter instance ?
EDIT
The code works fine if I remove
inputdict
andoutputdict
from theio.FFmpegWriter
call, however this defeats the purpose for me as I need fine control over the video encoding (I am experimenting with lossless/near-lossless compression of the raw video captured from the camera and trying to establish the best compromise in terms of compression vs fidelity for my needs). -
Saving the openGL context as a video output
16 septembre 2016, par activatedgeekI am currently trying to save the animation made in
openGL
to a video file. I have tried usingopenCV
’svideowriter
but to no advantage. I have successfully been able to generate a snapshot and save it asbmp
using theSDL
library. If I save all snapshots and then generate the video usingffmpeg
, that is like collecting 4 GB worth of images. Not practical.
How can I write video frames directly during rendering ?
Here the code i use to take snapshots when I require :void snapshot(){
SDL_Surface* snap = SDL_CreateRGBSurface(SDL_SWSURFACE,WIDTH,HEIGHT,24, 0x000000FF, 0x0000FF00, 0x00FF0000, 0);
char * pixels = new char [3 *WIDTH * HEIGHT];
glReadPixels(0, 0,WIDTH, HEIGHT, GL_RGB, GL_UNSIGNED_BYTE, pixels);
for (int i = 0 ; i <height>pixels) + snap->pitch * i, pixels + 3 * WIDTH * (HEIGHT-i - 1), WIDTH*3 );
delete [] pixels;
SDL_SaveBMP(snap, "snapshot.bmp");
SDL_FreeSurface(snap);
}
</height>I need the video output. I have discovered that
ffmpeg
can be used to create videos from C++ code but have not been able to figure out the process. Please help !EDIT : I have tried using
openCV
CvVideoWriter
class but the program crashes ("segmentation fault
") the moment it is declared.Compilation shows no errors ofcourse. Any suggestions to that ?SOLUTION FOR PYTHON USERS (Requires
Python2.7
,python-imaging
,python-opengl
,python-opencv
, codecs of format you want to write to, I am onUbuntu 14.04 64-bit
) :def snap():
pixels=[]
screenshot = glReadPixels(0,0,W,H,GL_RGBA,GL_UNSIGNED_BYTE)
snapshot = Image.frombuffer("RGBA",W,H),screenshot,"raw","RGBA",0,0)
snapshot.save(os.path.dirname(videoPath) + "/temp.jpg")
load = cv2.cv.LoadImage(os.path.dirname(videoPath) + "/temp.jpg")
cv2.cv.WriteFrame(videoWriter,load)Here
W
andH
are the window dimensions (width,height). What is happening is I am using PIL to convert the raw pixels read from theglReadPixels
command into aJPEG
image. I am loading that JPEG into theopenCV
image and writing to the videowriter. I was having certain issues by directly using the PIL image into the videowriter (which would save millions of clock cycles ofI/O
), but right now I am not working on that.Image
is aPIL
modulecv2
is apython-opencv
module.