Recherche avancée
Médias (2)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (68)
-
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Mediabox : ouvrir les images dans l’espace maximal pour l’utilisateur
8 février 2011, parLa visualisation des images est restreinte par la largeur accordée par le design du site (dépendant du thème utilisé). Elles sont donc visibles sous un format réduit. Afin de profiter de l’ensemble de la place disponible sur l’écran de l’utilisateur, il est possible d’ajouter une fonctionnalité d’affichage de l’image dans une boite multimedia apparaissant au dessus du reste du contenu.
Pour ce faire il est nécessaire d’installer le plugin "Mediabox".
Configuration de la boite multimédia
Dès (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.
Sur d’autres sites (8762)
-
How to pipe ffmpeg output to ImageMagick's convert tool ?
30 décembre 2020, par Donny V.After a lot of searching I have come up with this to pipe a frame from ffmpeg to imagemagick's convert tool.


ffmpeg -y -ss 00:02:01 -i ...\pano.mp4 -frames:v 1 -f png - | convert -sharpen 0x1 ...\pano_00_02_01.png


I keep getting this error message.


[NULL @ 000002e6cd1e00c0] Requested output format 'png' is not a suitable output format
pipe:: Invalid argument


I have checked for png support using
ffmpeg -formatand its listed aspng_pipe.

I'm using ffmpeg version 4.3.1-2020-11-19-full_build
https://www.gyan.dev/ffmpeg/builds/


-
Force CMD to update pipe to clipboard
2 janvier 2021, par Dominic MasonI'm running ffmpeg to find scenechanges successfully, but was hoping to ouput ffmpeg's STDERR to another program, starting by testing it by piping to the clipboard. Capturing STDERR alone
2 |makes ffmpeg think it should output using format 2 through a pipe, but I found I could successfully capture STDOUT & STDERR together :

ffmpeg -i "inputfile.mkv" -filter_complex "select='gte(scene,0.4)',metadata=print:file=FrameDifferences.txt" -f null - 2>&1 | clip


Problem is, when I pipe to the clipboard, I only get an update once the program has finished running. As one of my reasons for piping STDERR was to get progress updates on the encoding, this was rather sad. Is there a simple way to force CMD to periodically update the pipe ? Or is this a limitation to using the clipboard such that I'll have to begin testing by preparing another program to receive the pipe ?


-
FFMPEG raises exception only when writing to pipe
13 janvier 2021, par user14893379I am currently writing a small application in Python that gets audio from a Youtube Link and converts this into wave data for visualization. I am using Pafy to get the appropriate URL, ffmpeg-python for the conversion, and matplotlib for visualization.


Currently, I am trying to skip the step of downloading the file to a local directory and instead want to write it directly into ffmpeg's pipe, so I can process it directly.


The function is the following :


import pafy
import os
import ffmpeg
import numpy as np
import matplotlib.pyplot as plt
import wave

def getaudio(url, filename='temp.wav'):
 if os.path.exists(filename):
 os.remove(filename)
 source = pafy.new(url).getbestaudio(preftype='m4a').url
 try:
 out, _ = (
 ffmpeg.input(source)
 .output(filename, format='wav')
 .run(capture_stdout=True, capture_stderr=True)
 )
 except ffmpeg._run.Error as e:
 print(e.stderr.decode('utf-8'))
 raise e
 w = wave.open('temp.wav', 'r').readframes(-1)
 audio = np.frombuffer(w, dtype=np.int16)
 return audio


url = 'https://www.youtube.com/watch?v=bhZs3ALdL7Y'
audio = getaudio(url)
plt.plot(audio)
plt.show()



This works in general - however this does two things : It returns the audio so it can be opened with the wave package, and it also saves it as 'temp.wav' to the current directory, which I would like to skip by replacing the 'temp.wav' output with 'pipe :' :


try:
 out, _ = (
 ffmpeg.input(source)
 .output('pipe:', format='wav')
 .run(capture_stdout=True, capture_stderr=True)
 )
 except ffmpeg._run.Error as e:
 print(e.stderr.decode('utf-8'))
 raise e


This raises an exception with the following output for stderr :


ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 9.2.1 (GCC) 20200122
 configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --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-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid 
--enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
 libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'https://r4---sn-h0jelne7.googlevideo.com/videoplayback?expire=1610319670&ei=1jL7X_uZIoeC6dsP9Z6nsA8&ip=2a02%3A810d%3Aabbf%3Abeed%3A98a1%3Ae204%3A805c%3Aa5b1&id=o-AGmTIS4LdQhQz5h7nplFZ0h5iWHR3KxieH44x8mIvXab&itag=140&source=youtube&requiressl=yes&mh=dj&mm=31%2C26&mn=sn-h0jelne7%2Csn-4g5e6nzz&ms=au%2Conr&mv=m&mvi=4&pl=33&initcwndbps=1885000&vprv=1&mime=audio%2Fmp4&ns=qyAm3FG5c0DyOAH11rcQFxYF&gir=yes&clen=55649&dur=3.459&lmt=1508976590967371&mt=1610297792&fvip=4&keepalive=yes&c=WEB&n=YvU_SOWuTrPG1W&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRAIgLR-oEO3oWoBfBGslerzo-jO57JhY-xbfKxQJ1GcnpscCIAhuoixcr1X_uDGiUuJ5IbPD2zynF-R8Qp5BjQqSWUaF&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAO9pxuDZZeOd6pESsk4tjlpzDJeCnSqPv4G1-zJKoDI1AiEAjjwkSBZeeEivgAU_DRdnI-GokWQ3P-6gKhdGHe9Za7o%3D&ratebypass=yes':
 Metadata:
 major_brand : dash
 minor_version : 0
 compatible_brands: iso6mp41
 creation_time : 2017-10-26T00:09:50.000000Z
 Duration: 00:00:03.46, start: 0.000000, bitrate: 128 kb/s
 Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
 Metadata:
 creation_time : 2017-10-26T00:09:50.000000Z
 handler_name : SoundHandler
Stream mapping:
 Stream #0:0 -> #0:0 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to 'pipe:':
 Metadata:
 major_brand : dash
 minor_version : 0
 compatible_brands: iso6mp41
 ISFT : Lavf58.29.100
 Stream #0:0(und): Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s (default)
 Metadata:
 creation_time : 2017-10-26T00:09:50.000000Z
 handler_name : SoundHandler
 encoder : Lavc58.54.100 pcm_s16le
size= 596kB time=00:00:03.45 bitrate=1411.4kbits/s speed= 316x
video:0kB audio:596kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.012781%

Traceback (most recent call last):
 File "e:/Coding Projects/YTStream/Test2.py", line 27, in <module>
 audio = getaudio(url)
 File "e:/Coding Projects/YTStream/Test2.py", line 20, in getaudio
 raise e
 File "e:/Coding Projects/YTStream/Test2.py", line 16, in getaudio
 .run(capture_stdout=True, capture_stderr=True)
 File "C:\Users\xxx\anaconda3\lib\site-packages\ffmpeg\_run.py", line 325, in run
 raise Error('ffmpeg', out, err)
ffmpeg._run.Error: ffmpeg error (see stderr output for detail)
</module>

I am confused how to deal with this exception as there is no obvious error message here (at least to me). It simply stops, as opposed to when I give an obvious error (such as an invalid format that is not supported by ffmpeg -formats).
Help would be much appreciated !