
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 (111)
-
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras. -
Librairies et binaires spécifiques au traitement vidéo et sonore
31 janvier 2010, parLes logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
Binaires complémentaires et facultatifs flvtool2 : (...)
Sur d’autres sites (11345)
-
Reading JPEG in ffmpeg
23 octobre 2012, par Paul LammertsmaI'm trying to get ffmpeg to encode several individual JPEG images into a video on Android. I've successfully built it for Android (see the configuration string at the end of this post).
I can encode an h.263+ video with randomly generated frame content, and ffmpeg otherwise appears to work well.
A similar question suggests that the following code should be sufficient to load an image into an
AvFrame
:// Make sure we have the codecs
av_register_all();
AVFormatContext *pFormatCtx;
int ret = av_open_input_file(&pFormatCtx, imageFileName, NULL, 0, NULL);
if (ret != 0) {
printf("Can't open image file '%s': code %d, %s",
imageFileName, ret, strerror(AVERROR(ret)));
}The above returns the correct absolute file path and error :
Failed '/sdcard/DCIM/Camera/IMG083.jpg' : code -1094995529, Unknown error : 1094995529
Incidentally, if I omit
av_register_all()
, it returns with error 2.I've compiled ffmpeg with the following arguments :
./configure —target-os=linux
—prefix=$PREFIX
—enable-cross-compile
—extra-libs="-lgcc"
—arch=arm
—cc=$PREBUILT/bin/arm-linux-androideabi-gcc
—cross-prefix=$PREBUILT/bin/arm-linux-androideabi-
—nm=$PREBUILT/bin/arm-linux-androideabi-nm
—sysroot=$PLATFORM
—extra-cflags=" -O3 -fpic -DANDROID -DHAVE_SYS_UIO_H=1 -Dipv6mr_interface=ipv6mr_ifindex -fasm -Wno-psabi -fno-short-enums -fno-strict-aliasing -finline-limit=300 $OPTIMIZE_CFLAGS "
—enable-shared
—enable-static
—extra-ldflags="-Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -nostdlib -lc -lm -ldl -llog"
—disable-everything
—enable-demuxer=mov
—enable-demuxer=h264
—disable-ffplay
—enable-protocol=file
—enable-avformat
—enable-avcodec
—enable-decoder=mjpeg
—enable-decoder=png
—enable-parser=h264
—enable-encoder=h263
—enable-encoder=h263p
—disable-network
—enable-zlib
—disable-avfilter
—disable-avdeviceAny suggestions would be most welcome !
-
Reading JPEG in ffmpeg
16 juillet 2021, par Paul LammertsmaI'm trying to get ffmpeg to encode several individual JPEG images into a video on Android. I've successfully built it for Android (see the configuration string at the end of this post).



I can encode an h.263+ video with randomly generated frame content, and ffmpeg otherwise appears to work well.



A similar question suggests that the following code should be sufficient to load an image into an
AvFrame
:


// Make sure we have the codecs
av_register_all();

AVFormatContext *pFormatCtx;
int ret = av_open_input_file(&pFormatCtx, imageFileName, NULL, 0, NULL);

if (ret != 0) {
 printf("Can't open image file '%s': code %d, %s",
 imageFileName, ret, strerror(AVERROR(ret)));
}




The above returns the correct absolute file path and error :





Failed '/sdcard/DCIM/Camera/IMG083.jpg' : code -1094995529, Unknown error : 1094995529





Incidentally, if I omit
av_register_all()
, it returns with error 2.


I've compiled ffmpeg with the following arguments :







./configure —target-os=linux 
 —prefix=$PREFIX 
 —enable-cross-compile 
 —extra-libs="-lgcc" 
 —arch=arm 
 —cc=$PREBUILT/bin/arm-linux-androideabi-gcc 
 —cross-prefix=$PREBUILT/bin/arm-linux-androideabi- 
 —nm=$PREBUILT/bin/arm-linux-androideabi-nm 
 —sysroot=$PLATFORM 
 —extra-cflags=" -O3 -fpic -DANDROID -DHAVE_SYS_UIO_H=1 -Dipv6mr_interface=ipv6mr_ifindex -fasm -Wno-psabi -fno-short-enums -fno-strict-aliasing -finline-limit=300 $OPTIMIZE_CFLAGS " 
 —enable-shared 
 —enable-static 
 —extra-ldflags="-Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -nostdlib -lc -lm -ldl -llog" 
 —disable-everything 
 —enable-demuxer=mov 
 —enable-demuxer=h264 
 —disable-ffplay 
 —enable-protocol=file 
 —enable-avformat 
 —enable-avcodec 
 —enable-decoder=mjpeg 
 —enable-decoder=png 
 —enable-parser=h264 
 —enable-encoder=h263 
 —enable-encoder=h263p 
 —disable-network 
 —enable-zlib 
 —disable-avfilter 
 —disable-avdevice







Any suggestions would be most welcome !


-
OpenCV videocapture() not opening video file from hard disk
8 janvier 2020, par Rossi RiccardoDespite being a lot of threads on the issue of open CV not being able to open videos i still can’t manage to solve it.
I’m trying to open and extract frames using openCV with spyder (os : windows 10, python 3.7.4). As far as i know (provided the file path is correct) cv2.read returns a 0 if either the codec is unsupported (converted the video to H264 to be sure and also downloaded a test avi used to test out this very issue in an older post ) or if there is a problem with the ffmpeg dependency.
Since i thought this was the source of the issue i added conda and phyton to the PATH with the SETX command and, after that, ended up copying ffmpeg dll and cv2 folders everywhere since i couldn’t understand well were i was supposed to paste it. Results is that i still can’t make it work and can’t even opt to try to make the frame extractor directly with ffmpeg since even that one gives me an error with a copypasted function from it’s site.
Here is the code :
import os
import ffmpeg
def read_frame_as_jpeg(in_filename, frame_num):
out, err = (
ffmpeg
.input(in_filename)
.filter('select', 'gte(n,{})'.format(frame_num))
.output('pipe:', vframes=1, format='image2', vcodec='mjpeg')
.run(capture_stdout=True)
)
# Read the video from specified path
#cam = cv2.VideoCapture(r'C:\MY\folder\264H.mp4')
cam = cv2.VideoCapture(r'C:\Users\name\Downloads\drop.avi')
fps=60
vid_start=371
vid_end=377
sens=20
out_dir=r"C:\MY\folder"
out_dir=out_dir+'\\'
print(out_dir)
stri="drop.avi"#even tried putting the fiel in the same directory, no change
read_frame_as_jpeg(stri, 1)
# frame
currentframe = 0
while(True):
# reading from frame
ret,frame = cam.read()
print(currentframe)
if ret and currentframe>= (fps*vid_start)-sens and currentframe<= (fps*vid_end)+sens:
# if video is still left continue creating images
name = out_dir+ str(currentframe) + '.bmp'
print ('Creating...' + name)
# writing the extracted images
cv2.imwrite(name, frame)
# increasing counter so that it will
# show how many frames are created
currentframe += 1
else:
break
# Release all space and windows once done
cam.release()
cv2.destroyAllWindows()The ffpeg error that i get is
[WinError 2] Impossible to find the specified file
while on the other hand since videocapture returns a 0 it doesn’t even enter the loop so i get just a "0" print