
Recherche avancée
Médias (91)
-
Spoon - Revenge !
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
My Morning Jacket - One Big Holiday
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Zap Mama - Wadidyusay ?
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
David Byrne - My Fair Lady
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Beastie Boys - Now Get Busy
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Granite de l’Aber Ildut
9 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
Autres articles (63)
-
Soumettre améliorations et plugins supplémentaires
10 avril 2011Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...) -
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) (...)
-
Diogene : création de masques spécifiques de formulaires d’édition de contenus
26 octobre 2010, parDiogene est un des plugins ? SPIP activé par défaut (extension) lors de l’initialisation de MediaSPIP.
A quoi sert ce plugin
Création de masques de formulaires
Le plugin Diogène permet de créer des masques de formulaires spécifiques par secteur sur les trois objets spécifiques SPIP que sont : les articles ; les rubriques ; les sites
Il permet ainsi de définir en fonction d’un secteur particulier, un masque de formulaire par objet, ajoutant ou enlevant ainsi des champs afin de rendre le formulaire (...)
Sur d’autres sites (2887)
-
ffmpeg from .mp3 to .al appears to slow and deepen the audio
6 juillet 2020, par DarpehI have an mp3 input file that is 22050Hz and 48kb/s. I need to convert it to a .al file in order to stream it to a camera on my network for output.


ffmpeg -i file.mp3 file.al 



creates a file that does play but the bitrate of the output is 176kb/s and it clearly slower/deeper sounding. I have tried -b:a 48k and -filter:a without success but I could be doing it wrong.


Documentation states that this is the format I need : PCM ADPCM G.711A G.711.Mu G.726 G.729 MPEG2 AMR AAC


-
How to save last 30 seconds of video in py
5 juin 2024, par Mateus CoelhoI want the last 30 seconds to be recorded every time I click enter and sent to the cloud. for example, if I click at 00:10:30, I want a video that records from 00:10:00 to 00:10:30 and if I click in sequence at 00:10:32, I need another different video that in its content is recorded from 00:10:02 to 00:10:32.


I think I have a problem where I will always end up recovering from the same buffer in the last 30 seconds. Is there any approach so that whenever I click enter I retrieve a unique video ? Is my current approach the best for the problem ? Or should I use something else ?


import subprocess
import os
import keyboard
from datetime import datetime
from google.cloud import storage

# Configuration
STATE = "mg"
CITY = "belohorizonte"
COURT = "duna"
RTSP_URL = "rtsp://Apertai:130355va@192.168.0.2/stream1"
BUCKET_NAME = "apertai-cloud"
CREDENTIALS_PATH = "C:/Users/Abidu/ApertAI/key.json"

def start_buffer_stream():
 # Command for continuous buffer that overwrites itself every 30 seconds
 buffer_command = [
 'ffmpeg',
 '-i', RTSP_URL,
 '-map', '0',
 '-c', 'copy',
 '-f', 'segment',
 '-segment_time', '30', # Duration of each segment
 '-segment_wrap', '2', # Number of segments to wrap around
 '-reset_timestamps', '1', # Reset timestamps at the start of each segment
 'buffer-%03d.ts' # Save segments with a numbering pattern
 ]
 return subprocess.Popen(buffer_command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

def save_last_30_seconds_from_buffer(buffer_file):
 datetime_now = datetime.now()
 datetime_now_formatted = f"{datetime_now.day:02}{datetime_now.month:02}{datetime_now.year}-{datetime_now.hour:02}{datetime_now.minute:02}"
 output_file_name = os.path.abspath(f"{STATE}-{CITY}-{COURT}-{datetime_now_formatted}.mp4")

 # Copy the most recent buffer segment to the output file
 save_command = [
 'ffmpeg',
 '-i', buffer_file,
 '-c', 'copy',
 output_file_name
 ]
 subprocess.run(save_command, check=True)
 print(f"Saved last 30 seconds: {output_file_name}")
 return output_file_name

def upload_to_google_cloud(file_name):
 client = storage.Client.from_service_account_json(CREDENTIALS_PATH)
 bucket = client.bucket(BUCKET_NAME)
 blob = bucket.blob(os.path.basename(file_name).replace("-", "/"))
 blob.upload_from_filename(file_name, content_type='application/octet-stream')
 print(f"Uploaded {file_name} to {BUCKET_NAME}")
 os.remove(file_name) # Clean up the local file

def main():
 print("Starting continuous buffer for RTSP stream...")
 start_time = datetime.now()
 buffer_process = start_buffer_stream()
 print("Press 'Enter' to save the last 30 seconds of video...")

 while True:
 # Verify if 30 seconds has passed since start
 if keyboard.is_pressed('enter'):
 print("Saving last 30 seconds of video...")
 elapsed_time = (datetime.now() - start_time).total_seconds()
 # Determine which buffer segment to save
 if elapsed_time % 60 < 30:
 buffer_file = 'buffer-000.ts'
 else:
 buffer_file = 'buffer-001.ts'
 final_video = save_last_30_seconds_from_buffer(buffer_file)
 upload_to_google_cloud(final_video)

if _name_ == "_main_":
 main()





-
How to pass custom parameters when creating docker swarm service ?
31 mai 2022, par MikeI am new to docker and docker swarm and started dockerizing several services and am trying to get them running as docker swarm services. I ran into a road block with the linuxserver/ffmpeg image :


- 

- it uses a —device parameter which is not implemented in create service
- it expects several custom parameters to pass them to the ffmpeg encoder






From my research up to now I assume that passing parameters is not implemented in docker create service, but maybe you can think of a workaround ? (unfortunately the image does not process environment variables, or at least they are not documented)


This is how I start dockerized ffmpeg (working fine in standalone mode) :


docker run -d /

—network="host" /

—device=/dev/video0 :/dev/video0 / ### error : unknow flag

—name ffmpeg_streamer /

—restart always -it /

-v $(pwd)/video :/video /

linuxserver/ffmpeg / ### custom parameters below here

-stream_loop /

-1 -re -nostdin /

-i "/video/test.avi" /

-f pulse /

-vcodec libx264 /

-preset:v veryfast /

-b:v 400k /

-f flv rtmp ://localhost:1935/live/streamkey

Many thanks for looking into this !