
Recherche avancée
Médias (91)
-
Spitfire Parade - Crisis
15 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Wired NextMusic
14 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (32)
-
Création définitive du canal
12 mars 2010, parLorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
A la validation, vous recevez un email vous invitant donc à créer votre canal.
Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...) -
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 (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)
Sur d’autres sites (4403)
-
Pipe PyQt Widget Images to ffmpeg
10 février 2024, par throwaway17434I have a PyQt Window with widgets that change. I want to make a video of it. I found this Answer to be very useful, however it is does not seem to be possible to use subprocess PIPE as a target in QtGui.QPixmap's save-method. I have the feeling that I should use the native QtProcess for this kind of work, but I don't know how I can PIPE the images and I can't see the errors because I can't see the standard outpur/error either. What I want to do is something like this :


from PyQt4 import QtGui, QtCore
import random

app = QtGui.QApplication([])
win = QtGui.QWidget()
layout = QtGui.QGridLayout()
win.setLayout(layout)

#picture frame
scene = QtGui.QGraphicsScene()
canvas = QtGui.QGraphicsView(scene)
layout.addWidget(canvas,0,0)

# start button
def run():
 # set pen
 pen = QtGui.QPen(QtCore.Qt.red)
 size = canvas.size()
 
 # start seperate process
 process = QtCore.QProcess(app)
 process.start('ffmpeg',['-y', '-f', 'image2pipe', '-vcodec', 'mjpeg', '-r', '24', '-i', '-', '-vcodec', 'mpeg4', '-qscale', '5', 'video.avi'])
 for i in range(100):
 x = random.randint(1, size.width()-1)
 y = random.randint(1, size.height()-1) 
 scene.addLine(x,y,x,y, pen=pen)
 QtGui.QPixmap.grabWidget(win).save(process, "jpeg")
 
but_run = QtGui.QPushButton("Go!")
but_run.clicked.connect(run)
layout.addWidget(but_run,1,0)

win.show()
app.exec_()



-
Pipe PyQt Widget Images to ffmpeg
31 octobre 2014, par throwaway17434I have a PyQt Window with widgets that change. I want to make a video of it. I found this Answere to be very useful, however it is does not seem to be possible to use subprocess PIPE as a target in QtGui.QPixmap’s save-method. I have the feeling that I should use the native QtProcess for this kind of work, but I don’t know how I can PIPE the images and I can’t see the errors because I can’t see the standard outpur/error either. What I want to do is something like this :
from PyQt4 import QtGui, QtCore
import random
app = QtGui.QApplication([])
win = QtGui.QWidget()
layout = QtGui.QGridLayout()
win.setLayout(layout)
#picture frame
scene = QtGui.QGraphicsScene()
canvas = QtGui.QGraphicsView(scene)
layout.addWidget(canvas,0,0)
# start button
def run():
# set pen
pen = QtGui.QPen(QtCore.Qt.red)
size = canvas.size()
# start seperate process
process = QtCore.QProcess(app)
process.start('ffmpeg',['-y', '-f', 'image2pipe', '-vcodec', 'mjpeg', '-r', '24', '-i', '-', '-vcodec', 'mpeg4', '-qscale', '5', 'video.avi'])
for i in range(100):
x = random.randint(1, size.width()-1)
y = random.randint(1, size.height()-1)
scene.addLine(x,y,x,y, pen=pen)
QtGui.QPixmap.grabWidget(win).save(process, "jpeg")
but_run = QtGui.QPushButton("Go!")
but_run.clicked.connect(run)
layout.addWidget(but_run,1,0)
win.show()
app.exec_() -
FFmpeg : encoding in webm (vp9) for windows
2 juillet 2015, par SeltymarI’m trying to encode jpegs to a webm video in vp9 on windows 7.
I followed the instructions from webmproject in 2 pass.
I changed\dev\nul
byNUL
.ffmpeg.exe -i %4d.jpg -c:v libvpx-vp9 -pass 1 -b:v 1000K -threads 8 -speed 4 -tile-columns 6 -frame-parallel 1 -auto-alt-ref 1 -lag-in-frames 25 -an -f webm NUL
ffmpeg.exe -i %4d.jpg -c:v libvpx-vp9 -pass 2 -b:v 1000K -threads 8 -speed 1 -tile-columns 6 -frame-parallel 1 -auto-alt-ref 1 -lag-in-frames 25 -c:a libopus -b:a 64k -f webm out.webmbut after the first pass, it tells me "output file is empty, nothing was encoded". But the second pass create the video.
I also tryed in one pass :
ffmpeg -i %4d.jpg -c:v libvpx-vp9 -crf 10 -b:v 0 output.webm
Then I want to use the output video using html5 video and canvas tags as below.
<canvas>
Your browser does not support the canvas tag.
</canvas>
<code class="echappe-js"><script><br />
<br />
<br />
var videos = document.createElement('video');<br />
videos.src = "output.webm";<br />
videos.type = "video/webm";<br />
videos.load(); <br />
videos.play();<br />
videos.playbackRate = 1;<br />
var videoImage0 = document.getElementById('canvas'); <br />
videoImage0.width = 2700;<br />
videoImage0.height = 1350;<br />
<br />
var videoImageContexts =videoImage0.getContext('2d');<br />
//// background color if no video present<br />
videoImageContexts.fillStyle = '#0000ff';<br />
videoImageContexts.fillRect(0, 0, videoImage0.width, videoImage0.height); <br />
animate();<br />
<br />
function animate() {<br />
requestAnimationFrame(animate);<br />
update();<br />
<br />
}<br />
<br />
function update() {<br />
<br />
if (videos.readyState === videos.HAVE_ENOUGH_DATA) {<br />
videoImageContexts.drawImage(videos, 0, 0);<br />
}<br />
}<br />
</script>result :
- With both methods the output video can’t be read in VLC but it can be read if I drag and drop in firefox or chrome or using the video tag only.
- The html page above works correctly on chrome but not in firefox. In firefox, the color is not correct like if the blue channel was translated.
I think the problem is the encoding with FFmpeg. I’m using the static build from zeranoe. Here is the version
and libvpx is enable.
My questions :
-
Is there a problem on my command line ?
-
Is there a problem in my JS code that could lead to error in the decoding process ?