
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (45)
-
Personnaliser les catégories
21 juin 2013, parFormulaire de création d’une catégorie
Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire.
Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
Sur d’autres sites (6488)
-
How to use (django-celery,RQ) worker to execute a video filetype conversion (ffmpeg) in django on heroku (My code works locally)
15 janvier 2013, par GetItDoneOne part of my website includes a form that allows users to upload video. I use ffmpeg to convert the video to flv. My media and static files are stored on Amazon S3. I can get everything to work perfectly locally, however I can't seem to figure out how to use a worker to run the video conversion subprocess in production. I have dj-celery and rq installed in my app. The code in my view that I was able to get to work locally is :
#views.py
def upload_broadcast(request):
if request.method == 'POST':
form = VideoUploadForm(request.POST, request.FILES)
if form.is_valid():
new_video=form.save()
def convert_to_flv(video):
filename = video.video_upload
sourcefile = "%s%s" % (settings.MEDIA_ROOT, filename)
flvfilename = "%s.flv" % video.id
imagefilename = "%s.png" % video.id
thumbnailfilename = "%svideos/flv/%s" % (settings.MEDIA_ROOT, imagefilename)
targetfile = "%svideos/flv/%s" % (settings.MEDIA_ROOT, flvfilename)
ffmpeg = "ffmpeg -i %s -acodec mp3 -ar 22050 -f flv -s 320x240 %s" % (sourcefile, targetfile)
grabimage = "ffmpeg -y -i %s -vframes 1 -ss 00:00:02 -an -vcodec png -f rawvideo -s 320x240 %s" % (sourcefile, thumbnailfilename)
print ("SOURCE: %s" % sourcefile)
print ("TARGET: %s" % targetfile)
print ("TARGET IMAGE: %s" % thumbnailfilename)
print ("FFMPEG TASK CODE: %s" % ffmpeg)
print ("IMAGE TASK CODE: %s" % grabimage)
try:
ffmpegresult = subprocess.call(ffmpeg)
print "---------------FFMPEG---------------"
print ffmpegresult
except:
print "Not working."
try:
videothumbnail = subprocess.call(grabimage)
print "---------------IMAGE---------------"
print videothumbnail
except:
print "Not working."
video.flvfilename = flvfilename
video.videothumbnail = imagefilename
video.save()
convert_to_flv(new_video)
return HttpResponseRedirect('/video_list/')
else:
...This is my first time trying to use a worker (or ever pushing a project to production), so even with the documentation it is still unclear to me what I need to do. I have tried several different things but nothing seems to work. Is there just a simple way to tell celery to run the ffmpegresult = subprocess.call(ffmpeg) ? Thanks in advance for any help or insight.
EDIT- Added heroku logs
2013-01-10T20:58:57+00:00 app[web.1]: TARGET: /media/videos/flv/8.flv
2013-01-10T20:58:57+00:00 app[web.1]: IMAGE TASK CODE: ffmpeg -y -i /media/videos/practice.wmv -vframes 1 -ss 00:00:02 - an -vcodec png -f rawvideo -s 320x240 /media/videos/flv/8.png
2013-01-10T20:58:57+00:00 app[web.1]: SOURCE: /media/videos/practice.wmv
2013-01-10T20:58:57+00:00 app[web.1]: FFMPEG TASK CODE: ffmpeg -i /media/videos/practice.wmv -acodec mp3 -ar 22050 -f fl v -s 320x240 /media/videos/flv/8.flv
2013-01-10T20:58:57+00:00 app[web.1]: TARGET IMAGE: /media/videos/flv/8.png
2013-01-10T20:58:57+00:00 app[web.1]: Not working.
2013-01-10T20:58:57+00:00 app[web.1]: Not working.NEWER EDIT
I tried adding a tasks.py and added the task :
celery = Celery('tasks', broker='redis://guest@localhost//')
@celery.task
def ffmpeg_task(video):
converted_file = subprocess.call(video)
return converted_filethen I changed the relevant section of my view to :
...
try:
ffmpeg_task.delay(ffmpeg)
print "---------------FFMPEG---------------"
print ffmpegresult
except:
print "Not working."
...My new logs are :
2013-01-15T13:19:52+00:00 app[web.1]: TARGET IMAGE: /media/videos/flv/12.png
2013-01-15T13:19:52+00:00 app[web.1]: SOURCE: /media/videos/practice.wmv
2013-01-15T13:19:52+00:00 app[web.1]: FFMPEG TASK CODE: ffmpeg -i /media/videos/practice.wmv -acodec mp3 -ar 22050 -f fl v -s 320x240 /media/videos/flv/12.flv
2013-01-15T13:19:52+00:00 app[web.1]: IMAGE TASK CODE: ffmpeg -y -i /media/videos/practice.wmv -vframes 1 -ss 00:00:02 -an -vcodec png -f rawvideo -s 320x240 /media/videos/flv/12.png
2013-01-15T13:19:52+00:00 app[web.1]: TARGET: /media/videos/flv/12.flv
2013-01-15T13:20:17+00:00 app[web.1]: 2013-01-15 13:20:17 [2] [CRITICAL] WORKER TIMEOUT (pid:12)
2013-01-15T13:20:17+00:00 app[web.1]: 2013-01-15 13:20:17 [2] [CRITICAL] WORKER TIMEOUT (pid:12)
2013-01-15T13:20:17+00:00 app[web.1]: 2013-01-15 13:20:17 [19] [INFO] Booting worker with pid: 19Am I completely missing something ? I'll keep trying, but will be very appreciative of any direction or assistance.
-
Anomalie #4737 : Erreur recherche dans les forums dans le privé
9 juillet 2021, par JLuc -Avec ou sans "plat", le SQL généré est :
- <span class="CodeRay"><span class="class">SELECT</span> forum.id_forum, resultats.points <span class="keyword">AS</span> points, forum.statut
- <span class="keyword">FROM</span> spip_forum <span class="keyword">AS</span> <span class="string"><span class="delimiter">`</span><span class="content">forum</span><span class="delimiter">`</span></span>
- <span class="keyword">INNER</span> <span class="keyword">JOIN</span> spip_resultats <span class="keyword">AS</span> resultats <span class="keyword">ON</span> ( resultats.id = forum.id_forum )
- <span class="keyword">WHERE</span> <span class="keyword">NOT</span>((forum.statut <span class="keyword">LIKE</span> <span class="string"><span class="delimiter">'</span><span class="content">priv%</span><span class="delimiter">'</span></span>))
- <span class="keyword">AND</span> (resultats.recherche=<span class="string"><span class="delimiter">'</span><span class="content">c7b4cacf770e2915</span><span class="delimiter">'</span></span> <span class="keyword">AND</span> resultats.table_objet=<span class="string"><span class="delimiter">'</span><span class="content">forum</span><span class="delimiter">'</span></span> <span class="keyword">AND</span> resultats.serveur=<span class="string"><span class="delimiter">'</span><span class="delimiter">'</span></span>)
- <span class="keyword">GROUP</span> <span class="keyword">BY</span> forum.id_forum
- <span class="keyword">ORDER</span> <span class="keyword">BY</span> forum.id_forum <span class="directive">DESC</span>
- </span>
Le pb vient du fait que c’est le forum id_thread qui est enregistré dans la table spip_resultats.
-
Anomalie #4438 (En cours) : Manque Msg :message:lien_reponse_message :
26 février 2020, par b bJe confirme en 3.2.7 sur spip.net, mais je ne reproduis pas sur le trunk, en 3.3 donc, ni en 3.2.5 sur blog.spip.net. Cela vient de cet appel alambiqué de chaîne de langue
[(#OBJET|concat{:lien_reponse_,#OBJET}|_T)]
cf https://zone.spip.org/trac/spip-zone/browser/spip-zone/_core_/tags/spip-3.2.7/plugins/forum/prive/modeles/forum.html#L29PS : je laisse le bug sur le projet core et non forum car ça semble impliquer
_T()
.