
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (19)
-
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 -
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
Sur d’autres sites (5637)
-
python3.6 ffmpeg call MacOSX
8 avril 2017, par AwazleonI’m using Python 3.6 on MacOSX. I would like to use FFmpeg as Python sub-process. Everything works fine when using the OSX embedded Python 2.7 but using 3.6, this doesn’t work.
I’ve got an error message because it doesn’t find FFmepg.raise FFExecutableNotFoundError("Executable ’0’ not found".format(self.executable))
ffmpy.FFExecutableNotFoundError : Executable ’ffmpeg’ not foundAs you can se I tried with ffmpy but I also got the same result by invoking FFmpeg directly
from subprocess import call
call(["ffmpeg"])
Traceback (most recent call last) :
File "", line 1, in
call(["ffmpeg"])
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 267, in call
with Popen(*popenargs, **kwargs) as p :
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 707, in init
restore_signals, start_new_session)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 1326, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError : [Errno 2] No such file or directory : ’ffmpeg’I installed the FFmpeg lib. by using Brew through Terminal. It was well installed but only visible by Python 2.7, not 3.6.
Calling it from terminal is working :
iMac-de-xxxxx : utilisateur$ ffmpeg
ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
configuration : —prefix=/usr/local/Cellar/ffmpeg/3.2.4 —enable-shared —enable-pthreads —enable-gpl —enable-version3 —enable-hardcoded-tables —enable-avresample —cc=clang —host-cflags= —host-ldflags= —enable-libmp3lame —enable-libx264 —enable-libxvid —enable-opencl —disable-lzma —enable-vdaI’m not (yet) a Linux specialist but I think that a path is missing for 3.6 to find FFmpeg.
Any clue to solve this annoying issue ? -
ffmpeg - How to convert massive amounts of files in parallel ?
15 juillet 2019, par ForivinI need to convert about 1.5TiB or audio files which are in either flac or wav format. They need to be converted into mp3 files, keeping important meta data and the cover art etc. and the bitrate needs to be 320k.
This alone is easy :
ffmpeg -i "$flacFile" -ab 320k -map_metadata 0 -id3v2_version 3 -vsync 2 "$mp3File" < /dev/null
But the problem is making it faster. The command from above only uses 12.5% of the CPU. I’d much rather use like 80%. So I played around with the threads flag, but it doesn’t make it faster or slower :
ffmpeg -i "$flacFile" -ab 320k -map_metadata 0 -id3v2_version 3 -vsync 2 -threads 4 "$mp3File" < /dev/null
But it only utilizes my CPU by 13%. I think it only uses one thread. My CPU has 8 physical cores btw (+ hyperthreading).
So my idea now is to somehow have multiple instances of ffmpeg running at the same time, but I have no clue how to do that properly.
This is my current script to take all flac/wav files from one directory (recursively) and convert them to mp3 files in a new directory with the exact same structure :
#!/bin/bash
SOURCE_DIR="/home/fedora/audiodata_flac"
TARGET_DIR="/home/fedora/audiodata_mp3"
echo "FLAC/WAV files will be read from '$SOURCE_DIR' and MP3 files will be written to '$TARGET_DIR'!"
read -p "Are you sure? (y/N)" -n 1 -r
echo # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]] ; then # Continue if user enters "y"
# Find all flac/wav files in the given SOURCE_DIR and iterate over them:
find "${SOURCE_DIR}" -type f \( -iname "*.flac" -or -iname "*.wav" \) -print0 | while IFS= read -r -d '' flacFile; do
if [[ "$(basename "${flacFile}")" != ._* ]] ; then # Skip files starting with "._"
tmpVar="${flacFile%.*}.mp3"
mp3File="${tmpVar/$SOURCE_DIR/$TARGET_DIR}"
mp3FilePath=$(dirname "${mp3File}")
mkdir -p "${mp3FilePath}"
if [ ! -f "$mp3File" ]; then # If the mp3 file doesn't exist already
echo "Input: $flacFile"
echo "Output: $mp3File"
ffmpeg -i "$flacFile" -ab 320k -map_metadata 0 -id3v2_version 3 -vsync 2 "$mp3File" < /dev/null
fi
fi
done
fiI mean I guess I could append an
&
to the ffmpeg command, but that would cause throusands of ffmpeg instances to run at the same time, which is too much. -
music bot stopping music entirely instead of skipping one song discord.py
26 septembre 2018, par Y4h LWhen i use my skip command, my program stops playing music, instead of skipping a song.
Here’s the code :queues = {}
players = {}
opts = {
'default_search': 'auto',
'quiet': True,
}
voice_states = {}
class voice:
def __init__(self, client):
self.client = client
@commands.command(pass_context=True)
async def skip(self, ctx):
id = ctx.message.server.id
players[id].stop()
@commands.command(
pass_context=True
)
async def play(self, ctx, url):
server = ctx.message.server
channel = ctx.message.author.voice.voice_channel
try:
await self.client.join_voice_channel(channel)
except:
print(" ")
if server.id not in players or players[server.id].is_done():
server = ctx.message.server
voice_client = self.client.voice_client_in(server)
player = await voice_client.create_ytdl_player(url, after=lambda: queue(server.id), ytdl_options=opts)
players[server.id] = player
await self.client.say('Now Playing ' )
player.start()
else:
server = ctx.message.server
voice_client = self.client.voice_client_in(server)
player = await voice_client.create_ytdl_player(url, after=lambda: queue(server.id), ytdl_options=opts)
if server.id in queues:
queues[server.id].append(player)
else:
queues[server.id] = [player]
await self.client.say('Now Playing ' )
await self.client.say('Video queued.')
def queue(self, id):
if queues[id] != []:
player = queues[id].pop(0)
players[id] = player
player.start()
def setup(client):
client.add_cog(voice(client))i receive no error codes,
just no queue.
Fixes to my code or own solutions are appreciated.
Sorry, for long code, but you need all the context