Recherche avancée

Médias (0)

Mot : - Tags -/tags

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (111)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Les notifications de la ferme

    1er décembre 2010, par

    Afin d’assurer une gestion correcte de la ferme, il est nécessaire de notifier plusieurs choses lors d’actions spécifiques à la fois à l’utilisateur mais également à l’ensemble des administrateurs de la ferme.
    Les notifications de changement de statut
    Lors d’un changement de statut d’une instance, l’ensemble des administrateurs de la ferme doivent être notifiés de cette modification ainsi que l’utilisateur administrateur de l’instance.
    À la demande d’un canal
    Passage au statut "publie"
    Passage au (...)

  • Initialisation de MediaSPIP (préconfiguration)

    20 février 2010, par

    Lors de l’installation de MediaSPIP, celui-ci est préconfiguré pour les usages les plus fréquents.
    Cette préconfiguration est réalisée par un plugin activé par défaut et non désactivable appelé MediaSPIP Init.
    Ce plugin sert à préconfigurer de manière correcte chaque instance de MediaSPIP. Il doit donc être placé dans le dossier plugins-dist/ du site ou de la ferme pour être installé par défaut avant de pouvoir utiliser le site.
    Dans un premier temps il active ou désactive des options de SPIP qui ne le (...)

Sur d’autres sites (7370)

  • 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;

  • Could not convert video to audio using ffmpeg or moviepy

    5 avril 2021, par Parv Jain

    I want to convert a mp4 video file to mp3/wav audio using python ffmpeg or moviepy.&#xA;when I run this command

    &#xA;

    ffmpeg -i vid.mp4 -ar 44100 -vn audio.wav&#xA;

    &#xA;

    It returns

    &#xA;

    Output file #0 does not contain any stream&#xA;

    &#xA;

    Here is the full Log

    &#xA;

    ffmpeg version N-55702-g920046a Copyright (c) 2000-2013 the FFmpeg developers&#xA;  built on Aug 21 2013 18:10:00 with gcc 4.7.3 (GCC)&#xA;  configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib&#xA;  libavutil      52. 42.100 / 52. 42.100&#xA;  libavcodec     55. 29.100 / 55. 29.100&#xA;  libavformat    55. 14.101 / 55. 14.101&#xA;  libavdevice    55.  3.100 / 55.  3.100&#xA;  libavfilter     3. 82.100 /  3. 82.100&#xA;  libswscale      2.  5.100 /  2.  5.100&#xA;  libswresample   0. 17.103 /  0. 17.103&#xA;  libpostproc    52.  3.100 / 52.  3.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;vid.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : dash&#xA;    minor_version   : 0&#xA;    compatible_brands: iso6avc1mp41&#xA;    creation_time   : 2021-03-12 14:13:58&#xA;  Duration: 00:07:28.87, start: 0.000000, bitrate: 1199 kb/s&#xA;    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 1197 kb/s, 23.98 tbr, 24k tbn, 47.95 tbc&#xA;    Metadata:&#xA;      creation_time   : 2021-03-12 14:13:58&#xA;      handler_name    : ISO Media file produced by Google Inc.&#xA;Output #0, wav, to &#x27;audio.wav&#x27;:&#xA;  Metadata:&#xA;    major_brand     : dash&#xA;    minor_version   : 0&#xA;    compatible_brands: iso6avc1mp41&#xA;Output file #0 does not contain any stream&#xA;

    &#xA;

    I searched the internet for this but could not find a solution

    &#xA;

    Please tell if there is a way to do this with ffmpeg or another way

    &#xA;

    I also tried to use moviepy but it was not successful.

    &#xA;

    Here is moviepy log

    &#xA;

    Traceback (most recent call last):&#xA;  File "path\to\file\script.py", line 3, in <module>&#xA;    clip.audio.write_audiofile(r&#x27;audio.mp3&#x27;)&#xA;AttributeError: &#x27;NoneType&#x27; object has no attribute &#x27;write_audiofile&#x27;&#xA;</module>

    &#xA;

    this is my code for moviepy

    &#xA;

    import moviepy.editor as mp&#xA;clip = mp.VideoFileClip(&#x27;vid.mp4&#x27;)&#xA;clip.audio.write_audiofile(r&#x27;audio.mp3&#x27;)&#xA;

    &#xA;

  • Concatenating two.mov files results in identical sized file

    2 février 2021, par CEr

    I try to concatenate two video files a.mov & b.mov on Win 10 using ffmpeg with the following command :

    &#xA;

    ffmpeg -safe 0 -f concat -i list.txt -vcodec copy -acodec copy c.mov

    &#xA;

    There are no errors displayed however when I open the resulting file c it has the same length as file a with the last frame appering to be a frame of b.&#xA;File a is a longer video, file b are credits (couple of seconds) made with ffmpeg from an image file.&#xA;Both files have the same aspect ratio, size and framerate.

    &#xA;

    I try to concatenate two video files a.mov & b.mov on Win 10 using ffmpeg with the following command :

    &#xA;

    ffmpeg -safe 0 -f concat -i list.txt -vcodec copy -acodec copy c.mov

    &#xA;

    There are no errors displayed however when I open the resulting file c it has the same length as file a with the last frame appering to be a frame of b.&#xA;File a is a longer video, file b are credits (couple of seconds) made with ffmpeg from an image file.&#xA;Both files have the same aspect ratio, size and framerate.

    &#xA;

    Here the log :

    &#xA;

      ffmpeg -n -i a.mov -i b.mov &#xA;    ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers   built with gcc 9.3.1 (GCC) 20200523  configuration: --enable-gpl --enable-version3 --enable-sdl2&#xA;    --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt   libavutil      56. 31.100 / 56. 31.100   libavcodec     58. 54.100 /&#xA;    58. 54.100   libavformat    58. 29.100 / 58. 29.100   libavdevice    58.  8.100 / 58.  8.100   libavfilter     7. 57.100 /  7. 57.100   libswscale      5.  5.100 /  5.  5.100   libswresample   3.  5.100 / &#xA;    3.  5.100   libpostproc    55.  5.100 / 55.  5.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;a.mov&#x27;:   Metadata:&#xA;        major_brand     : qt&#xA;        minor_version   : 512&#xA;        compatible_brands: qt&#xA;        encoder         : Lavf58.62.100   Duration: 00:31:50.04, start: 0.000000, bitrate: 5309 kb/s&#xA;        Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 4151 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)&#xA;        Metadata:&#xA;          handler_name    : Core Media Video&#xA;          encoder         : Lavc58.54.100 libx264&#xA;        Stream #0:1: Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32 (24 bit), 1152 kb/s (default)&#xA;        Metadata:&#xA;          handler_name    : SoundHandler Input #1, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;b.mov&#x27;:   Metadata:&#xA;        major_brand     : qt&#xA;        minor_version   : 512&#xA;        compatible_brands: qt&#xA;        encoder         : Lavf58.29.100   Duration: 00:00:10.01, start: 0.000000, bitrate: 67 kb/s&#xA;        Stream #1:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 64 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 59.94 tbc (default)&#xA;        Metadata:&#xA;          handler_name    : VideoHandler&#xA;          encoder         : Lavc58.54.100 libx264&#xA;

    &#xA;

    Thank you.

    &#xA;