
Advanced search
Medias (1)
-
Rennes Emotion Map 2010-11
19 October 2011, by
Updated: July 2013
Language: français
Type: Text
Other articles (112)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 September 2013, byCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo; l’ajout d’une bannière l’ajout d’une image de fond;
-
Script d’installation automatique de MediaSPIP
25 April 2011, byAfin 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 (...) -
La sauvegarde automatique de canaux SPIP
1 April 2010, byDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)
On other websites (11061)
-
Cross compile ffmpeg for Tizen
6 April 2022, by lbegueIm trying to compile ffmpeg for Tizen TV as a static library using toolchains.
This is the script I'm using:


#!/bin/bash
function buildme
{

./configure --prefix=$PREFIX \
 --target-os=linux \
 --arch=$ARCH \
 --cpu=armv7-a \
 --enable-runtime-cpudetect \
 --disable-doc \
 --disable-ffmpeg \
 --disable-ffplay \
 --enable-cross-compile \
 --enable-optimizations \
 --disable-ffprobe \
 --disable-devices \
 --disable-avdevice \
 --disable-debug \
 --enable-pic \
 --disable-shared \
 --enable-gpl \
 --enable-static \
 --sysroot=/path-to-tizen-studio/tools/arm-linux-gnueabi-gcc-6.2/arm-tizen-linux-gnueabi \
 --cross-prefix=${PLATFORM}/bin/$PLATFORM_PREFIX \
 --extra-cflags="-O3 -std=c++11 -DHAVE_SYS_UIO_H=1 -Dipv6mr_interface=ipv6mr_ifindex -fasm -Wno-psabi -fno-short-enums -fno-strict-aliasing -finline-limit=300 -fpic $OPTIMIZE_CFLAGS" \
 --enable-asm \
 --extra-ldflags="-Wl,-rpath-link=$PLATFORM/lib -L$PLATFORM/lib -nostdlib" \
 --cc=${CCOMPILER} \
 $ADDITIONAL_CONFIGURE_FLAG

 make clean
 make V=1
 make install
}

echo configuring....

PLATFORM=/path-to-tizen-studio/tools/arm-linux-gnueabi-gcc-6.2
PREFIX='pwd'/thridParty
PLATFORM_PREFIX=arm-linux-gnueabi-
ARCH=arm
CCOMPILER=${PLATFORM}/bin/arm-linux-gnueabi-g++
OPTIMIZE_CFLAGS="-marm"
buildme

echo end



And I obtain this error:




/path-to-tizen-studio/tools/arm-linux-gnueabi-gcc-6.2/arm-tizen-linux-gnueabi/include/c++/6.2.1/arm-tizen-linux-gnueabi/bits/os_defines.h:39:22:
fatal error: features.h: No such file or directory
#include




-
ytdl python "KeyError: formats"
7 July 2022, by MondumkreisungIm trying to make a discord music bot for personal use, since groovy and rythm got shut down.
It's working okay-ish I guess, but im having a problem with ytdl.
typing "-play" and an url is working just like intended, but i cant type "-play 'song name'".
Typing "-play example" gives me this:


[download] Downloading playlist: example
[youtube:search] query "example": Downloading page 1
[youtube:search] playlist example: Downloading 1 videos
[download] Downloading video 1 of 1
[youtube] CLXt3yh2g0s: Downloading webpage
Ignoring exception in command play:
[download] Finished downloading playlist: example
Traceback (most recent call last):
 File "C:\Users\Dennis\PycharmProjects\groovy's true successor\venv\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
 ret = await coro(*args, **kwargs)
 File "C:\Users\Dennis\PycharmProjects\groovy's true successor\voice.py", line 53, in play
 url2 = info['formats'][0]['url']
KeyError: 'formats'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
 File "C:\Users\Dennis\PycharmProjects\groovy's true successor\venv\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
 await ctx.command.invoke(ctx)
 File "C:\Users\Dennis\PycharmProjects\groovy's true successor\venv\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
 await injected(*ctx.args, **ctx.kwargs)
 File "C:\Users\Dennis\PycharmProjects\groovy's true successor\venv\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
 raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: KeyError: 'formats'



im fairly new to coding, so im sorry if somethings weird to understand.


okay, so: typing -play with an url works fine, but typing -play with the song name doesnt. its only searching for the first word, downloads the first searchresult and then "crashes".


so "-play Rick Astley - Never Gonna Give You Up" for example only searches for "Rick" and then it says something about KeyError: 'formats'
Here is my code:


@client.command()
async def play(ctx, url):
 channel = ctx.author.voice.channel
 voice = discord.utils.get(client.voice_clients, guild=ctx.guild)
 if voice and voice.is_connected():
 pass
 else:
 await channel.connect()

 ffmpeg_opts = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'}
 ydl_opts = {'format': "bestaudio/best", 'default_search': 'auto'}
 vc = ctx.voice_client

 with youtube_dl.YoutubeDL(ydl_opts) as ydl:
 info = ydl.extract_info(url, download=False)
 url2 = info['formats'][0]['url']
 source = await discord.FFmpegOpusAudio.from_probe(url2, **ffmpeg_opts)
 vc.play(source)



-
Mangled output when printing strings from FFProbe STDERR
9 February 2018, by spikespazI’m trying to make a simple function to wrap around FFProbe, and most of the data can be retrieved correctly.
The problem is when actually printing the strings to the command line using both Windows Command Prompt and Git Bash for Windows, the output appears mangled and out of order.
Some songs (specifically the file
Imagine Dragons - Hit Parade_ Best of the Dance Music Charts\80 - Beazz - Lime (Extended Mix).flac
) are missing metadata. I don’t know why, but the dictionary the function below returns is empty.FFProbe outputs its results to
stderr
which can be piped tosubprocess.PIPE
, decoded, and parsed. I chose regex for the parsing bit.This is a slimmed down version of my code below, for the output take a look at the Github gist.
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
import os
from glob import glob
from re import findall, MULTILINE
from subprocess import Popen, PIPE
def glob_from(path, ext):
"""Return glob from a directory."""
working_dir = os.getcwd()
os.chdir(path)
file_paths = glob("**/*." + ext)
os.chdir(working_dir)
return file_paths
def media_metadata(file_path):
"""Use FFPROBE to get information about a media file."""
stderr = Popen(("ffprobe", file_path), shell=True, stderr=PIPE).communicate()[1].decode()
metadata = {}
for match in findall(r"(\w+)\s+:\s(.+)$", stderr, MULTILINE):
metadata[match[0].lower()] = match[1]
return metadata
if __name__ == "__main__":
base = "C:/Users/spike/Music/Deezloader"
for file in glob_from(base, "flac"):
meta = media_metadata(os.path.join(base, file))
title_length = meta.get("title", file) + " - " + meta.get("length", "000")
print(title_length)I don’t understand why the output (the strings can be retrieved from the regex pattern effectively, however the output is strangely formatted when printing) appears disordered only when printing to the console using python’s
print
function. It doesn’t matter how I build the string to print, concatenation, comma-delimited arguments, whatever.I end up with the length of the song first, and the song name second but without space between the two. The dash is hanging off the end for some reason. Based on the print statement in the code before, the format should be
Title - 000
({title} - {length}
) but the output looks more like000Title -
. Why?