
Recherche avancée
Médias (91)
-
Valkaama DVD Cover Outside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Valkaama DVD Cover Inside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
1,000,000
27 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Four of Us are Dying
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (62)
-
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) (...)
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)
Sur d’autres sites (9298)
-
unable to play AES-CBC encrypted mpeg-ts stream on ffplay/ffmpeg
22 mai 2022, par AquilaCoderhow to play a encrypted camera/live stream using ffplay/ffmpeg.


the original stream was encrypted with tsduck scrambler plugin with aes-cbc option, we have tried with many players nothing works.


- 

- iv : 627CBD824E93CDC9DA754BAC72DB2205
- cw : 6CC47461F65084AB5C5F90EDA1C2F9F0






stream info






-
Play video using ffmpeg subprocess
17 juin 2023, par MCDThe following code stuck in the middle of the video. I want to play the video start at
start_seconds
and end atend_seconds
.

import subprocess
import cv2
import numpy as np
import subprocess

def play_video_with_ffmpeg(video_path, start_seconds, end_seconds):
print(start_seconds)

 # Set the desired frame size
 width = 920
 height = 600
 
 # Set the window position
 print("here")
 window_x = 600 # X position
 window_y = 10 # Y position
 cv2.namedWindow('Video Player', cv2.WINDOW_NORMAL)
 cv2.moveWindow('Video Player', window_x, window_y)
 
 # Build the ffmpeg command to skip to the desired start time and end time
 command = [
 'ffmpeg',
 '-ss', str(start_seconds),
 '-i', video_path,
 '-t', str((end_seconds - start_seconds)),
 '-vf', f'scale={width}:{height}',
 '-r', '30',
 '-f', 'image2pipe',
 '-pix_fmt', 'bgr24',
 '-vcodec', 'rawvideo',
 '-'
 ]
 
 # Open a subprocess to execute the ffmpeg command
 process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
 
 # Create a buffer to hold the frame data
 buffer_size = width * height * 3
 frame_buffer = bytearray(buffer_size)
 
 while process.poll() is None:
 # Read the frame from the subprocess stdout into the buffer
 bytes_read = process.stdout.readinto(frame_buffer)
 
 if bytes_read == buffer_size:
 # Convert the frame buffer to a numpy array
 frame = np.frombuffer(frame_buffer, dtype='uint8').reshape((height, width, 3))
 
 # Resize the frame
 frame_resized = cv2.resize(frame, (width, height), interpolation=cv2.INTER_AREA)
 
 # Display the frame
 cv2.imshow('Video Player', frame_resized)
 
 if cv2.waitKey(1) & 0xFF == ord('q'):
 break
 
 process.stdout.close()
 process.stderr.close()
 cv2.destroyAllWindows()



I expect to play the video start from
start_second
and end atend_second
. I usedcv2.set
but it took long time to play from start_second.

-
Could you please guide me on how to play a single sample of an audio file in C# using FFmpeg ?
11 juillet 2023, par hello worldWhat is the recommended approach for playing a single sample of an audio file in C# using FFmpeg ? I would like to incorporate FFmpeg into my C# application to play a specific sample from an audio file. Could someone provide an example or guide me on how to achieve this ? Any help would be appreciated.


using System;
using System.Diagnostics;

public class AudioPlayer
{
 private string ffmpegPath;

 public AudioPlayer(string ffmpegPath)
 {
 this.ffmpegPath = ffmpegPath;
 }

 public void PlayAudioSample(string audioFilePath, TimeSpan samplePosition)
 {
 // Prepare FFmpeg process
 Process ffmpegProcess = new Process();
 ffmpegProcess.StartInfo.FileName = ffmpegPath;
 ffmpegProcess.StartInfo.Arguments = $"-ss {samplePosition} -i \"{audioFilePath}\" -t 1 -acodec pcm_s16le -f wav -";
 ffmpegProcess.StartInfo.RedirectStandardOutput = true;
 ffmpegProcess.StartInfo.RedirectStandardError = true;
 ffmpegProcess.StartInfo.UseShellExecute = false;
 ffmpegProcess.StartInfo.CreateNoWindow = true;

 // Start FFmpeg process
 ffmpegProcess.Start();

 // Play audio sample
 using (var audioOutput = new NAudio.Wave.WaveOutEvent())
 {
 using (var audioStream = new NAudio.Wave.RawSourceWaveStream(ffmpegProcess.StandardOutput.BaseStream, new NAudio.Wave.WaveFormat(44100, 16, 2)))
 {
 audioOutput.Init(audioStream);
 audioOutput.Play();
 while (audioOutput.PlaybackState == NAudio.Wave.PlaybackState.Playing)
 {
 System.Threading.Thread.Sleep(100);
 }
 }
 }

 // Wait for FFmpeg process to exit
 ffmpegProcess.WaitForExit();
 }
}