
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 (52)
-
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...) -
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community. -
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (6529)
-
Django StreamingHttpResponse : How to quit Popen process when client disconnects ?
2 avril 2022, par seriousm4xIn django, i want to convert a m3u8 playlist to mp4 and stream it to the client with ffmpeg pipe. The code works and the ffmpeg process also quits, but only when client waits till the end and received the whole file.


I want to quit the process when the client disconnects but the process keeps running forever.


I have this code :


import subprocess
from functools import partial
from django.http.response import StreamingHttpResponse
from django.shortcuts import get_object_or_404
from django.utils.text import slugify


def stream(request, uuid):
 vod = get_object_or_404(Vod, uuid=uuid)

 def iterator(proc):
 for data in iter(partial(proc.stdout.read, 4096), b""):
 if not data:
 proc.kill()
 yield data

 cmd = ["ffmpeg", "-i", "input.m3u8", "-c", "copy", "-bsf:a", "aac_adtstoasc", "-movflags", "frag_keyframe+empty_moov", "-f", "mp4", "-"]
 proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
 response = StreamingHttpResponse(iterator(proc), content_type="video/mp4")
 response["Content-Disposition"] = f"attachment; filename={slugify(vod.date)}-{slugify(vod.title)}.mp4"
 return response




I've seen this answer but I'm not sure if I could use threading to solve my problem.


-
doc/protocols : document experimental mutli-client api
3 juillet 2015, par Stephan Holljes -
How to update MP4 with the video length
9 décembre 2015, par oygleI used youtube-dl to obtain a friends video. When I play it in VLC, I notice there is no time/length shown. As we need to cut part of this video with ffmpeg, can I use ffmpeg (or similar tool) to determine the length of the video, and then update the MP4 to contain the time/length ?