
Recherche avancée
Autres articles (97)
-
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
Dépôt de média et thèmes par FTP
31 mai 2013, parL’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)
Sur d’autres sites (10666)
-
Use Google Analytics and risk fines, after CJEU ruling on Privacy Shield
27 août 2020, par Joselyn Khor — Privacy -
On-the-fly transcoding using derolf/transcoder
8 septembre 2015, par user1811678https://github.com/derolf/transcoder
I need to transcode locally and playback locally in my project, no other external connection to the server.
It is a good source of doing on the fly transcoding by ffmpeg.In my case i have to transcode it to mp4 as it could perform faster.
However i run into following problem, and i need some help in here to fix it.----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 34089)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 593, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 651, in __init__
self.finish()
File "/usr/lib/python2.7/SocketServer.py", line 710, in finish
self.wfile.close()
File "/usr/lib/python2.7/socket.py", line 279, in close
self.flush()
File "/usr/lib/python2.7/socket.py", line 303, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipeHere is my code :
server.pyfrom flask import Flask, request, Response, abort, send_file, jsonify
import os, subprocess, re
import config
app = Flask(__name__)
@app.route('/media/.js')
def media_content_js(path):
d= os.path.abspath( os.path.join( config.media_folder, path ) )
print d
if not os.path.isfile( d ): abort(404)
cmdline= list()
cmdline.append( config.ffmpeg )
cmdline.append( "-i" )
cmdline.append( d );
print cmdline
duration= -1
FNULL = open(os.devnull, 'w')
proc= subprocess.Popen( cmdline, stderr=subprocess.PIPE, stdout=FNULL )
try:
for line in iter(proc.stderr.readline,''):
line= line.rstrip()
#Duration: 00:00:45.13, start: 0.000000, bitrate: 302 kb/s
m = re.search('Duration: (..):(..):(..)\...', line)
if m is not None: duration= int(m.group(1)) * 3600 + int(m.group(2)) * 60 + int(m.group(3)) + 1
finally:
proc.kill()
return jsonify(duration=duration)
@app.route('/media/.mp4')
def media_content_ogv(path):
d= os.path.abspath( os.path.join( config.media_folder, path ) )
print d
if not os.path.isfile( d ): abort(404)
start= request.args.get("start") or 0
print start
def generate():
cmdline= list()
cmdline.append( config.ffmpeg )
cmdline.append( "-i" )
cmdline.append( d );
cmdline.append( "-ss" )
cmdline.append( str(start) );
cmdline.extend( config.ffmpeg_args )
print cmdline
FNULL = open(os.devnull, 'w')
proc= subprocess.Popen( cmdline, stdout=subprocess.PIPE, stderr=FNULL )
try:
f= proc.stdout
byte = f.read(512)
while byte:
yield byte
byte = f.read(512)
finally:
proc.kill()
return Response(response=generate(),status=200,mimetype='video/mp4',headers={'Access-Control-Allow-Origin': '*', "Content-Type":"video/mp4","Content-Disposition":"inline","Content-Transfer-Enconding":"binary"})
@app.route('/', defaults={"path":"index.html"})
@app.route('/')
def static_content(path):
d= os.path.abspath( os.path.join( config.static_folder, path ) )
if not os.path.isfile( d ): abort(404)
return send_file( d )
app.run( host="0.0.0.0",port=config.port, threaded=True, debug=True )config.py
media_folder= "media"
static_folder= "static"
port= 8123
ffmpeg= "/usr/bin/ffmpeg"
ffmpeg_args= [ "-f", "avi" ,"-acodec", "libfdk_aac", "-b:a", "128k", "-vcodec", "libx264", "-b:v", "1200k" , "-flags" , "+aic+mv4", "pipe:1"]index.html
<code class="echappe-js"><script src="http://vjs.zencdn.net/4.5/video.js"></script><script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script><br />
var video= videojs('video');<br />
video.src("media/testavi.avi.mp4");<br />
<br />
// hack duration<br />
video.duration= function() { return video.theDuration; };<br />
video.start= 0;<br />
video.oldCurrentTime= video.currentTime;<br />
video.currentTime= function(time) <br />
{ <br />
if( time == undefined )<br />
{<br />
return video.oldCurrentTime() + video.start;<br />
}<br />
console.log(time)<br />
video.start= time;<br />
video.oldCurrentTime(0);<br />
video.src("media/testavi.avi.mp4?start=" + time);<br />
video.play();<br />
return this;<br />
};<br />
<br />
$.getJSON( "media/testavi.avi.js", function( data ) <br />
{<br />
video.theDuration= data.duration;<br />
});<br />
</script> -
CJEU rules US cloud servers don’t comply with GDPR and what this means for web analytics
17 juillet 2020, par Jake Thornton