
Recherche avancée
Médias (2)
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (49)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Menus personnalisés
14 novembre 2010, parMediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
Menus créés à l’initialisation du site
Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)
Sur d’autres sites (2338)
-
How do i gain access to subproccess.py ?
15 décembre 2023, par Kronik71So, my bot for some reason wants to access a folder in
\WindowsApps\PythonSoftwareFoundation.Python.bunch_of_numbers\Lib
calledsubproccess.py
but it always gives the error :PermissionError: [WinError 5] Access is denied
. I think it has to do with ffmpeg.

Here's the full traceback (kinda long) :


Traceback (most recent call last):
 File "C:\Users\myuser\AppData\Local\Packages\PythonSoftwareFoundation.Python.bunch_of_numbers\LocalCache\local-packages\Python310\site-packages\interactions\client\client.py", line 1900, in __dispatch_interaction
 response = await callback
 File "C:\Users\myuser\AppData\Local\Packages\PythonSoftwareFoundation.Python.bunch_of_numbers\LocalCache\local-packages\Python310\site-packages\interactions\client\client.py", line 1771, in _run_slash_command
 return await command(ctx, **ctx.kwargs)
 File "C:\Users\myuser\AppData\Local\Packages\PythonSoftwareFoundation.Python.bunch_of_numbers\LocalCache\local-packages\Python310\site-packages\interactions\models\internal\command.py", line 132, in __call__
 await self.call_callback(self.callback, context)
 File "C:\Users\myuser\AppData\Local\Packages\PythonSoftwareFoundation.Python.bunch_of_numbers\LocalCache\local-packages\Python310\site-packages\interactions\models\internal\application_commands.py", line 802, in call_callback
 return await self.call_with_binding(callback, ctx)
 File "C:\Users\myuser\AppData\Local\Packages\PythonSoftwareFoundation.Python.bunch_of_numbers\LocalCache\local-packages\Python310\site-packages\interactions\models\internal\callback.py", line 43, in call_with_binding
 return await callback(*args, **kwargs)
 File "C:\Users\myuser\OneDrive\Desktop\button.py", line 38, in press
 voice_client.play(discord.FFmpegPCMAudio(executable=r"C:\Users\myuser\OneDrive\Desktop\ffmpeg-6.1-essentials_build\bin", source=audiosource))
 File "C:\Users\myuser\AppData\Local\Packages\PythonSoftwareFoundation.Python.Bunch_of_numbers\LocalCache\local-packages\Python310\site-packages\discord\player.py", line 290, in __init__
 super().__init__(source, executable=executable, args=args, **subprocess_kwargs)
 File "C:\Users\myuser\AppData\Local\Packages\PythonSoftwareFoundation.Python.bunch_of_numbers\LocalCache\local-packages\Python310\site-packages\discord\player.py", line 166, in __init__
 self._process = self._spawn_process(args, **kwargs)
 File "C:\Users\myuser\AppData\Local\Packages\PythonSoftwareFoundation.Python.bunch_of_numbers\LocalCache\local-packages\Python310\site-packages\discord\player.py", line 180, in _spawn_process
 process = subprocess.Popen(args, creationflags=CREATE_NO_WINDOW, **subprocess_kwargs)
 File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.bunch_of_numbers\lib\subprocess.py", line 971, in __init__
 self._execute_child(args, executable, preexec_fn, close_fds,
 File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.bunch_of_numbers\lib\subprocess.py", line 1456, in _execute_child
 hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
PermissionError: [WinError 5] Access is denied



heres my code :


import interactions
import discord
from discord import FFmpegPCMAudio
import tracemalloc

ffmpegexec = r"C:\Users\myuser\OneDrive\Desktop\ffmpeg-6.1-essentials_build\bin\ffmpeg.exe"

audiosource = r"C:\Users\myuser\Downloads\seatbelt-online-audio-converter.mp3"

source = discord.FFmpegPCMAudio(audiosource)

token = "my_token"

bot = interactions.Client(token=token)

tracemalloc.start()

@interactions.slash_command(
 name="joinvc",
 description="starts the game"
)

async def joinvc(ctx: interactions.ComponentContext):
 await ctx.send("Joining vc. Please make sure you are currently in a vc!")
 vc = ctx.author.voice.channel
 await vc.connect()

@interactions.slash_command(
 name="press",
 description="Press the button"
)

async def press(ctx: interactions.ComponentContext):
 await ctx.send(f"{ctx.author.mention} has pressed the button")
 vc = ctx.author.voice.channel
 voice_client = await vc.connect() # Connect to the voice channel

voice_client.play(discord.FFmpegPCMAudio(executable=r"C:\Users\myuser\OneDrive\Desktop\ffmpeg-6.1-essentials_build\bin", source=audiosource))


bot.start(token)



All of my code is above. I'm not exactly good at writing python, might just be something I'm misunderstanding. I just want it to play a noise in a discord voice chat when the /press command is used.


-
Glitchy mp4 File saved with Matplotlib Animation via ffmpeg
9 janvier 2024, par Jacob IvanovI am attempting to save an
.mp4
file usingmatplotlib.animation
to output some simulation results. The relevent section is as follows :

ANI = FuncAnimation(fig, update, init_func = lambda : None, frames = range(0, 21300, 50))
ANI.save("[removed]/anim/v6 256 unforced 0.02.mp4", dpi = 600, fps = 30, writer = 'ffmpeg')



However, it appears that there is some issue in the produced
.mp4
file, as when I use macOS Quicktime to view the file, it pauses on certain frames, and restarts later on. It appears to consistently pause on the same frame a few seconds in. In order to check if Quicktime was the problem, I opened some random.mp4
files I found in a family group chat, and did not have this issue.

I also tried viewing this
.mp4
file with VLC, which had no issue, and played without any glitches. The Slack media viewer built into the app pauses similar to Quicktime.

The following are all relevant versions :


- 

- macOS : 14.2.1 (23C71)
- Python : 3.10.9 via Homebrew
- Matplotlib : 3.6.2
- ffmpeg : 6.1.1










If it would help, I can also provide the
.mp4
file itself, but I'm not quite sure how to upload it. I will be happy to provide any additional information as well.

Unfortunately, I'm not very familiar with video rendering, but I would appreciate any help anyone could provide. Thank you in advance !


-
FFmpeg restream RTSP with 3 sub-channels
6 mars 2024, par KyO Hoai BacI want to reproduce the RTSP stream by a video file, the stream will have 3 sub-channels like this via Ffmpeg, not need exactly the encoding and resolution :


- Stream #0:0: Video: h264 (Main)
- Stream #0:1: Audio: pcm_mulaw
- Stream #0:2: Data: none



I asked chat GPT and here is it suggestion :


ffmpeg -i input_video.mp4 -i input_audio.wav -f lavfi -t 1 -i anullsrc=r=44100:cl=stereo -filter_complex "[0:v][1:a][2:a]concat=n=3:v=1:a=1[v][a]" -map "[v]" -map "[a]" -rtsp_transport tcp -threads 0 -muxdelay 0.1 rtsp://localhost:8554/stream


I tried but it fail :


Stream specifier ':a' in filtergraph description [0:v][1:a][2:a]concat=n=3:v=1:a=1[v][a] matches no streams.