
Recherche avancée
Autres articles (63)
-
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 ;
-
Dépôt de média et thèmes par FTP
31 mai 2013, parL’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...) -
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)
Sur d’autres sites (9281)
-
How to encode specific metadata version in FFMPEG ?
11 février 2021, par Charlie BrittonI am batch converting lots of songs into shorter "Advert" songs for SHOUTcast and to be recognised as adverts by the server. The song must have
":Advert"
for both the title and the artist metadata tags. When I use the following command :


ffmpeg -i "$i" -c copy -vn -map_metadata -1 -metadata title=":Advert" -metadata artist=":Advert" -t 120 "adverts/ADVERT_$i"




I would expect it to output the song with only
":Advert"
as title and artist metadata but when I import it into the radio playout software (using ID3 1.x tagging) the metadata has not copied across and is therefore lost. Output from ffmpeg :


ffmpeg version 3.0.2 Copyright (c) 2000-2016 the FFmpeg developers
 built with Apple LLVM version 9.0.0 (clang-900.0.37)
 configuration: --prefix=/usr/local/Cellar/ffmpeg/3.0.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --disable-lzma --enable-vda
 libavutil 55. 17.103 / 55. 17.103
 libavcodec 57. 24.102 / 57. 24.102
 libavformat 57. 25.100 / 57. 25.100
 libavdevice 57. 0.101 / 57. 0.101
 libavfilter 6. 31.100 / 6. 31.100
 libavresample 3. 0. 0 / 3. 0. 0
 libswscale 4. 0.100 / 4. 0.100
 libswresample 2. 0.101 / 2. 0.101
 libpostproc 54. 0.100 / 54. 0.100
[mp3 @ 0x7feba6800000] Skipping 0 bytes of junk at 230934.
[mjpeg @ 0x7feba7000600] Changing bps to 8
Input #0, mp3, from 'Joakim Karud - Vibe With Me.mp3':
 Metadata:
 major_brand : dash
 minor_version : 0
 compatible_brands: iso6mp41
 encoder : Lavf56.40.101
 artist : Joakim Karud
 title : Vibe With Me
 Duration: 00:02:53.06, start: 0.025056, bitrate: 138 kb/s
 Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
 Metadata:
 encoder : Lavc56.60
 Stream #0:1: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1280x720 [SAR 1:1 DAR 16:9], 90k tbr, 90k tbn, 90k tbc
 Metadata:
 comment : Cover (front)
Output #0, mp3, to 'adverts/ADVERT_Joakim Karud - Vibe With Me.mp3':
 Metadata:
 TIT2 : :Advert
 TPE1 : :Advert
 TSSE : Lavf57.25.100
 Stream #0:0: Audio: mp3, 44100 Hz, stereo, 128 kb/s
Stream mapping:
 Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size= 1876kB time=00:02:00.00 bitrate= 128.1kbits/s speed=1.44e+03x
video:0kB audio:1876kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.024837%




I believe this is happening because the tag names are different (e.g. title should be
title
, but isTIT2
when output. Please could someone specify how I could ensure that the metadata is encoded in the ID3 1.x format so that it is readable by the radio playout software. Many thanks.

-
AttributeError : 'FFmpegWriter' object has no attribute '_proc'
27 février 2024, par ArekI have some problem which i cannot find answer to. After installing scikit-video and FFmpeg i got this error :



AttributeError : 'FFmpegWriter' object has no attribute '_proc'



can you help me to find solution to this.



from skvideo.io import FFmpegWriter

def main():
 ...
 video_writer = FFmpegWriter('video.mp4')
 ...
if __name__ == '__main__':
 main()




Already tried to install pyaudio, reinstall FFmpeg and skvideo and install different versions of packages. Does not help at all.



Edit : an example of the full traceback resulting from
/skvideo/io/abstract.py
is below.


Traceback (most recent call last):
File "run_modules.py", line 93, in <module>
 Pipeline.create_videos(video_attr, args.output_path, args.padded)
File "/home/leuko/.local/lib/python3.6/site-packages/skvideo/io/abstract.py", line 474, in close
 if self._proc is None: # pragma: no cover
AttributeError: 'FFmpegWriter' object has no attribute '_proc'
</module>


-
Python ImageIO : Too many open files
24 août 2017, par orbv12I am using imageio in python in order to open all video files in a directory and convert them to numpy arrays.
Here is the script I am using :
1 from __future__ import print_function
2 from avi_to_numpy import *
3 from os import listdir
4 import numpy as np
5 import imageio
6
7 class_path = '../Diving/'
8 max_frames = 16
9 stride = 8
10 videos = [vid for vid in listdir(class_path)]
11 train = []
12
13 for vid in videos:
14 print(str.format('Loading {}...', vid), end="")
15 filename = class_path + vid
16 reader = imageio.get_reader(filename, 'ffmpeg')
17 frames = []
18
19 for i, im in enumerate(reader):
20 if len(frames) == max_frames:
21 break
22
23 if i % stride == 0:
24 frames.append(im)
25
26 reader.close()
27 train.append(np.array(frames))
28 print('done')
29
30
31 print(len(train))Eventually this script crashes with the following error output :
Traceback (most recent call last):
File "load_class_test.py", line 16, in <module>
reader = imageio.get_reader(filename, 'ffmpeg')
File "/usr/local/lib/python2.7/site-packages/imageio/core/functions.py", line 111, in get_reader
return format.get_reader(request)
File "/usr/local/lib/python2.7/site-packages/imageio/core/format.py", line 158, in get_reader
return self.Reader(self, request)
File "/usr/local/lib/python2.7/site-packages/imageio/core/format.py", line 207, in __init__
self._open(**self.request.kwargs.copy())
File "/usr/local/lib/python2.7/site-packages/imageio/plugins/ffmpeg.py", line 260, in _open
self._initialize()
File "/usr/local/lib/python2.7/site-packages/imageio/plugins/ffmpeg.py", line 326, in _initialize
stdout=sp.PIPE, stderr=sp.PIPE)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1223, in _execute_child
errpipe_read, errpipe_write = self.pipe_cloexec()
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1175, in pipe_cloexec
r, w = os.pipe()
OSError: [Errno 24] Too many open files
</module>I am closing the Reader object from imageio. It seems as if the files opened by ffmpeg are not being closed properly.
Is there an obvious step I am missing here ? Am I closing the files properly ?
EDIT : Found temporary solution. Opened a new issue on github.
I was able to resolve the issue by uncommenting the following lines of code from ’imageio/plugins/ffmpeg.py’ :
381 def _close_streams(self):
382 for std in (self._proc.stdin,
383 self._proc.stdout,
384 self._proc.stderr):
385 try:
386 std.close()
387 except Exception: # pragma: no cover
388 passI then added a call to the above function in
_close(self)
:271 def _close(self):
272 self._terminate(0.05) # Short timeout
273 self._close_streams()
274 self._proc = NoneI am not sure what the side effects of doing this are, but it provides a solution for me.
Here is the link to the issue : https://github.com/imageio/imageio/issues/145