
Recherche avancée
Médias (1)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
Autres articles (37)
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)
Sur d’autres sites (2109)
-
Repeating video frame sequences without iterating each frame
4 juillet 2015, par Raheel KhanI have an application that generates a video from a given number of files. A total frame count and sequence is provided and the generated video should loop the given sequence until the total number of frames have been written.
At the moment, I’m using
FFMPEG.VideoFileWriter
fromAForge
.var frameIndex = 0;
var frameCount = 300;
var writer = new AForge.Video.FFMPEG.VideoFileWriter();
writer.Open(filename: "Video.mp4", width: 10000, height: 10000, fps: 30, code: VideoCodec.MPEG4, bitrate: 1024 * 1024 * 2);
using (var imageCanvas = new Bitmap(width, height))
{
do
{
foreach (var file in this._Files)
{
frameIndex++;
if (frameIndex > frameCount) { break; }
using (var graphicsCanvas = Graphics.FromImage(imageCanvas))
{
graphicsCanvas.Clear(Color.Black);
using (var imageFile = Image.FromFile(file.FullName))
{
graphicsCanvas.DrawImage(imageFile, 0, 0, imageCanvas.Width, imageCanvas.Height);
}
}
writer.WriteVideoFrame(imageCanvas);
}
}
while (true);
}the bottlenecks are :
- The call to
writer.WriteVideoFrame(imageCanvas)
. - The source images in question are massive (more than 10Kx10K 32bpp) so keeping them all in memory is not an option.
The only thing I can think of is to create an uncompressed AVI file and somehow copy entire sequences in bulk. although transcoding back to MP4 would still take a while, it may same some overall.
Any general optimization suggestions or clues on how to write multiple frames at once would be appreciated.
- The call to
-
Http server live streaming in python
8 juillet 2015, par George SubiI want to send the live output of ffmpeg command to every GET request, but I’m novice in python and can’t solve it. This is my code :
import subprocess # for piping
from http.server import HTTPServer, BaseHTTPRequestHandler
class RequestHandler(BaseHTTPRequestHandler):
def _writeheaders(self):
self.send_response(200) # 200 OK http response
self.send_header('Connection', 'keep-alive')
self.send_header('Content-Type', 'video/mp4')
self.send_header('Accept-Ranges', 'bytes')
self.end_headers()
def do_GET(self):
self._writeheaders()
global p
DataChunkSize = 10000
print("starting polling loop.")
while(p.poll() is None):
print("looping... ")
stdoutdata = p.stdout.read(DataChunkSize)
self.wfile.write(stdoutdata)
print("Done Looping")
print("dumping last data, if any")
stdoutdata = p.stdout.read(DataChunkSize)
self.wfile.write(stdoutdata)
if __name__ == '__main__':
command = 'ffmpeg -re -i video.avi -an -vcodec libx264 -vb 448k -f mp4 -movflags dash -'
print("running command: %s" % (command, ))
p = subprocess.Popen(command, stdout=subprocess.PIPE, bufsize=-1, shell=True)
print("Server in port 8080...")
serveraddr = ('', 8080) # connect to port 8080
srvr = HTTPServer(serveraddr, RequestHandler)
srvr.serve_forever()This is a prove of concept with a video.avi but the real application is with a live signal video.
When connect to html5 video tag, play the video well, but when open another connection then play the video from the begining and not from the live moment. Also, when close the web, the server print an error :
BrokenPipeError: [Errno 32] Broken pipe
Yes, the pipe is broken when cut the connection is obvious. I think that maybe do it with pipes is not correct, but I don’t know how to do it.
The goal is to run only one ffmpeg command and the output send to every client connected or will do it. Anybody can help me please ?
-
Evolution #3509 (Nouveau) : Visualiser un changelog depuis l’interface des plugins
23 juillet 2015, par placido roxingL’idée est d’ajouter un lien sur le numéro de version de chaque plugin depuis la page ?exec=admin_plugin pour afficher (dans une mediabox) son changelog.
D’aucuns diront qu’il existe déjà un lien vers la documentation... certes. Mais même si cette dernière a été consciencieusement mise à jour, il est rare qu’elle retranscrive exactement tous les derniers changements introduits.
Une telle source d’informations, rapidement consultable depuis la partie privée, m’apparaît avantageuse au moment d’une mise à jour, voire précieuse pour déceler une éventuelle incompatibilité.
C’est aussi un bon moyen de voir la fréquence de maintenance du plugin.Je pense que l’affichage du lien peut être conditionné - par exemple - à la présence d’un fichier changelog.txt à la racine du plugin, lequel serait affiché dans la mediabox.
Dès lors, le plus gros de la fonctionnalité ne concerne pas SVP mais l’empaqueteur de la Zone qui pourrait se charger de la génération du changelog de manière automatique.