
Recherche avancée
Autres articles (99)
-
À propos des documents
21 juin 2013, parQue faire quand un document ne passe pas en traitement, dont le rendu ne correspond pas aux attentes ?
Document bloqué en file d’attente ?
Voici une liste d’actions ordonnée et empirique possible pour tenter de débloquer la situation : Relancer le traitement du document qui ne passe pas Retenter l’insertion du document sur le site MédiaSPIP Dans le cas d’un média de type video ou audio, retravailler le média produit à l’aide d’un éditeur ou un transcodeur. Convertir le document dans un format (...) -
Modifier la date de publication
21 juin 2013, parComment changer la date de publication d’un média ?
Il faut au préalable rajouter un champ "Date de publication" dans le masque de formulaire adéquat :
Administrer > Configuration des masques de formulaires > Sélectionner "Un média"
Dans la rubrique "Champs à ajouter, cocher "Date de publication "
Cliquer en bas de la page sur Enregistrer -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (9004)
-
Read partial H.264 stream (starting at random position) and convert to MP4
27 mars 2020, par ErcksenI need to capture a live stream using
raspivid
on the Raspberry Pi and deliver this stream to multiple players using HTTP. Each player gets is ownffmpeg
instance to individually adjust the video parameters.Currently, a single
raspivid
instance writes it’s output into a common ring buffer and any client connected via HTTP reads the buffer.This works fine for the first time, because this is when
raspivid
starts. I think that important control frames are written when the raw H.264 stream starts. But when a HTTP client connects later, it’sffmpeg
instance will receive the H.264 stream at a random position. This will causeffmpeg
to abort with the messagepipe:: Invalid data found when processing input
.Is there any way to start reading at a random position ?
-
Command raised an exception : NameError : name 'player' is not defined
20 mars 2023, par baartysI finally got myself a hosting for my project, but got into an error and I don't know how to resolve it.
I ran command !play to start streaming in vc, but I got this error :


2023-03-19 18:36:04 INFO discord.client logging in using static token
2023-03-19 18:36:04 INFO discord.gateway Shard ID None has connected to Gateway (Session ID: f983009c9f2881b87ee119278692efc9).
Eurobeat Radio is running!
2023-03-19 18:36:10 ERROR discord.ext.commands.bot Ignoring exception in command play
Traceback (most recent call last):
 File "/home/container/.local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 229, in wrapped
 ret = await coro(*args, **kwargs)
 File "/home/container/radio.py", line 44, in play
 player.play(FFmpegPCMAudio('http://stream.eurobeat.xyz'))
NameError: name 'player' is not defined
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
 File "/home/container/.local/lib/python3.10/site-packages/discord/ext/commands/bot.py", line 1350, in invoke
 await ctx.command.invoke(ctx)
 File "/home/container/.local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 1023, in invoke
 await injected(*ctx.args, **ctx.kwargs) # type: ignore
 File "/home/container/.local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 238, in wrapped
 raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: NameError: name 'player' is not defined



I tried running it on my pc and that was without error, but once it was on the hosting it ran in to the error up the page.


Here is the code :


import discord
import urllib.request, json 
from discord import FFmpegPCMAudio
from discord.ext import commands
from discord.ext import tasks
client= commands.Bot(command_prefix="er!", intents=discord.Intents.all(), help_command=None)

@tasks.loop(seconds=10.0)
async def my_background_task():
 """Will loop every 60 seconds and change the bots presence"""
 with urllib.request.urlopen('https://api.laut.fm/station/eurobeat/current_song') as url:
 data = json.load(url)
 global namestatus
 global artiststatus
 namestatus = data['title']
 artiststatus = data['artist']['name']
 await client.change_presence(activity=discord.Activity(type=discord.ActivityType.listening, name="Eurobeat FM"))
 await client.change_presence(activity=discord.Game(name="Para para dancing ~"))
 await client.change_presence(activity=discord.Activity(type=discord.ActivityType.listening, name=f"{namestatus} by {artiststatus}"))


@client.event
async def on_ready():
 print('Eurobeat Radio is running!')
 await client.wait_until_ready()
 my_background_task.start()


@client.event
async def on_voice_state_update(member, prev, cur):
 if client.user in prev.channel.members and len([m for m in prev.channel.members if not m.bot]) == 0:
 channel = discord.utils.get(client.voice_clients, channel=prev.channel)
 await channel.disconnect()

@client.command(aliases=['p', 'pla', 'join', 'j'])
async def play(ctx, url: str = 'http://stream.eurobeat.xyz'): 
 channel = ctx.message.author.voice.channel
 global player
 try:
 player = await channel.connect()
 except:
 pass
 player.play(FFmpegPCMAudio('http://stream.eurobeat.xyz'))
 embedVar = discord.Embed(title="Started Playing!", color=discord.Color.random())
 await ctx.send(embed=embedVar)



Would be very grateful for your help !


-
Python pipe ffmpeg stream to numpy in realtime
29 mai 2020, par Dadidumim trying to get the frames out of a rtp stream via ffmpeg in realtime in python. At my server the frames are piped from numpy arrays into ffmpeg and should be at the client piped back to numpy for further manipulation. The server creates a sdp file which is given as input to the client. 
It looks like this :



v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 127.0.0.1
t=0 0
a=tool:libavformat 58.42.102
m=video 5004 RTP/AVP 96
b=AS:19000
a=rtpmap:96 H265/90000




With ffplay or VLC the stream can be received but with my python code not, at first needs ca. 5sec for each frame and the image is just some random coloured pixels.
The client :



dimension = '{}x{}'.format(480, 240)
sdf_file = "video.sdp"

command = ['FFMPEG',
 '-protocol_whitelist', 'udp,rtp,file,pipe,crypto,data',
 '-i', sdf_file,
 '-pix_fmt', 'bgr24',
 '-r', '24',
 '-video_size', dimension,
 '-f', 'image2pipe', '-']

size = 480 * 240 * 3
proc = sp.Popen(command, stdout=sp.PIPE)

while True:
 try:
 tic = time.perf_counter()
 frame = proc.stdout.read(size)
 print(frame)
 if frame is None:
 print('no input')
 break
 image = np.frombuffer(frame, dtype='uint8').reshape(240, 480, 3)
 toc = time.perf_counter()
 print(f"performed calc in {(toc - tic) * 1000:0.4f} miliseconds")
 cv2.imshow('received', image)
 except Exception as e:
 print(e)

cv2.destroyAllWindows()
proc.stdin.close()
proc.wait()




Any ideas, how i can get the frames in realtime ? Thanky for your help