
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 (89)
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
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
Sur d’autres sites (4935)
-
How to re-multiplex Multiple Program Transport Stream (MPTS) files into a single TS ?
30 novembre 2017, par rantshI have multiple MPTS files recorded from satellite receivers, I need to cherry pick programs/services/PIDS from each file re-multiplex them into a single MPTS file. Optionally I might be able to get away with taking all the services from every file and adding them to the final MPTS (In case anyone knows about a multiplexer that wouldn’t allow me to cherry pick programs)
Does anybody know how to do this with open source or free software (like VLC or ffmpeg for example) under either windows or linux ?
-
ffmpeg - merge mp3 and mp4 (duration difference)
8 décembre 2017, par dfionovI’m trying to merge mp4 and mp3 files with ffmpeg.
mp4 duration - 9.800 sec, mp3 - 58.540 sec. So i using -shortest key.
Code :ffmpeg -i video.mp4 -i audio.mp3 -c:v libx264 -c:a aac -strict experimental -shortest output.mp4
After that i got output.mp4 with duration 9.846. Where is my error ? Why output video longer than source ? (9.846 sec and 9.800 sec).
Source mp4 MediaInfo :
General
Complete name : F:\video test\video.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : iso5 (iso5/dash)
File size : 3.19 MiB
Duration : 9 s 800 ms
Overall bit rate : 2 732 kb/s
Encoded date : UTC 2017-11-24 20:53:53
Tagged date : UTC 2017-11-24 20:53:53
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.1
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 9 s 800 ms
Bit rate : 2 729 kb/s
Maximum bit rate : 3 766 kb/s
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.118
Stream size : 3.19 MiB (100%)
Writing library : x264 core 146
Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / 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
Tagged date : UTC 2017-11-24 20:53:53Source mp3 Mediainfo :
General
Complete name : F:\video test\audio.mp3
Format : MPEG Audio
File size : 1.19 MiB
Duration : 58 s 540 ms
Overall bit rate mode : Variable
Overall bit rate : 170 kb/s
Writing library : LAME3.99r
Audio
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 3
Format settings : Joint stereo / MS Stereo
Duration : 58 s 540 ms
Bit rate mode : Variable
Bit rate : 170 kb/s
Minimum bit rate : 32.0 kb/s
Channel(s) : 2 channels
Sampling rate : 44.1 kHz
Frame rate : 38.281 FPS (1152 SPF)
Compression mode : Lossy
Stream size : 1.19 MiB (100%)
Writing library : LAME3.99r
Encoding settings : -m j -V 2 -q 0 -lowpass 18.5 --vbr-new -b 32Console output :
ffmpeg version 3.4 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mp4':
Metadata:
major_brand : iso5
minor_version : 1
compatible_brands: iso5dash
creation_time : 2017-11-24T20:53:53.000000Z
Duration: 00:00:09.80, start: 0.000000, bitrate: 2732 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 2259 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Input #1, mp3, from 'audio.mp3':
Duration: 00:00:58.54, start: 0.025057, bitrate: 170 kb/s
Stream #1:0: Audio: mp3, 44100 Hz, stereo, s16p, 170 kb/s
Metadata:
encoder : LAME3.99r
Side data:
replaygain: track gain - -2.200000, track peak - unknown, album gain - unknown, album peak - unknown,
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #1:0 -> #0:1 (mp3 (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 00000000005ab440] using SAR=1/1
[libx264 @ 00000000005ab440] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 00000000005ab440] profile High, level 3.1
[libx264 @ 00000000005ab440] 264 - core 152 r2851 ba24899 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 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
Output #0, mp4, to 'output.mp4':
Metadata:
major_brand : iso5
minor_version : 1
compatible_brands: iso5dash
encoder : Lavf57.83.100
Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
Metadata:
handler_name : VideoHandler
encoder : Lavc57.107.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s
Metadata:
encoder : Lavc57.107.100 aac
Side data:
replaygain: track gain - -2.200000, track peak - unknown, album gain - unknown, album peak - unknown,
frame= 54 fps=0.0 q=28.0 size= 0kB time=00:00:00.04 bitrate= 8.3kbits/s speed=0.0927x
frame= 80 fps= 80 q=28.0 size= 0kB time=00:00:01.09 bitrate= 0.4kbits/s speed=1.09x
frame= 98 fps= 65 q=28.0 size= 256kB time=00:00:01.83 bitrate=1143.5kbits/s speed=1.21x
frame= 119 fps= 59 q=28.0 size= 512kB time=00:00:02.67 bitrate=1570.9kbits/s speed=1.32x
frame= 144 fps= 56 q=28.0 size= 768kB time=00:00:03.66 bitrate=1715.0kbits/s speed=1.42x
frame= 167 fps= 52 q=28.0 size= 1024kB time=00:00:04.57 bitrate=1833.9kbits/s speed=1.44x
frame= 190 fps= 51 q=28.0 size= 1280kB time=00:00:05.50 bitrate=1905.5kbits/s speed=1.47x
frame= 218 fps= 51 q=28.0 size= 1792kB time=00:00:06.64 bitrate=2210.6kbits/s speed=1.56x
frame= 242 fps= 50 q=28.0 size= 2048kB time=00:00:07.56 bitrate=2216.4kbits/s speed=1.58x
frame= 245 fps= 41 q=-1.0 Lsize= 3045kB time=00:00:09.82 bitrate=2539.6kbits/s speed=1.65x
video:2880kB audio:156kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.298058%
[libx264 @ 00000000005ab440] frame I:14 Avg QP:20.01 size: 39750
[libx264 @ 00000000005ab440] frame P:106 Avg QP:23.85 size: 14578
[libx264 @ 00000000005ab440] frame B:125 Avg QP:24.63 size: 6770
[libx264 @ 00000000005ab440] consecutive B-frames: 22.9% 22.0% 15.9% 39.2%
[libx264 @ 00000000005ab440] mb I I16..4: 16.7% 80.3% 3.0%
[libx264 @ 00000000005ab440] mb P I16..4: 10.2% 36.2% 1.1% P16..4: 25.0% 7.9% 2.5% 0.0% 0.0% skip:17.1%
[libx264 @ 00000000005ab440] mb B I16..4: 2.3% 5.8% 0.2% B16..8: 31.4% 6.5% 0.9% direct: 3.7% skip:49.2% L0:51.8% L1:44.5% BI: 3.7%
[libx264 @ 00000000005ab440] 8x8 transform intra:76.1% inter:86.3%
[libx264 @ 00000000005ab440] coded y,uvDC,uvAC intra: 38.3% 52.1% 9.0% inter: 12.3% 20.1% 0.2%
[libx264 @ 00000000005ab440] i16 v,h,dc,p: 30% 28% 9% 33%
[libx264 @ 00000000005ab440] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 36% 23% 19% 3% 3% 4% 4% 4% 4%
[libx264 @ 00000000005ab440] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 33% 21% 14% 5% 7% 7% 6% 5% 3%
[libx264 @ 00000000005ab440] i8c dc,h,v,p: 45% 24% 25% 6%
[libx264 @ 00000000005ab440] Weighted P-Frames: Y:13.2% UV:6.6%
[libx264 @ 00000000005ab440] ref P L0: 71.7% 12.5% 12.9% 2.7% 0.2%
[libx264 @ 00000000005ab440] ref B L0: 92.8% 6.3% 0.9%
[libx264 @ 00000000005ab440] ref B L1: 98.3% 1.7%
[libx264 @ 00000000005ab440] kb/s:2406.56
[aac @ 00000000005adde0] Qavg: 511.420ffprobe -show_packets output too big, so I loaded to pastebin
https://pastebin.com/TYSMdceS -
How do I properly enable ffmpeg for matplotlib.animation ?
7 mars 2017, par spanishgumI have covered a lot of ground on stack so far trying to get ffmpeg going so I can make a timelapse video.
I am on a CentOS 7 machine, running
python3.7.0a0
.python3
>>> import numpy as np
>>> np.__version__
'1.12.0'
>>> import matplotlib as mpl
>>> mpl.__version__
'2.0.0'
>>> import mpl_toolkits.basemap as base
>>> base.__version__
'1.0.7'I found this github gist on installing ffmpeg. I used the chromium source, and installed without a
prefix
option (using the default).I have confirmed that ffmpeg is installed, although I don’t know anything about testing whether it works.
which ffmpeg
/usr/local/bin/ffmpeg
ffmpeg -version
ffmpeg version N-83533-gada281d Copyright (c) 2000-2017 the FFmpeg dev elopers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-11
configuration:
libavutil 55. 47.100 / 55. 47.100
libavcodec 57. 80.100 / 57. 80.100
libavformat 57. 66.102 / 57. 66.102
libavdevice 57. 2.100 / 57. 2.100
libavfilter 6. 73.100 / 6. 73.100
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100I tried to run a few sample examples I found online :
[1] http://matplotlib.org/examples/animation/basic_example_writer.html
[2] http://stackoverflow.com/a/23098090/3454650
Everything works fine up until I try to save the animation file.
[1]
anim.save('basic_animation.mp4', writer = FFwriter, fps=30, extra_args=['-vcodec', 'libx264'])
[2]
im_ani.save('im.mp4', writer=writer)
I found here that explictly setting the path to ffmpeg might be necessary so I added this to the top of the test scripts :
plt.rcParams['animation.ffmpeg_path'] = '/usr/local/bin/ffmpeg'
I tried a few more tweaks in the code but always get the same response, which I do not know how to begin deciphering :
Traceback (most recent call last):
File "testanim.py", line 27, in <module>
writer.grab_frame()
File "/usr/local/lib/python3.7/contextlib.py", line 100, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.7/site-packages/matplotlib/animation.py", line 256, in saving
self.finish()
File "/usr/local/lib/python3.7/site-packages/matplotlib/animation.py", line 276, in finish
self.cleanup()
File "/usr/local/lib/python3.7/site-packages/matplotlib/animation.py", line 311, in cleanup
out, err = self._proc.communicate()
File "/usr/local/lib/python3.7/subprocess.py", line 836, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
File "/usr/local/lib/python3.7/subprocess.py", line 1474, in _communicate
selector.register(self.stdout, selectors.EVENT_READ)
File "/usr/local/lib/python3.7/selectors.py", line 351, in register
key = super().register(fileobj, events, data)
File "/usr/local/lib/python3.7/selectors.py", line 237, in register
key = SelectorKey(fileobj, self._fileobj_lookup(fileobj), events, data)
File "/usr/local/lib/python3.7/selectors.py", line 224, in _fileobj_lookup
return _fileobj_to_fd(fileobj)
File "/usr/local/lib/python3.7/selectors.py", line 39, in _fileobj_to_fd
"{!r}".format(fileobj)) from None
ValueError: Invalid file object: <_io.BufferedReader name=6>
</module>Is there something with my configuration that is malformed ? I searched google for this error for some time but never found anything relevant to animations / ffmpeg. Any help would be greatly appreciated.
UPDATE :
@LordNeckBeard pointed me here : https://trac.ffmpeg.org/wiki/CompilationGuide/Centos
I ran into problems with installing the x264 encoding dependency. Some files in libavcodec/*.c (in the
make
output) were reporting undefined references to several functions. After a wild goose chase found this : https://mailman.videolan.org/pipermail/x264-devel/2015-February/010971.htmlTo fix the x264 installation, I simply added some
configure
flags :./configure --enable-static --enable-shared --extra-ldflags="-lswresample -llzma"
UPDATE :
So everything installed fine after fixing the libx264 problems. I went ahead and copied the ffmpeg binary from the
ffmpeg_build
folder into/usr/local/bin/ffmpeg
.After running the script I was getting problems where ffmpeg could not find the libx264 shared object. I think I will have to recompile everything using different prefixes. My intuition tells me there are old files laying around after I have messed with everything, using some configuration that is broken.
So I decided maybe I should just try to use NUX : http://linoxide.com/linux-how-to/install-ffmpeg-centos-7/
I installed ffmpeg using the new rpm, but to no avail. I still was not able to run ffmpeg because of a missing shared object.Finally, instead of usiong files copied into my
/usr/local/bin
folder, I ran ffmpeg directly from the build bin directory. Turns out that this does work properly !So in essence, if I want to install ffmpeg system wide, I need to manually compile from sources again but using a nonlocal prefix.