
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
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 (...) -
Les notifications de la ferme
1er décembre 2010, parAfin d’assurer une gestion correcte de la ferme, il est nécessaire de notifier plusieurs choses lors d’actions spécifiques à la fois à l’utilisateur mais également à l’ensemble des administrateurs de la ferme.
Les notifications de changement de statut
Lors d’un changement de statut d’une instance, l’ensemble des administrateurs de la ferme doivent être notifiés de cette modification ainsi que l’utilisateur administrateur de l’instance.
À la demande d’un canal
Passage au statut "publie"
Passage au (...) -
Initialisation de MediaSPIP (préconfiguration)
20 février 2010, parLors de l’installation de MediaSPIP, celui-ci est préconfiguré pour les usages les plus fréquents.
Cette préconfiguration est réalisée par un plugin activé par défaut et non désactivable appelé MediaSPIP Init.
Ce plugin sert à préconfigurer de manière correcte chaque instance de MediaSPIP. Il doit donc être placé dans le dossier plugins-dist/ du site ou de la ferme pour être installé par défaut avant de pouvoir utiliser le site.
Dans un premier temps il active ou désactive des options de SPIP qui ne le (...)
Sur d’autres sites (8850)
-
How to open a HEIF (.heic) image ?
14 décembre 2022, par Jean-Milost ReymondFor a c++ project, I need to open and show a HEIF (.heic) image. What I know (if I'm right) is that the HEIF images are based on the ffmpeg standard, and requires a H265 codec to be read.



I found several open-source H265 codecs :



- 

- OpenHEVC (https://github.com/OpenHEVC/openHEVC)
- x265 (https://bitbucket.org/multicoreware/x265/downloads/)
- libde265 (https://github.com/strukturag/libde265)









I can open and show H265 encoded video files with each of them, but I'm unable to simply open, show or convert a .heic image. All of them return an error, or just do nothing.



To be honest I'm a little puzzled, because the HEIF standard seem to be a well kept secret. I'm unable to find a relevant info that could allow me to walk to a solution. Those I found are just tricks and workarounds, like e.g. forcing the device (I'm speaking here about the Apple iPhone using the new iOS11) to generate a jpg image instead of a heic, or using a third party application like dr.fone. Of course these solutions are irrelevant for me.



So, somebody can tell me which codec I should use with a .heif image, and how I can use it to open it ? Or are there open source libraries or examples that allow to manipulate this type of image file ? Somebody can point me to the good direction ?


-
Can anyone help me with the errors ?
11 juillet 2017, par joelI am a newbie to ffmpeg module. Here is my code to read audio wave files using ffmpeg and pipe.
import numpy as np
import subprocess as sp
import os
from os.path import join
from multiprocessing import Pool
smpler=44100
files= list()
for roots, dirs, filek in os.walk("/home/joel/pymusic/mu2"):
for fi in filek:
files.append(os.path.join("/home/joel/pymusic/mu2",fi))
def load(filename,in_typ=np.int16,out_typ=np.float32):
channels=1
form={
np.int16:'s16le'
}
f_s= form[in_typ]
command=[
'ffmpeg',
'-i',filename,
'-f',f_s,
'-acodec', 'pcm_' + f_s,
'-ar', str(smpler),
'-ac',str(channels),'-']
raw=b' '
pi=sp.Popen(command, stdout=sp.PIPE, bufsize=4096)
read_c= smpler*channels*16
while True:
data= pi.stdout.read(read_c )
if data:
raw += data
else:
break
audio= np.fromstring(raw, dtype=np.int16).astype(np.float32)
return audio
def helper(f):
return(load(f))
p= Pool()
array= p.map(helper, files)
p.close()
p.join()Where files is a list consisting of 20 audio wave files.
I’m getting the error as :>File "prj2.py", line 42, in <module>
> array= p.map(helper, files)
>File "/usr/lib/python2.7/multiprocessing/pool.py", line 251, in map
> return self.map_async(func, iterable, chunksize).get()
>File "/usr/lib/python2.7/multiprocessing/pool.py", line 558, in get
> raise self._value
>ValueError: string size must be a multiple of element size
</module>Can anyone help me out with these errors ?
-
FFMpeg batch convert video files hangs
13 juin 2017, par Benson ChangI have some .avi file contains video encoded in h264, and I would like to change to .mp4 and change the rates if needed. You can see the code used to convert below. My problem is that ffmpeg will hang when I try to convert all files, and the file it hangs changes from time to time, I wonder why ? Below the code is the output where ffmpeg hangs. I’m running under windows 10, python 2.7.
import subprocess
import os
def convert(fileName):
sourceFile = fileName
print sourceFile.split('.')
targetFile = fileName.split('.')[0] + ".mp4"
subprocess.call(['ffmpeg', '-y', '-i', sourceFile, '-r',
'30000/1001', '-b:a', '2M', '-bt', '4M', '-vcodec',
'libx264', '-pass', '1', '-coder', '0', '-bf', '0',
'-flags', '-loop', '-wpredp', '0', '-an', targetFile])
# Set the directory you want to start from
def convertBatch(rootDir = '.'):
for dirName, subdirList, fileList in os.walk(rootDir):
print('Found directory: %s' % dirName)
for fname in fileList:
if fname.endswith(".avi"):
convert('%s/%s' % (dirName,fname))
#os.remove('%s/%s' % (dirName,fname))
convertBatch("F:\\data\\mp4")ffmpeg version 3.1.4 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 48.101 / 57. 48.101
libavformat 57. 41.100 / 57. 41.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 47.100 / 6. 47.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Input #0, avi, from 'filename.avi':
Metadata:
encoder : Lavf57.56.100
Duration: 00:00:01.00, start: 0.000000, bitrate: 611 kb/s
Stream #0:0: Video: h264 (Constrained Baseline) (x264 / 0x34363278), yuv420p, 1024x1024, 578 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc
Codec AVOption b (set bitrate (in bits/s)) specified for output file #0 (F:\data\mp4_1_16\11\14\512/11_14_512_16.mp4) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
[libx264 @ 00000000028e42c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 00000000028e42c0] profile Constrained Baseline, level 3.2
[libx264 @ 00000000028e42c0] 264 - core 148 r2721 72d53ab - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=1:0:0 analyse=0x1:0 me=dia subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=18 lookahead_threads=6 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[mp4 @ 0000000002bd00a0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Output #0, mp4, to 'filename.mp4':
Metadata:
encoder : Lavf57.41.100
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1024x1024, q=-1--1, 29.97 fps, 30k tbn, 29.97 tbc
Metadata:
encoder : Lavc57.48.101 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help