
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (74)
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs
Sur d’autres sites (12580)
-
Unable to connect pyqt5 ui and Python file
7 janvier 2021, par Education 4FunI followed some tutorials and its working for them but not for me the below code is the exact copy of one of their code giving same errors even when try to integrate int my application


I followed some tutorials and its working for them but not for me the below code is the exact copy of one of their code giving same errors even when try to integrate int my application


Python code


import sys
from PyQt5 import QtWidgets
from PyQt5.QtWidgets import QDialog, QApplication, QFileDialog
from PyQt5.uic import loadUi

class MainWindow(QDialog):
 def __init__(self):
 super(MainWindow,self).__init__()
 loadUi("lolol.ui",self)
 self.browse.clicked.connect(self.browsefiles)

 def browsefiles(self):
 fname=QFileDialog.getOpenFileName(self, 'Open file', 'D:\Videos', 'Images (*.png, *.xmp *.jpg)')
 self.filename.setText(fname[0])

app=QApplication(sys.argv)
mainwindow=MainWindow()
widget=QtWidgets.QStackedWidget()
widget.addWidget(mainwindow)
widget.setFixedWidth(400)
widget.setFixedHeight(300)
widget.show()
sys.exit(app.exec_())



lolol.ui file


<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
 <class>Dialog</class>
 <widget class="QDialog">
 <property>
 <rect>
 <x>0</x>
 <y>0</y>
 <width>400</width>
 <height>300</height>
 </rect>
 </property>
 <property>
 <string>Dialog</string>
 </property>
 <widget class="QLineEdit">
 <property>
 <rect>
 <x>20</x>
 <y>130</y>
 <width>211</width>
 <height>22</height>
 </rect>
 </property>
 </widget>
 <widget class="QPushButton">
 <property>
 <rect>
 <x>260</x>
 <y>130</y>
 <width>93</width>
 <height>28</height>
 </rect>
 </property>
 <property>
 <string>Browse</string>
 </property>
 </widget>
 </widget>
 <resources></resources>
 <connections></connections>
</ui>



Error


Traceback (most recent call last):
 File "c:/Users/thota/OneDrive/Desktop/VET/lolii.py", line 17, in <module>
 mainwindow=MainWindow()
 File "c:/Users/thota/OneDrive/Desktop/VET/lolii.py", line 9, in __init__
 loadUi("lolol.ui",self)
 File "C:\Users\thota\AppData\Local\Programs\Python\Python37\lib\site-packages\PyQt5\uic\__init__.py", line 238, in loadUi
 return DynamicUILoader(package).loadUi(uifile, baseinstance, resource_suffix)
 File "C:\Users\thota\AppData\Local\Programs\Python\Python37\lib\site-packages\PyQt5\uic\Loader\loader.py", line 66, in loadUi
 return self.parse(filename, resource_suffix)
 File "C:\Users\thota\AppData\Local\Programs\Python\Python37\lib\site-packages\PyQt5\uic\uiparser.py", line 1020, in parse
 document = parse(filename)
 File "C:\Users\thota\AppData\Local\Programs\Python\Python37\lib\xml\etree\ElementTree.py", line 1197, in parse
 tree.parse(source, parser)
 File "C:\Users\thota\AppData\Local\Programs\Python\Python37\lib\xml\etree\ElementTree.py", line 587, in parse
 source = open(source, "rb")
</module>




-
Revision 31019 : - gestion du multilingue ! - nouvelle entrée "Se déconnecter" - ...
20 août 2009, par vincent@… — Loggestion du multilingue !
nouvelle entrée "Se déconnecter"
possibilité de préciser une classe CSS supplémentaire sur les entrées qui ne génèrent qu’une ligne
-
ffmpeg not giving correct duration of a mp4
1er juin 2012, par oachI am working with ffmpeg to convert videos into flv files via php. The tests I have done do not work for mp4 conversions. I have a 13 second video (videos will be limited to 15 seconds), when it is uploaded and I check the "duration" of the video it comes out over 300 seconds. I have tried changing around how I process the video :
// original
exec('ffmpeg -i <path>/<filename> 2>&1', $output);
// current
exec('ffmpeg -i <path>/<filename> 2>&1 | grep "Duration" | cut -d \' \' -f 4 | sed s/,//', $output);
</filename></path></filename></path>The original method did not work for mpg files but the second does, but neither gives me the "correct" duration of a mp4 video. Is there a "special" way to process mp4 files ?
Thank you for your time and help.
Update :
Command line
ffmpeg -i ./custom_scraping.mp4 2>&1 | grep "Duration" | cut -d ' ' -f 4 | sed s/,//
00:05:15.84Complete output (formatted as best I could)
ffmpeg -i ./custom_scraping.mp4 2>&1
FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
built on Jan 29 2012 23:55:02 with gcc 4.1.2 20080704 (Red Hat 4.1.2-51)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
Seems stream 1 codec frame rate differs from container frame rate: 5994.00 (5994/1) -> 29.97 (2997/100)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './custom_scraping.mp4':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: mp42avc1
Duration: 00:05:15.84, start: 0.000000, bitrate: 36 kb/s
Stream #0.0(eng): Audio: aac, 44100 Hz, stereo, s16, 2 kb/s
Stream #0.1(eng): Video: h264, yuv420p, 480x360, 36 kb/s, 1.04 fps, 29.97 tbr, 2997 tbn, 5994 tbcAt least one output file must be specified
Don't know if it helps but from the listing of the file in Linux :
1432471 May 31 13:33 custom_scraping.mp4Let me know if anything else is needed.