Recherche avancée

Médias (1)

Mot : - Tags -/epub

Autres articles (74)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque 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, par

    Accé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, par

    Mediaspip 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 4Fun

    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

    


    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

    


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

    &#xA;

    Error

    &#xA;

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

    &#xA;

    Files location&#xA;enter image description here

    &#xA;

  • Revision 31019 : - gestion du multilingue ! - nouvelle entrée "Se déconnecter" - ...

    20 août 2009, par vincent@… — Log

    - gestion 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 oach

    I 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(&#39;ffmpeg -i <path>/<filename> 2>&amp;1&#39;, $output);

    // current
    exec(&#39;ffmpeg -i <path>/<filename> 2>&amp;1 | grep "Duration" | cut -d \&#39; \&#39; -f 4 | sed s/,//&#39;, $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>&amp;1 | grep "Duration" | cut -d &#39; &#39; -f 4 | sed s/,//
    00:05:15.84

    Complete output (formatted as best I could)

    ffmpeg -i ./custom_scraping.mp4 2>&amp;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=&#39;-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC&#39; --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 &#39;./custom_scraping.mp4&#39;:
    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 tbc

    At 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.mp4

    Let me know if anything else is needed.